More than half a million people moved to the District between 2000 and 2014, according to Census data. But the District has only had a net gain of 90,000 residents during those years, suggesting that a notable slice of the city’s more than 650,000 residents move out each year.

So where are they leaving to? And why?

District, Measured — the blog from the D.C. Office of Revenue Analysis — has sifted through this data and found, unsurprisingly, that people are lured into the District by new jobs, and leave when they want to own a home or find a better or more affordable rental.

Take a look: Between 2000 and 2014, 165,472 people said they moved to the District for a new job or transfer.

While jobs accounted for 32 percent of people moving into the District, only 12 percent of residents said they moved out because of a job. Instead, 36 percent of people said they left seeking better and cheaper housing, or wanting to own their own homes. This shouldn’t be all that unexpected, considering the often-talked about high housing prices in the District and the dearth of affordable homes.

Some studies put the median rental price for a one-bedroom apartment in D.C. at $2,000.

And when people leave the District, a good chunk of them move to the suburbs in Maryland and Virginia. Between 2000 and 2014, 391,000 District residents moved to those states, that’s 42 percent of the people who left the city. In return, only 191,000 — 30 percent of residents who moved into the city — came from Maryland or Virginia.

According to District, Measured, people who share housing in D.C. with roommates are most likely to move to the suburbs when they are ready to live on their own.