Skyrocketing home prices in Detroit may skew people’s perceptions of how affordable the city still is.

Last week, real estate brokerage Redfin released a report on how affordable it is to buy homes in major markets in the United States. For middle-class buyers, it found that Detroit is the most affordable city in the country.

The Seattle-based brokerage estimated that to afford a “typical” Detroit home, a family would need to make $26,690 per year. The median income in Detroit is a little over $30,000. The median sale price for homes in July 2019 was $142,750.

The other most affordable cities in the country were Rochester, New York; Dayton, Ohio; Buffalo, New York; and Pittsburgh, Pennsylvania.

Overall, according to Redfin, home prices are still relatively affordable in most American cities. “In 68 of the 88 most populous U.S. metros, a median-priced home is affordable on a median household income,” the report says.

“People who live in places like Detroit, Pittsburgh, and Cleveland tend to earn lower salaries than people in expensive coastal areas, but in many ways the midwesterners’ quality of life is better,” Redfin chief economist Daryl Fairweather said. “Even though they may make less money, it’s easier to purchase a home and build equity while providing for a family.”

What’s true in the Midwest is not true in California. The six least affordable cities in the country are all in the west coast state.

In San Francisco, America’s least affordable city, the minimum suggested yearly income to afford a median-priced home is $265,499. But the median income there is only $92,714. And the median sale price for homes in San Francisco was a staggering $1.42 million.