Thinking about buying a home? Good luck. Low housing supply is pushing home prices up across the country and mortgage rates are also starting to rise.

To avoid ending up house poor, here's how much you need to earn to afford a home in the most populous cities in the U.S., according to HSH.com.