That threshold can look very different from one city to the next. For instance, someone in Atlanta only needs to earn about $40,000 to afford a monthly mortgage payment — one of the most affordable cities on the list. But someone trying to buy a house in Washington, D.C., would need to earn twice as much. In San Francisco, they would need to earn four times as much.

AD

AD

Analysts calculated how much homeowners need to earn each year so that the monthly mortgage payments for the median-priced home — including the principal, interest, taxes and insurance — would take up no more than 28 percent of their monthly gross income. (Financial advisers generally recommend that housing costs take up no more than a third of your pay.) The study also assumed that home buyers gave a 20 percent down payment.

To make matters more difficult, as home prices rise, the salary needed to afford a home is rising too. (And in many cities, those home prices are growing much faster than wages.) The average salary needed to afford a home this year is up 5 percent from 2014, when consumers needed a salary of $50,211 to afford the median-priced home of $212,000.

Home buyers across the country may have noticed a similar trend as home prices have increased, says Keith Gumbinger, vice president of HSH.com. Home values rose at a faster clip in some parts of the country where there aren’t as many homes for sale, Gumbinger says.

AD

AD

For instance, home buyers in Denver now need to earn $72,847 a year to afford the home worth the median $394,400 — up from the $63,664 salary needed in 2014, when the median home value was $316,300. In San Francisco, home buyers now need to earn at least $161,947 to afford the median-priced home, up from $150,511 in 2014.

“It’s a good time to buy a house in theory,” says Svenja Gudell, chief economist at Zillow, a real estate listing website. “But practically, it’s very hard actually getting there.”

Higher home prices, rising rental costs and a shortage of affordable homes may have some renters feeling like home ownership is increasingly out of reach, Gudell says.

AD

Renters’ confidence in their ability to buy a home has dropped over the last two years, according to a report from Zillow released last week. Only 38 percent of renters said it was a good time to buy a home in July, down from 47 percent in January 2014.

AD

Figuring out exactly how much to save for a down payment will depend on a few factors. Not all home buyers need to make a 20 percent down payment, but they should be aware of the trade-offs, Gumbinger says.

People who make smaller down payments typically need to pay mortgage insurance, which increases their monthly housing costs and slightly raises the salary they need to comfortably afford their homes, Gumbinger said.

Dig deeper: Housing + Personal finance

AD

Buying a house is one of biggest financial decisions a person could make. Need some help? Check out our curated list of stories below.

Many home buyers go with the first mortgage offer they get, but it’s important to shop around for the best interest rate.

AD

In a competitive market, prospective buyers with a tight budget will need to be strategic to win a home.

As home prices rise, so does the salary needed to buy them. Unfortunately, home prices are growing faster than wages in many cities.