Buying a home used to be part of the American dream. It lets you build equity over the years, gives you a significant financial asset, and provides a pride of ownership or investment in the surrounding community. The problem is that in some metro areas, workers must earn hundreds of thousands of dollars to afford an average-sized home.

We found the numbers behind our latest map from HSH.com, one of the largest publishers of consumer and mortgage information in the country. HSH focused on the 50 most populous metro areas in the country, and figured out the price of the median home for sale. They then calculated monthly principal, interest, property tax and insurance payments buyers have to pay for a 30-year fixed rate mortgage. To keep things simple, they determined what salary would be needed to afford each home using the 28 percent “front-end” debt ratio, meaning the total housing payment could not make up more than 28% of gross income. They also assumed a 20% down payment. We mapped the resulting needed annual salary as a spike on a geographic outline for the metro area.

Top 10 Metro Areas Where You Need to Earn the Most to Afford a Median-priced House

1. San Jose, CA: $274,623

2. San Francisco, CA: $213,727

3. San Diego, CA: $130,986

4. Los Angeles, CA: $114,908

5. Boston, MA: $109,411

6. Seattle, WA: $109,275

7. New York City, NY: $103,235

8. Washington, DC: $96,144

9. Denver, CO: $93,263

10. Portland, OR: $85,369

Our map reveals three tiers in annual income workers need to earn to afford a median home. First, the West Coast stands out as by far the most expensive market in the country, with 4 out of the top 4 markets in California alone. San Jose, CA is easily the most expensive; workers need to make well over a quarter million dollars to afford a median-priced home. San Francisco is not far behind at $213,727, followed by San Diego much further down at $130,986. These numbers indicate the extent to which Silicon Valley has created a massive increase in property values.

The second tier of expensive locales is along the East Coast, led by the familiar hotspots of unaffordable housing like Boston, MA ($109,411), New York City, NY ($103,235) and Washington, DC ($96,144). But there are also other expensive metro areas located along the Atlantic Coast as well, such as Miami, FL ($78,337) and Providence, RI ($75,808). It’s clearly expensive to live somewhere close to an ocean.

The third and final tier of metros where workers don’t need to earn 6-figure salaries stretches across the country’s midsection. Ranging from Minneapolis, MN ($63,962) down to New Orleans, LA ($49,249), there are several metro areas with plenty of relatively cheap housing. A couple of old Rust Belt metros round out the bottom of the list in Cleveland, OH ($39,730) and Pittsburgh, PA ($38,253).

There is one more interesting and overarching trend\ worth noting on our map. Median household income across the US recently reached a record high of $61,400, which is great news for workers. The bad news is that isn’t enough to afford a typical house in 25 out of the 50 metro areas on our map. Granted, workers in metro areas tend to make more than their rural counterparts, but there is no doubt a real concern about affordable housing in certain urban areas.

Want to find out more about the true cost of living in the US? Check out this interactive tool.