Where can the middle class afford to buy a home today? Affordability has worsened in the past year, as home prices have climbed faster than incomes and mortgage rates have risen. But compared with the longer-term past, homeownership still looks relatively affordable: home prices are still undervalued and mortgage rates remain near historic lows. In most U.S. markets, the majority of homes for sale are within reach of the middle class, and buying is cheaper than renting in all of the 100 largest metros.

However, in many markets, especially along the coasts, homeownership is out of reach for the middle class. Even having a college degree is no guarantee that homeownership is within reach in the priciest markets. There’s no easy way to make housing more affordable, though new construction can help.

As in our inaugural middle-class affordability report, we calculated the share of for-sale homes on Trulia that are affordable to a middle-class household, based on whether the total monthly payment – mortgage, insurance, and property taxes – was less than 31% of the metro area’s median household income. (See note below.) Because we define “middle class” separately for each metro based on the local median household income, our affordability measure takes into account that a middle-class income is higher in some markets than in others.

For instance, for a middle-class family in the Denver metro area, where median household income is just under $62,500, homes priced under $325,000 are within reach based on the 31% guideline. Of the homes listed for sale in Denver on May 6, 2014, 50% cost less than that – which means that half of Denver homes are within reach of the middle class.

Middle Class Getting Priced Out of California But Not Midwest

In 80 of the 100 largest U.S. metros, most of the homes for sale today are within reach of the middle class. In the most affordable housing markets, more than 80% of homes are within reach, with Akron topping the list at 86%. The 10 most affordable markets include eight in (or near) the Midwest, plus the southern markets of Columbia, SC, and Little Rock, AR. Five of the top 10 are in Ohio.

Seven of the 10 least affordable markets are in California, along with New York, neighboring Fairfield County, CT, and Honolulu. Only 14% of homes for sale in San Francisco are affordable to the middle class, even though median household income is higher in San Francisco than almost anywhere else in the country. In New York and in the coastal markets of southern California – Los Angeles, Orange County, Ventura County, and San Diego – less than one-third of homes are within reach of the middle class. Plus, in California especially, the share of homes within reach has fallen over the past year, as prices in the West have rebounded sharply.

Within the country’s two largest metro areas, there are local sub-markets that are as or more unaffordable as San Francisco. Within the Los Angeles metro area, just 13% of homes in the San Gabriel Valley (the 626 area code footprint) are within reach, and just 15% of homes on the west side (the 310 area code footprint). Within the New York metro area, only 12% of for-sale homes in Brooklyn are within reach, but Manhattan is in a league by itself, with just a sliver — 2.3% — of for-sale homes affordable to the middle class.

In Most Markets, Homeownership is Out of Reach for the Less Educated

Even within a local market, affordability depends on where you land in the income distribution; and how much education you have often shapes your income today and in the future. In fact, your education level can matter as much as where you live when it comes to whether you can afford to buy a home.

Nationally, if you randomly picked 10 adults, 4 would have a high school degree or less, 3 would have completed some college or an associate’s degree, 2 would have completed a bachelor’s degree, and 1 would have a graduate degree, give or take a few percentage points (see note below). Household income is strongly correlated with education. Median household income is $33,500 for households headed by someone with a high school degree or less, $49,300 with some college or an associate’s degree, $77,500 with a bachelor’s degree, and $100,000 with a graduate degree. (Note: this data reflects the income of the household overall, based on the educational attainment of the head of household.)

The table below shows affordability for selected housing markets based on the actual median incomes within each metro at different levels of education. Take the Washington, D.C., metro area as an example: for a high-school-or-less household, just 23% of homes for sale are affordable, compared with 75% for a bachelor’s-degree household and 83% for a graduate-degree household.

If the head of a household has a high school degree or less, fewer than 10% of homes for sale are affordable in San Francisco, New York, and Los Angeles. In 72 of the 100 largest metros, fewer than half of homes for sale are within reach of people with a high school degree or less, including relatively affordable markets like Phoenix, Chicago, and Atlanta. In the most expensive markets, many homes are out of reach of households with college or graduate degrees. San Francisco, as always, is the extreme: only 44% of homes for sale are within reach of graduate-degree households.

Why More Homes Aren’t Built in Expensive Markets

Why are some metros more affordable than others? Flashback to Econ 101 – it’s supply and demand. Demand is how much people are able and willing to pay to live in a place, which depends on how desirable and economically productive a place is. Some factors that affect demand – like a good climate or an educated workforce – change very slowly over time, while others – like an oil boom or dot-com bust – can change more swiftly.

Housing demand alone does not determine home prices. Supply is crucial, too. Home prices depend on whether construction keeps up with demand. For the same increase in housing demand, a market that builds less housing will see bigger price increases than one that builds more housing. Although the real world is a lot more complicated than that, a simple scatterplot makes the point: expensive markets build little housing. Every metro where the median price per foot is over $200 has added housing at an annual rate of no more than 10 new units per 1,000 existing units since 1990. Conversely, no metro that builds a lot of housing is expensive. Of course, many markets are inexpensive and build little, like Detroit, Cleveland, St. Louis, and the upstate New York metros of Buffalo, Rochester, and Syracuse – all of which have faced long-term economic challenges and relatively weak housing demand.

For America’s most expensive housing markets to become significantly more affordable, they would need either a spectacular drop in demand – a local economic collapse, for example – or a dramatic increase in housing supply. But in these markets, geography and regulations limit new construction. Coastal California, south Florida, and parts of the Northeast are hemmed in by oceans, mountains, or both – unlike large swathes of the Midwest and South. Furthermore, regulations like zoning, onerous approval processes, and high permitting costs hold back construction. It’s complicated to tease out whether geography or regulations matter more because geographically hemmed-in areas also tend to be more heavily regulated (see this academic paper for evidence). But short of filling in San Francisco Bay or paving over the Everglades, local governments have a lot more control over regulation than geography. So why don’t expensive cities relax regulations in order to build more?

The politics of building new housing in expensive markets are tricky. While expanding the housing supply would improve affordability, new construction can change the character of a place in many ways: more congestion; a different skyline; an influx of new residents who are richer, poorer, darker, or whiter than current residents; as well the inconvenience during construction itself. Furthermore, not everyone wants to improve affordability. Another name for “housing costs” is “property values,” and current homeowners and landlords want property values to stay high. The beneficiaries of improved affordability are renters (though less so if they’re already protected by rent regulations); people who are priced out of expensive markets and therefore live elsewhere; and future generations – who usually have less political power and influence than homeowners and landlords. Plus, even people who might benefit from greater affordability might care more about preserving the character of their neighborhood.

In all, today’s unaffordable markets are likely to stay unaffordable. A collapse in demand is nothing to wish for; geographic constraints are nearly impossible to change; and strong political forces make building regulations difficult to relax. Although some expensive metros, like San Francisco, New York, and Boston, are currently building more housing than in the recent past, and New York’s new mayor is pushing to increase construction further, it would take many years of construction activity at much higher than historic levels to make today’s least affordable metros more within reach of the middle class.

Note: The total monthly payment includes the mortgage payment assuming a 4.4% 30-year fixed rate mortgage (3.6% for the 2013 comparison) with 20% down, property taxes for that metro, and insurance. We chose 31% of income as the affordability cutoff to be consistent with government guidelines for affordability; both the Federal Housing Administration and the Home Affordable Modification Program use 31% of pre-tax income going toward monthly housing payments for assessing whether a home is within reach for a borrower. Note that the 43% debt-to-income rule for Qualified Mortgages is for total debt, not housing debt. Metro median income is from the 2012 American Community Survey, multiplied by 2013 year-over-year wage growth from the Bureau of Labor Statistics. We looked at all for-sale homes on Trulia on May 6, 2014, and May 6, 2013. Local building-permit data are from the U.S. Census Bureau.