By many measures, the economy has improved since the Great Recession, but home ownership is still out of reach for many Americans because they simply don’t earn enough.

Americans still need to earn more than the national median income in 11 of 27 major metropolitan areas to afford a home, according to HSH.com, the Riverdale, N.J.-based mortgage-information firm. It’s a situation that’s improving, albeit slowly. Homeownership became more affordable in 26 out of 27 metro areas in the fourth quarter versus the previous quarter. The Tampa-St. Petersburg, Fla. metro area being one sizable exception: That area became 10% less affordable quarter over quarter.

On a national scale, with a 20% down payment for a 30-year mortgage, a house buyer would have needed to earn a median annual income of $48,604 to afford a median priced home in the fourth quarter of last year for a median priced home worth $208,700, the HSH.com report found. Although the median household income was $54,417 in December 2014 — according to Sentier Research, a group that tracks household income — this is still not enough to buy a house in those 11 areas, including Sacramento, Miami, Portland and Denver.

HSH.com took the median home price data from the National Association of Realtors, the industry group, subtracted a 20% down payment, and calculated the amount house buyers would need to earn using the 28% and 36% mortgage qualification ratios from Fannie Mae and Freddie Mac for the median gross income. (Most lenders want a buyer’s debts — credit cards, student loans, alimony, child support, car loans and housing expenses — to be less than 30% to 40% of monthly gross income.)

Read: Sales of $50 million U.S. homes surged in 2014

The Pittsburgh metro area required the lowest median income ($31,716 for a median home worth $135,000), followed by Cleveland ($32,010 income), St. Louis ($33,324 income), Cincinnati ($33,485 income) and Detroit ($33,485 income). “Land prices in Los Angeles will not fall substantially relative to Pittsburgh, unless the latter can find a method to import mild weather and sunsets over the Pacific,” says Stuart Gabriel, director of UCLA’s Richard S. Ziman Center for Real Estate.

The salary you must earn to buy a home in 27 metro areas

1. Pittsburgh $31,716.32 2. Cleveland $32,010.41 3. St. Louis $33,323.09 4. Cincinnati $33,485.23 5. Detroit $35,521.47 6. Atlanta $35,800.11 7. Tampa $37,732.20 8. Phoenix $40,658.08 9. Orlando $42,143.30 10. San Antonio $45,374.30 11. Minneapolis $47,626.53 12. Dallas $48,786.53 13. Houston $49,983.37 14. Philadelphia $50,914.04 15. Baltimore $52,661.96 16. Chicago $54,346.62 17. Sacramento $58,412.49 18. Miami $58,431.48 19. Portland $60,603.50 20. Denver $61,642.15 21. Seattle $72,844.31 22. Washington $77,394.82 23. Boston $80,049.93 24. New York $87,535.60 25. Los Angeles $89,664.86 26. San Diego $95,432.68 27. San Francisco $142,448.33 HSH.com

San Francisco was the least affordable metro area (requiring a $142,448 median income for a median home price of $742,900), followed by San Diego (requiring a $95,433 median income), Los Angeles ($89,665 income), New York metro area ($87,536 income) and Boston ($80,049 income). The New York metro area includes Long Island, parts of New Jersey and the Hudson Valley. “California markets continue to dominate in terms of lack of affordability,” says Keith Gumbinger, vice president of HSH.com.

This is backed up by similar research. Nationally, 59% of homes for sale are within reach of the middle class, compared with 62% last October, according to a report released last November by Jed Kolko, chief economist of real estate website Trulia. He defined middle class as those with the median household income for each metro area. Dayton, Ohio, was No. 1 on that list of affordability (with 85% of homes affordable for the middle class) and San Francisco was the least affordable (15% of homes were affordable for the middle class).

Read: Half of Americans can’t afford their house