The cost of living in America varies wildly.

In Cleveland, people need a base salary of at least $19,435 a year to afford the average home, while San Franciscans must make upward of $115,000 annually.

HSH.com, an online mortgage and consumer loan information website, figured out how much a person would have to earn to afford a home in 25 of the country's largest metropolitan areas.

To do so, HSH looked at the National Association of Realtors' fourth-quarter data for median home prices and HSH.com's fourth-quarter average interest rate for 30-year, fixed-rate mortgages to determine how much money homebuyers would need to earn in order to afford only the principal and interest payment on a median-priced home in their market. (They did not account for property taxes, insurance, and other expenses — read their methodology here.)