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
Denver, Colorado City Hall with Colorful Fall Leaves and the Rocky Mountains in the Background
jzehnder - stock.adobe.com

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
littleny - stock.adobe.com

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
Orlando skyline fom lake Eola in Florida USA
TONO BALAGUER/lunamarina - Fotolia

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
View of colorful San Francisco row homes looking down a steep city street
Andy Konieczny/Focqus, LLC - stock.adobe.com

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
Old Post Office Pavilion
Zack Frank - stock.adobe.com

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
Evening light on on distant mountains and the city of Riverside, from Mount Rubidoux Park, in Riverside, California.
jonbilous - stock.adobe.com

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
Seattle waterfront during the summer
stepheng101 - Fotolia

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
aerial of town and beach of Miami Beach
travelview - stock.adobe.com

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
Aerial image of sports arenas at Downtown Atlanta GA
Felix Mizioznikov - stock.adobe.com

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
Jonathan Ross/jdross75 - stock.adobe.com

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
dallas; texas; city; urban; skyline; buildings; skyscrapers; metropolitan; cityscape; aerial view; sunny; clouds; offices; landscape; mirrored
Wendell "Stretch" Clendennen/balloondude - Fotolia

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
Ryan Conine - stock.adobe.com
MORE FROM NATIONAL MORTGAGE NEWS