Here’s how much it costs to live in the most expensive ZIP code in New York

The income you need to afford a home in the biggest U.S. cities

It's no secret that living in New York can be expensive. The average price for a home is $384,900, compared to a national average of $268,500. Still, in the most expensive ZIP code in the Empire State, prices can go way higher.

That's according to financial website GOBankingRates, which collected median home values and mortgage data from Zillow, as well as Bureau of Labor Statistics-based cost of living components for 48 states and the District of Columbia, in order to identify the most expensive ZIP codes.

Their findings show that the most expensive ZIP code in New York may not be where you think. It's not among the bustling streets of Manhattan or the brownstones of Brooklyn. It's actually the 11976 ZIP code: The Hamptons.

How much more it costs to own vs. rent in your state

"The Hamptons are located on Long Island and are well-known for their wealthy residents and expensive homes," GOBankingRates notes. "You'll find 11976 in Water Mill, a hamlet in the town of Southampton."

To calculate exactly how much you'd need to earn to live there comfortably, GOBankingRates used the 50-30-20 budget rule: 50 percent of your income would be used to cover necessities, 30 percent is discretionary income and 20 percent is allocated to savings.

"Monthly costs were totaled and multiplied by 12 to get the annual dollar cost of necessities in each ZIP code, according to GOBankingRates. "This dollar amount for necessities was then doubled to find the actual annual income needed to live in the location."

Zillow Home Value Index for 11976. Data through Mar 31, 2018.

Based on that data, here's how much it costs to live in 11976:

  • Total annual necessities: $219,255
  • Total annual splurges: $131,553
  • Total annual savings: $87,702
  • Total income needed: $438,510

"Many ZIP codes require some serious paychecks to live there, while others only require an income slightly above the household median," GOBankingRates notes.

For 11976, the former is true. The median home value there is more than $3 million, up almost 11 percent over the past year, and it is predicted to rise even more within the next year.

If you're looking for a home, experts suggest making sure you're ready to transition from renting. Here are some tips to help you get started.

Like this story? Like CNBC Make It on Facebook!

Don't miss: 5 US states where you need to make about $100,000 to afford 'the average home'

Video by Andrea Kramar

Location alone won't determine if your home is a great investment, but this will