In the wake of reports that teachers are being dramatically priced out of the San Francisco area and that 45% of Manhattan homes are purchased in cash, sometimes you just have to wonder: Who can actually afford to buy a home?

Mortgage website HSH.com analyzed median home prices and interest rates for common 30-year, fixed-rate mortgages, as well as property taxes and insurance costs, to figure out how much money it would take to pay a home's mortgage principal, taxes, and insurance — and how much you would have to earn to afford it. You can check out its website for the full methodology.

While HSH's full list includes 27 metro areas in the United States, here we're presenting the data for 12 of the largest U.S. cities, ordered from lowest salary required to highest and rounded to the nearest $500. Note that they're calculating the salary needed to buy, which, if you're married or otherwise splitting the cost, may be your household income.

Can you afford to buy where you live?