Consumers seeking cheaper housing, moving for jobs, or relocating for their families cause migration patterns and shift the populations around the country. Bright lights of the big housing markets draw huge influxes of people every year, but can also squeeze just as many out due to exorbitant prices.

"Often the cities that attract the most newcomers are the same places where people are forced to compete for living space," Holden Lewis, home expert at NerdWallet, said in a press release. "In these growing metros, if construction of affordable housing doesn't keep pace with population growth, then rents and home prices will rise."

About 47 million residents moved annually from 2012 to 2016. Nearly 18% of movers said they went elsewhere to cut their housing expenses.

"The more populated a city is, the more expensive homes will be, which generally reserves homeownership to those with high incomes," Lewis said. "Lower incomes among renters combined with high housing costs means it's an uphill battle for those who are looking to save for a home in America's most populated cities."

From the high of the Rocky Mountains to down all across the South, here's a look at the 12 housing markets with the largest average annual migration.

NerdWallet based its list of migration flows and homeowner costs of the 25 most populous metro areas on data from the U.S. Census Bureau, American Community Survey and American Housing Survey.
Costs of living
12. Denver, Colo.
Average annual net population inflow 2012-2016: 45,412
Average monthly homeowner costs: $1,811
Top out-of-state origin city: Chicago
NMN032919-denver.jpg
11. Tampa, Fla.
Average annual net population inflow 2012-2016: 48,905
Average monthly homeowner costs: $1,384
Top out-of-state origin city: New York
NMN032919-tampa.jpg
10. Orlando, Fla.
Average annual net population inflow 2012-2016: 52,187
Average monthly homeowner costs: $1,423
Top out-of-state origin city: New York
NMN032919-orlando.jpg
9. San Francisco, Calif.
Average annual net population inflow 2012-2016: 53,864
Average monthly homeowner costs: $2,985
Top out-of-state origin city: New York
NMN032919-san-francisco.jpg
8. Washington, D.C.
Average annual net population inflow 2012-2016: 62,852
Average monthly homeowner costs: $2,293
Top out-of-state origin city: Baltimore
NMN032919-washington.jpg
7. Riverside, Calif.
Average annual net population inflow 2012-2016: 63,780
Average monthly homeowner costs: $1,840
Top out-of-state origin city: Phoenix
NMN032919-riverside.jpg
6. Seattle, Wash.
Average annual net population inflow 2012-2016: 78,794
Average monthly homeowner costs: $2,125
Top out-of-state origin city: Portland, Ore.
NMN032919-seattle.jpg
5. Miami, Fla.
Average annual net population inflow 2012-2016: 79,262
Average monthly homeowner costs: $1,737
Top out-of-state origin city: New York
Miami
4. Atlanta, Ga.
Average annual net population inflow 2012-2016: 81,865
Average monthly homeowner costs: $1,460
Top out-of-state origin city: New York
NMN032919-atlanta.jpg
3. Phoenix, Ariz.
Average annual net population inflow 2012-2016: 88,942
Average monthly homeowner costs: $1,445
Top out-of-state origin city: Los Angeles
NMN032919-phoenix.jpg
2. Dallas, Texas
Average annual net population inflow 2012-2016: 113,260
Average monthly homeowner costs: $1,651
Top out-of-state origin city: Los Angeles
NMN032919-dallas.jpg
1. Houston, Texas
Average annual net population inflow 2012-2016: 128,544
Average monthly homeowner costs: $1,649
Top out-of-state origin city: New York
NMN032919-houston.jpg
MORE FROM NATIONAL MORTGAGE NEWS