For the first time, the median price of a home in a U.S. metro area passed the $1 million mark. A typical home in the San Jose, California area sold in the second quarter of 2016 for $1,085,000, more than four times the national median home price of $240,700.

Housing prices vary considerably between metro areas. To determine the most and least expensive housing markets, 24/7 Wall St. reviewed median single-family home prices from the National Association of Realtors. In contrast to San Jose-Sunnyvale-Santa Clara, California the least expensive U.S. housing market is Youngstown-Warren-Boardman, located on the border between Ohio and Pennsylvania, with a median home price of only $85,400.

Housing prices tend to correlate with an area’s median household income. Not only is San Jose the most expensive U.S. housing market, but it also has the highest median household income, at $96,481 a year. Incomes are almost always higher in areas with relatively expensive housing, while the opposite tends to be true in the least expensive markets.

Although incomes tend to be higher in expensive housing markets, homes are considerably less affordable in these markets. Nationwide, the median household income is more than enough to qualify for a mortgage to purchase a typical home. In the San Jose region, by contrast, a household would need to earn more than double the median income in the area to qualify for a loan on a typical home. With a 20% down payment, a minimum annual income of $198,355 is needed to qualify for a mortgage on a typical San Jose area home.

By contrast, while the median household income in Youngstown is only $42,228 annually, a typical home is considerably more affordable. With a 20% down payment, an area household earning just $15,612 a year could qualify for a loan. This means that a person earning minimum wage in the area could afford to purchase a home.

Because owning a home in the cheapest markets is much easier, homeownership rates tend to be higher in these areas. Homeownership rates are higher than the national rate in 24 of the 25 cheapest markets. The opposite is true in expensive markets, with the homeownership rates lower than the national rate in the majority of areas.

To identify the most and least expensive housing markets, 24/7 Wall St. reviewed median single-family home prices in the second quarter of 2016 as released by the National Association of Realtors. Qualifying incomes assuming a 20% down payment for metro areas are also from the NAR for the same time period. Median household incomes and homeownership rates are from the U.S. Census Bureau’s 2014 American Community Survey. We calculated monthly mortgage payments using a 3.9% interest rate and assuming a 20% down payment — the same measures used by the NAR to compare housing affordability at the metro area level.