In a number of cities in America, you’ll need to earn well over the U.S. median income to afford an average home.

The average American needs to make a little over $51,000 a year to afford the median-priced home — including principal, interest, taxes and insurance — in the U.S., a study released this week by mortgage information website HSH.com. This assumes the buyer has good to excellent credit (and thus would get a mortgage interest rate — depending on location — of around 4%), put down 20% and would be spending no more than 28% of income on principal and interest.