ATHERTON (CBS SF) – The communities in and around Silicon Valley continue to lead the nation in expensive real estate, being home to half of the 10 priciest zip codes in the nation.

Real estate website PropertyShark released its annual list of the nation’s 100 most expensive zip codes last week, with numbers based on closed sale prices.

READ MORE: SJSU Commends Coach, Athletic Director For Exposing Sex Abuser In Women's Athletic Dept.

Five of the nation’s top 10 priciest zip codes are in Santa Clara and San Mateo counties, including Atherton (94027), which topped the list with a median sale price of $6.7 million.

A wealthy enclave that is near major tech companies and home to several Silicon Valley titans, Atherton’s median sale price is higher than in 2017, when it was $4.95 million.

Town of Atherton sign. (CBS)

Town of Atherton sign. (CBS)

READ MORE: UPDATE: Alameda County Supes Debate Proposed Oakland A's Stadium Financing

Four other Silicon Valley zip codes were in the top 10, including Palo Alto’s 94301, Los Altos’ 94022, Portola Valley’s 94028 and Los Altos’ 94024. These zip codes all had a median sale price above $3 million.

Beyond the top 10, the Bay Area is home to nearly half of the nation’s 100 priciest zip codes, at 48. The state of California has 82 of the most expensive 100 zip codes in the country, by far eclipsing all other states.

San Francisco has nine pricey zip codes, tied with New York City with the most on the list. The city’s priciest zip code, 94123, was 40th on the list. Covering the Marina District and Cow Hollow, the median home price in the area was $2.075 million.

The most expensive zip code outside California is 11962, which covers Sagaponack, New York. With a median sale price of $5.5 million, it is the second most expensive community on the list.

MORE NEWS: East Palo Alto Residents on Edge Over Possible Placement of Convicted Sex Predator

Top 10 Priciest Zip Codes (Silicon Valley Zip Codes In Bold):

  1. 94027 – Atherton ($6.7 million)
  2. 11962 – Sagaponack, New York ($5.5 million)
  3. 02199 – Boston, Massachusetts ($4.77 million)
  4. 10013 – New York City ($3.81 million)
  5. 90402 – Santa Monica ($3.762 million)
  6. 94301 – Palo Alto ($3.755 million)
  7. 94022 – Los Altos ($3.5 million)
  8. 94028 – Portola Valley ($3.3 million)
  9. 94024 – Los Altos ($3.245 million)
  10. 33109 – Miami Beach, Florida ($3.25 million)