If you live in Pittsburgh or Detroit, it's possible to afford to afford a home while earning $40,000 and not go broke.
But if you reside in San Francisco, you'd have to earn more than five times that — over $200,000 — to be able to comfortably purchase a house.
Using the National Association of Realtor's quarterly Metropolitan Median Area Prices and Affordability and Housing Affordability Index from the second quarter of 2017, CNBC identified the 10 U.S. cities where you need to earn over $100,000 to afford to buy a house with a 5 percent down payment. The data assumes a 4 percent mortgage rate for all areas and a monthly principal and interest payment limited to 25 percent of a resident's income.
It's important to note that the more you put down, the lower your monthly payment will be, so if you're able to come up with a 20 percent down payment, the property becomes easier to afford.
Below, check out 10 places where your household income must exceed $100,000 to afford to buy a single-family home.