What’s it worth to live in a spot with solace? Consider the small capital of scotland – Duck, N.C., an evergrowing, upscale resort area from the Outer Banks region that has been voted one of “America’s Best Little Beach Towns” by Travel + Leisure. Four-bedroom homes in Duck are listed around $449,900, the real estate website. Then, head 530 miles north to Sagaponack, N.Y., on the list of country’s most exclusive beach towns, and also the median market price for the four-bedroom home jumps nearly tenfold to around $4.25 million.

In dollar terms, Sagaponack overshadows not only Duck but its peers. Using a median home valuation on about $3.49 million, this community, the location of lavish estates plus a 55-acre vineyard, would be the country’s costliest small town, in line with a new ranking by Zillow (Z) for Bloomberg Businessweek.

To compile this list, Zillow compared the median house values in December 2011, the most up-to-date data available, in places nationwide with populations small compared to 10,000. Overall, 4,972 places were considered. Because ranking considers only small towns, famous luxury communities including those who work in Beverly Hills, New York City, and Honolulu just weren’t included as a result of sized their populations.

Following Sagaponack-the No. 1 town for that third year within a row-are Jupiter Island, Fla. (that has a median home value of $2.61 million), Los Altos Hills, Calif. ($2.16 million), Water Mill, N.Y. ($2.08 million), and Belvedere, Calif. ($1.92 million).

Multimillion-dollar abodes make moving into Sagaponack extra, especially since it’s mostly an extra housing: The U.S. Census Bureau estimates that 71.3 percent of homes from the village are for seasonal or occasional use. (Water Mill and Jupiter Island have a notable percentage of seasonal homes too, 60.5 percent and 35.8 percent, respectively.) Sagaponack’s wealth just isn’t unusual in your community, containing long been a destination for affluent New Yorkers. Long Island could even consider the country’s hub for posh communities, with nine of the 20 most costly small towns within the ranking found in Nassau and Suffolk counties.

[Also see: The location where the 'One Percent' Live]

Luxury home markets have performed much better than average from the housing slump, but even they’ve dipped slightly. The median home value inside the 20 priciest small towns saw the average drop of 3 percent in December at a year earlier, in accordance with Zillow’s data.

The median home value in Sagaponack in December dropped by 10.2 percent from $3.87 million a year earlier. The discount won’t make Sagaponack any less exclusive, but it’s almost enough to get a considerable beach home in Duck.