Here's the salary you have to earn to buy a home in the biggest US cities

Barbara Eldredge, Curbed
San Francisco skyline
Marco Brivio | Getty Images

For many prospective homebuyers in the U.S., earning enough to pay for even an average-priced home can be a struggle (not to mention saving enough or a down payment). A new report from mortgage site backs up that assumption.

Median home prices rose in most of the country's 27 largest metro areas, even as incomes remained stagnant. Their analysis reveals just how much someone needs to earn in order to afford the interest, taxes, and insurance on a median-priced home.

Not surprisingly, the Rust Belt provides the best bargains. The most affordable city was Pittsburgh, requiring a salary of just $32,390.09 to afford a median-priced home of $140,500. Pittsburgh was followed by Cleveland ($34,433.95) and Cincinnati ($37,179.18).

More from Curbed:

These cities remained the most affordable despite substantial home price increases over the previous quarter. Cleveland's home prices went up 24 percent while Pittsburgh and Cincinnati's home prices went up 17 percent.

On the other end of the spectrum, high-demand coastal California cities like San Francisco and San Diego, required salaries of $161,947.60 and $109,440.97, respectively, to maintain a median-priced abode.

Only three cities in the report became more affordable: Tampa, Orlando, and Miami.

"Steadily improving local job markets and mortgage rates teetering close to all-time lows brought buyers out in force in many large and middle-tier cities," said Lawrence Yun, NAR chief economist. "However, with homebuilding activity still failing to keep up with demand and not enough current homeowners putting their home up for sale, prices continued their strong ascent – and in many markets at a rate well above income growth."