Wealthy home buyers are quickly running out of mansions to buy.



While housing inventory is falling throughout the country, it's falling especially fast in some of the country's richest ZIP codes. A study from Altos Research, the Mountain View, Ca., real-estate research firm, found that inventory in the nation's 90 wealthiest ZIP codes fell 15 percent over the past year, slightly faster than the broader market.

But in the richest ZIP codes, inventory is down more than 50 percent. In a ZIP code in Carmel, Calif., inventory fell 76 percent over the past year. There were only four homes left on the market priced at $1 million or more as of the end of May, according to Altos.

In Palm Beach, Fla., the number of $1 million-plus homes has plunged by 70 percent, falling from 89 to 26. And in the Old Greenwich, Conn. ZIP code, there are only 10 homes left priced at $1 million or more, down 58 percent, according to Altos.

(Read More: $1 Million Hamptons Rentals on the Rise)

"I don't recall seeing the market like this, and it's come so quickly," said Cristina Condon of Sotheby's International Real Estate in Palm Beach. She said buyers have poured into the market in recent months, many from overseas. American buyers are also piling in—some from higher-tax states like California, lured by low taxes and still-low prices in Florida.