Many people define the American dream as owning your own home, not to mention a comfortable lifestyle, healthy children, and a secure retirement. But the ability to afford a home—let alone all those other things—depends entirely on where you live and your level of income. This makes apples-to-apples comparisons across the country extremely difficult. How can you easily compare real estate locations and income levels for the entire population? Take a look at our new map to find out.

Buy this Visualization

Our viz experts took a unique and creative approach to modeling the data. We started first by taking data from the U.S. Census Bureau to find out the median income for people in 98 of the biggest cities in the U.S. Using a 40-hour work week as the standard, we calculated an average hourly rate. This levels the playing field between all the different types of jobs in the country (some people make a salary, others are paid by the hour).

Next, thanks to Zillow, we figured out the median housing price for each city and determined a monthly mortgage payment. Most people take out a 30-year loan, so that’s what we used too. Finally, we compared the two numbers to see how long you’d have to work to make that mortgage payment each month. We color-coded and mapped the results in 3-D, revealing a couple of key insights into the housing market and income inequality in the U.S.

The red bars represent places where you have to work the most hours to keep the roof over your head. In cities like New York, Los Angeles, Miami, and San Francisco, you put in more than 100 hours to make enough money just to pay for housing. That’s longer than two-and-a-half weeks, meaning well over 50% of your take-home pay! Not surprisingly, unaffordable places are all located on the either coastline. In fact, 8 of the 10 most expensive places are all located in California.

Top 10 Cities Where you Have to Work the Most Hours to Afford a Home

1. New York, NY - 113 hours

2. Los Angeles, CA - 112 hours

3. Miami, FL - 109 hours

4. San Francisco, CA - 107 hours

5. Boston, MA - 95 hours

6. Oakland, CA - 83 hours

7. Long Beach, CA - 78 hours

8. San Diego, CA - 77 hours

9. Santa Ana, CA - 74 hours

10. San Jose, CA - 74 hours

Although most of the expensive places to live are concentrated on the coasts, you can find affordable housing almost anywhere else in the country. The best places tend to be old manufacturing cities like Toledo, OH and Memphis, TN (17 and 18 hours, respectively). That’s right—you don’t need to work past lunch on Wednesday to earn enough money to make a mortgage payment in the Midwest. That’s an incredible standard of living.

Check our data & calculations here.