This is the salary you need to afford to buy a home in NYC

The salary needed to afford a home in New York City is pretty steep, as you might expect.

Visual Capitalist used data from Home Sweet Home to analyze the salary one needs to earn in order to buy a home in America's 50 biggest metros.

According to the data, the median home price in the U.S. is around $370,000. That means the average person would need to earn around $76,500 to consider comfortably purchasing a home in the U.S.

How much you need to make to be happy living in NY

The data shows that New York City's median home price is $578,100 — and the salary needed to afford a home in the Big Apple comes in at $129,500.

There are fairly few stand-alone, single-family houses in New York City — only around 4,000 are ever on the market. People in the Big Apple tend to buy condominiums or multifamily units.

How much you need to make per hour to afford rent in NYC

The top four most expensive areas to live in the U.S. are all in California:

1. San Jose — The highest median home prices in the U.S. can be found in San Jose, where you'd need to earn around $337,000. The data revealed the monthly mortgage payment in San Jose for the median home is $7,718.

2. San Francisco

3. San Diego

4. Los Angeles

Rounding out the top 10 are:

5. Seattle

6. Boston

7. New York City

8. Denver

9. Austin

10. Washington, D.C.