In the nation’s priciest areas, you’ll need to be in the top 20% to 30% of household earners to afford a median-priced home, according to a new study.  Researchers evaluated how much income households need to qualify for a mortgage on a median-priced home in 35 of the largest cities in the U.S. They factored in a 20% down payment, a mortgage rate of 4.5%, and a 30-year fixed-rate mortgage.

The top three most accessible housing markets in the U.S., where median-priced homes are affordable to 80% of the residents, according to the study, are:

  • Detroit: A median-priced home of $85,000 could be purchased with an income of $14,772.

  • Columbus, Ohio: A $157,000 median-priced home requires a $27,276 income.

  • Oklahoma City: The area’s median $170,000 home could be purchased with a $29,544 income.

On the other hand, the least affordable cities tended to be in California. San Francisco topped Zoocasa’s list, with a median home price of $1,418,500, which requires buyers to have an income of $246,432 to buy a home. In San Jose, Calif., buyers would need an income of $177,204 to buy a $1,020,000 median priced home. Buyers in Los Angeles would need to earn $147,672 to buy a median priced home of $850,000.  To buy a home in Salt Lake City, Utah, buyers would need an income of $59,388 to buy a $340,000 median priced home.