When we think of places with high salaries, big metro areas like New York, Los Angeles or San Francisco are usually the first to spring to mind. Or cities with the biggest concentrations of educated workers, such as Boston.

But wages are just one part of the equation — high prices in those East and West Coast cities mean the fat paychecks aren’t necessarily getting the locals ahead. When cost of living is factored in, most of the places that boast the highest effective pay turn out to be in the less celebrated and less expensive middle part of the country. My colleague Mark Schill of Praxis Strategy Group and I looked at the average annual wages in the nation’s 51 largest metropolitan statistical areas and adjusted incomes by the cost of living. The results were surprising and revealing.

In first place is Houston, where the average annual wage in 2011 was $59,838, eighth highest in the nation. What puts Houston at the top of the list is the region’s relatively low cost of living, which includes such things as consumer prices and services, utilities and transportation costs and, most importantly, housing prices: The ratio of the median home price to median annual household income in Houston is only 2.9, remarkably low for such a dynamic urban region; in San Francisco a house goes for 6.7 times the median local household income. Adjusted for cost of living, the average Houston wage of $59,838 is worth $66,933, tops in the nation.

Most of the rest of the top 10 are relatively buoyant economies with relatively low costs of living. These include Dallas-Fort Worth (fifth), Charlotte, N.C. (sixth), Cincinnati (seventh), Austin, Texas (eighth), and Columbus, Ohio (10th). These areas all also have housing affordability rates below 3.0 except for Austin, which clocks in at 3.5. Similar situations down the list include such mid-sized cities as Nashville, (11th), St.Louis (12th), Pittsburgh, (13th), Denver (15th) and New Orleans (16th).

One major surprise is the metro area in third place: Detroit-Warren-Livonia, Mich. This can be explained by the relatively high wages paid in the resurgent auto industry and, as we have reported earlier, a huge surge in well-paying STEM (science, technology, engineering and math-related) jobs. Combine this with some of the most affordable housing in the nation and sizable reductions in unemployment — down 5% in Michigan over the past two years, the largest such drop in the nation. This longtime sad sack region has reason to feel hopeful.

Only two expensive metro areas made our top 10 list. One is Silicon Valley (San Jose-Sunnyvale-Santa Clara), where the average annual wage last year of $92,556, the highest in the nation, makes up for its high costs, which includes the worst housing affordability among the 51 metro areas we considered: housing prices are nearly 7 times the local median income. Adjusted for cost of living, that $92,556 paycheck is worth $61,581, placing the Valley second on our list.

In ninth place is Seattle, which placed first on our lists of the cities leading the way in manufacturing and STEM employment growth. Housing costs, while high, are far less than in most coastal California or northeast metropolitan areas.

What about the places we usually associate with high wages and success? The high pay is offset by exceedingly high costs. Brain-rich Boston has the fifth-highest income of America’s largest metro areas but its high housing and other costs drive it down to 32nd on our list. San Francisco ranks third in average pay at just under $70,000, some $20,000 below San Jose, but has equally high costs. As a result, the metro area ranks a meager 39th on our list.

Much the same can be said about New York which, like San Francisco, is home to many of the richest Americans and best-paying jobs. The average paycheck clocks in at $69,029, fourth-highest in the country, but high costs, particularly for housing, eat up much of the locals’ pay: adjusted for cost of living, the average salary is worth $44,605. As a result, the Big Apple and its environs rank only 41st on our list.

Long associated with glitz and glitter, Los Angeles does particularly poorly, coming in 46th on our list. The L.A. metro area may include Beverly Hills, Hollywood and Malibu, but it also is home to South-Central Los Angeles, East L.A. and small, struggling industrial cities surrounding downtown. The relatively modest average paycheck of $55,000 annually, 12th on our list, is eaten up by a cost of living that is well above the national average. This creates an unpleasant reality for many non-celebrity Angelenos.

Many of the metro areas that rank highly on our list have enjoyed rapid population growth and strong domestic in-migration. Houston, Dallas-Fort Worth, and Austin all have been among the leaders the nation in both domestic migration and overall growth both in the last decade and so far in this one. In the past year, for example, Dallas led the nation with 40,000 net migrants while Austin’s population growth, 4 percent, was the highest rate among the large metropolitan areas.

In contrast, many of the cities toward the bottom of our list — notably the Los Angeles and New York areas — have led the country in domestic outmigration. Between 2000 and 2009, the nation’s cultural capitals lost a total of over 3 million people to other parts of the country. Although migration has slowed in the recession, the pattern has continued since 2010.

And how about the future? Income and salary growth has been so tepid recently that few large cities can claim to have made big gains over the past five years; there has been continued volatility as some regions that did worst in the past decade — for example San Francisco — pick up steam. Unfortunately any growth in such highly regulated areas also tends to increase costs rapidly, particularly for housing. In California, this is made much worse by both soaring taxes and a regulatory regime that drives up costs faster than income games.

Similarly these high prices seem to have the effect of driving out middle-class workers; places like New York, Los Angeles and San Francisco have extraordinary concentrations of both rich and poor workers but fewer in the middle. As we pointed out in our annual job and STEM rankings, many technology, manufacturing and business service jobs are heading not to the hotspots but more to the central part of the country.

Over time, it seems clear that, for the most part, the best prospects for the future lie in places that both experience income and employment gains but remain relatively affordable. These include some cities that didn’t crack the top 10 of our list but appear to be gaining ground, such as Nashville, Pittsburgh, St. Louis, San Antonio and New Orleans, a once beleaguered city that has experienced the nation’s fastest per capita personal income growth since 2005.

Maintaining affordability and a wide range of high-paying jobs many not be as glamorous a metric for success as the number of hip web startups or the concentration of educated people. But over time it is likely to be about as good a guide to future prospects as we have.

Joel Kotkin is executive editor of NewGeography.com and is a distinguished presidential fellow in urban futures at Chapman University, and contributing editor to the City Journal in New York. He is author of The City: A Global History. His newest book is The Next Hundred Million: America in 2050, released in February, 2010.

This piece originally appeared in Forbes.

Houston photo by BigStockPhoto.com.

Note: The table below was updated with 2012 data, so it may not match the narrative above discussing 2011 data. Contact Mark Schill at mark@praxissg.com.