If you're struggling to buy a home in San Francisco or New York, you may want to consider Dayton or Rochester.
Those are two of the U.S. cities where middle-class buyers are most likely to find an affordable home, according to a new report by the real-estate website Trulia.
In Trulia's map below, the bubbles represent the size of a metropolitan area's housing market. The colors represent the percentage of housing in that market that Trulia considers affordable to the middle class.
By Trulia's definition, a city is affordable if "the total monthly payment, including mortgage, insurance, and property taxes, is less than 31% of the metro area’s median household income." Thus, what's affordable varies from city to city.
In the U.S. as a whole, 59 percent of homes currently for sale are affordable to the middle class, down from 62 percent a year ago, according to the report.
"Homeownership is getting less affordable for the middle class," Trulia economist Jed Kolko said in an email. "Unless incomes increase substantially, homeownership will slip further beyond the reach of many households," he added in the report.
America's least-affordable markets are the coastal cities, while the most-affordable are clustered around the Great Lakes. Six of the ten least-affordable housing markets are in California, while three of the ten most affordable are in Ohio.
Here are the most-affordable markets:
And the least: