America's 20 most expensive ZIP codes

PropertyShark analysis found that the highest median sales price for a home is in Sagaponack, New York.

If you think it's expensive living in Silicon Valley or Beverly Hills, try buying a place in Sagaponack, New York.

The median sales price for a home in the tony Hamptons village is more than $5.1 million, making it the most expensive ZIP code in the U.S. when it comes to real estate, according to PropertyShark.

The analysis, which looked at median prices for homes that sold between January 2014 and May 2015, found the Eastern Long Island town was followed by Atherton, California, in Silicon Valley, and then Beverly Hills.

(Read more: The problem with million-dollar Hamptons rentals)

In total, California claimed four of the top five spots, and 14 of the top 20. New York claimed all the other top ZIP codes, with the exception of Miami Beach, Florida, which came in ninth.

The median sales prices for the top 20 ZIP codes were all higher than $2 million, with each of the top 10 coming in at or above $2.6 million—about 10 times the national average median home price, according to the U.S. Census Bureau.

See below for the full list.

20. ZIP CODE: 91108

City: San Marino, CA
Median sale price: $2,134,000
Number of sales: 228

Pictured: The ZIP code's most expensive home for sale is this 10,000-square-foot 7-bedroom, 7-bathroom house on a 2-acre lot, on the market at $17 million.

19. ZIP CODE: 90272

City: Pacific Palisades, CA
Median sale price: $2,240,000
Number of sales: 621

Pictured: The ZIP code's most expensive home for sale is this 5,500-square-foot 5-bedroom, 7-bathroom house on a 1-acre lot, on the market at $25 million.

18. ZIP CODE: 92661

City: Newport Beach, CA
Median sale price: $2,300,000
Number of sales: 92

Pictured: The ZIP code's most expensive home is this 4,000-square-foot 4-bedroom, 4-bathroom house on an 8,000-square-foot lot, on the market at $24 million.

17. ZIP CODE: 94024

City: Los Altos, CA
Median sale price: $2,302,500
Number of sales: 368

Pictured: The ZIP code's most expensive home for sale is this 16,700-square-foot 8-bedroom, 11-bathroom house on a nearly 6-acre lot, on the market at $24 million.

16. ZIP CODE: 11976

City: Water Mill, NY
Median sale price: $2,337,500
Number of sales: 146

Pictured: The ZIP code's most expensive home for sale is this 22,000-square-foot 11-bedroom, 13-bathroom house on a 15-acre lot, on the market at $85 million.

15. ZIP CODE: 92657

City: Newport Coast, CA
Median sale price: $2,349,500
Number of sales: 274

Pictured: The ZIP code's most expensive home for sale is this 13,500-square-foot 7-bedroom, 11-bathroom house on a three-quarter-acre lot, on the market at $37 million.

14. ZIP CODE: 92067

City: Rancho Santa Fe, CA
Median sale price: $2,350,000
Number of sales: 211

Pictured: The ZIP code's most expensive home for sale is this 16,000-square-foot 9-bedroom, 12-bathroom house on an 8-acre lot, on the market at $21.5 million.

13. ZIP CODE: 10282

City: New York, NY
Median sale price: $2,400,000
Number of sales: 30

Pictured: The ZIP code's most expensive home for sale is this 4,400-square-foot 5-bedroom, 9-bathroom condo, on the market at $13.9 million.

12. ZIP CODE: 93108

City: Santa Barbara, CA
Median sale price: $2,400,000
Number of sales: 233

Pictured: The ZIP code's most expensive home for sale is this 30,000-square-foot 12-bedroom, 12-bathroom house on a 240-acre lot, on the market at $125 million.

11. ZIP CODE: 94028

City: Portola Valley, CA
Median sale price: $2,450,000
Number of sales: 93

Pictured: The ZIP code's most expensive home for sale is this 4,100-square-foot 5-bedroom, 5-bathroom house on a 4-acre lot, on the market at $6.5 million.

10. ZIP CODE: 94022

City: Los Altos, CA
Median sale price: $2,600,000
Number of sales: 392

Pictured: The ZIP code's most expensive home for sale is this 8,200-square-foot 5-bedroom, 7-bathroom house on a 1.2-acre lot, on the market at $13.9 million.

9. ZIP CODE: 33109

City: Miami Beach, FL
Median sale price: $2,650,000
Number of sales: 57

Pictured: The ZIP code's most expensive home for sale is this 7,600-square-foot 5-bedroom, 7-bathroom condo, on the market at $25 million.

8. ZIP CODE: 92662

City: Newport Beach, CA
Median sale price: $2,675,000
Number of sales: 28

Pictured: The ZIP code's most expensive home for sale is this 2,700-square-foot 4-bedroom, 4-bathroom house on a 2,600-square-foot lot, on the market at $6 million.

7. ZIP CODE: 10007

City: New York, NY
Median sale price: $2,763,711
Number of sales: 126

Pictured: The ZIP code's most expensive home for sale is this 6,300-square-foot 7-bedroom, 10-bathroom penthouse, on the market at $30 million.

6. ZIP CODE: 10013

City: New York, NY
Median sale price: $2,800,000
Number of sales: 431

Pictured: The ZIP code's most expensive home for sale is this 24,000-square-foot 7-bedroom, 7-bathroom townhouse, on the market at $65 million.

5. ZIP CODE: 94301

City: Palo Alto, CA
Median sale price: $2,827,500
Number of sales: 245

Pictured: The ZIP code's most expensive home for sale is this 4,500-square-foot 3-bedroom, 4-bathroom house on a quarter-acre lot, on the market at $9 million.

4. ZIP CODE: 90402

City: Santa Monica, CA
Median sale price: $3,062,250
Number of sales: 206

Pictured: The ZIP code's most expensive home for sale is this 9,300-square-foot 5-bedroom, 6-bathroom house on a half-acre lot, on the market at $20 million.

3. ZIP CODE: 90210

City: Beverly Hills, CA
Median sale price: $3,221,250
Number of sales: 578

Pictured: The ZIP code's most expensive home for sale is this 28,000-square-foot 11-bedroom, 18-bathroom house on a 1.5-acre lot, on the market at $72 million.

2. ZIP CODE: 94027

City: Atherton, CA
Median sale price: $5,050,000
Number of sales: 115

Pictured: The ZIP code's most expensive home for sale is this 9,000-square-foot 6-bedroom, 8-bathroom house on a 3-acre lot, on the market at $28 million.

1. ZIP CODE: 11962

City: Sagaponack, NY
Median sale price: $5,125,000
Number of sales: 30

Pictured: The ZIP code's most expensive home for sale is this 7,100-square-foot 7-bedroom, 9-bathroom house on a 2-acre lot, on the market at $22.9 million.

Rank

Zip code

Median sales price

Number of sales

City

1

11962

$5,125,000

30

Sagaponack, NY

2

94027

$5,050,000

115

Atherton, CA

3

90210

$3,221,250

578

Beverly Hills, CA

4

90402

$3,062,250

206

Santa Monica, CA

5

94301

$2,827,500

245

Palo Alto, CA

6

10013

$2,800,000

431

New York, NY

7

10007

$2,763,711

126

New York, NY

8

92662

$2,675,000

28

Newport Beach, CA

9

33109

$2,650,000

57

Miami Beach, FL

10

94022

$2,600,000

392

Los Altos, CA

11

94028

$2,450,000

93

Portola Valley, CA

12

93108

$2,400,000

233

Santa Barbara, CA

13

10282

$2,400,000

30

New York, NY

14

92067

$2,350,000

211

Rancho Santa Fe, CA

15

92657

$2,349,500

274

Newport Coast, CA

16

11976

$2,337,500

146

Water Mill, NY

17

94024

$2,302,500

368

Los Altos, CA

18

92661

$2,300,000

92

Newport Beach, CA

19

90272

$2,240,000

621

Pacific Palisades, CA

20

91108

$2,134,000

228

San Marino, CA

 

Our goal is to create a safe and engaging place for users to connect over interests and passions. In order to improve our community experience, we are temporarily suspending article commenting