But they aren’t buying in the cities they’ve called home for over a decade. While millennials still prefer to rent in urban centers, those who want to own a home are packing their bags and moving — largely to the suburbs — when the time comes, according to an NAR report.

It’s not lifestyle choice that’s driving buyers from big cities, says Susan Wachter, a professor of real estate at the Wharton School of the University of Pennsylvania. It’s a matter of affordability.

“You can’t necessarily become a homeowner and live in Manhattan,” she says. “Millennials, in general, are moving where they still have the ability to buy.”

When we crunched the numbers for this year’s Best Places to Live ranking, we (as always) valued locales with good schools, flourishing economies, vibrant communities, and low crime. We teamed up with realtor.com to leverage its knowledge of housing markets throughout the country. We sought out diversity, taking note of the economic and cultural benefits it gives a community. And we added a new metric that directly compares home prices with income—emphasizing the kind of balance that makes a community a good fit for working families.

As you’ll see, the top 50 spots are not filled with New Yorks and San Franciscos, even though we considered any U.S. city with a population of 50,000 or greater. As it turns out, the best places to find a job, buy a house, and settle down are large suburbs or small cities where the cost of living is proportional to income.

Take, for example, this year’s top spot: Frisco, Texas. What was once a tiny rail town had become the fastest-growing city in the U.S. by mid-2017, according to the Census Bureau. While there’s a lot to love about Frisco, part of its appeal is the city’s relatively low cost of living compared with its higher incomes and booming job growth. A typical Frisco family could pay off a new home in less than half the time it would take a Bostonian one to do so.

Frisco has company: A recent Census report shows that, while overall mobility is down and growth is slowing in the Northeast, the population in parts of the South and West is booming. In 2017, 10 of the 15 fastest-growing cities were in Southern states, with seven in Texas alone. “These are states where job growth is rapid,” Wachter explains. “The only difference is housing prices are not increasing.”

Of course, we all have different values, and Frisco won’t be the perfect fit for everyone. If you’re considering a move, we hope this ranking, filled with towns and cities that offer jobs, affordable living, and community, give you the tools you need to find your perfect place.