Many companies featured on Money advertise with us. Opinions are our own, but compensation and
in-depth research may determine where and how companies appear. Learn more about how we make money.

San Francisco, California
Geri Lavrov—Getty Images

Looking to buy a home in a big city? You're also going to need a big salary.

A new report from mortgage publisher HSH.com calculated the amount you'd need to earn to afford a home in 50 major U.S. cities. San Francisco predictably topped the list, with average home prices over $780,000. Pittsburgh, however, ranked as the most affordable metro area on the list for homeowners, who would only need to make about $31,134 to buy in Steel City.

Before you decide you can afford to buy in your dream city, bear in mind that HSH.com only calculated the base cost of owning a home with a 30-year, fixed-rate mortgage: It doesn't take into account any of the potentially unexpected costs like maintenance and repairs that will likely occur along the way. That being said, here's what you would need to make to buy a house in the 10 cities with the most expensive real estate prices:

10. Miami
Median home price: $286,000
Average monthly payment: $1,471.12
Salary needed: $63,048.07

9. Portland
Median home price: $318,800
Average monthly payment: $1,538.07
Salary needed: $65,917.47

8. Denver
Median home price: $353,500
Average monthly payment: $1,596.85
Salary needed: $68,436.22

7. Seattle
Median home price: $385,300
Average monthly payment: $1,829.91
Salary needed: $78,424.93

6. Washington, D.C.
Median home price: $371,600
Average monthly payment: $1,834.60
Salary needed:$78,625.71

5. Boston
Median home price: $393,600
Average monthly payment: $1,940.20
Salary needed: $83,151.43

4. New York City
Median home price: $384,600
Average monthly payment: $2,024.64
Salary needed: $86,770.19

3. Los Angeles
Median home price: $481,900
Average monthly payment: $2,217.60
Salary needed: $95,040.20

2. San Diego
Median home price: $546,800
Average monthly payment: $2,407.18
Salary needed: $103,164.96

1. San Francisco
Median home price: $781,600
Average monthly payment: $3,453.24
Salary needed: $147,996.19