BOSTON (SHNS) – Even as the number of sales declined on a year-over-year basis, the median sale price for a single-family home in Massachusetts set another record in May as prospective buyers compete fiercely for a limited number of homes, real estate market analysts at The Warren Group said Tuesday.

There were 4,788 single-family homes sold in Massachusetts during May, a 7.3 percent decrease from the 5,165 transactions recorded in May 2021. Meanwhile, the median sale price climbed 12.4 percent on a year-over-year basis to $590,000 last month — which The Warren Group said represents a new all-time high for single-family homes since it began tracking sales in 1987.

“I might sound like a bit of a broken record announcing that the median single-family home price reached yet another new all-time high, but it’s truly indicative of current market conditions,” Warren Group CEO Tim Warren said. “The balance between supply and demand has been way out of sync for some time, and this is the manifestation of that imbalance. To cope, many buyers are setting their sights on markets further and further from major hubs – and even outside of Massachusetts.”

Low inventory has plagued the real estate market in Massachusetts for years, contributing to sky-high prices as buyers become willing to pay more and more for the limited number of homes that go on the market. And there are not very many new homes coming into the pipeline. There were 1,960 permits issued in Massachusetts for new privately-owned housing units in April, the most recent month with data available from the U.S. Census Bureau.

So far this year, there have been 6,534 such permits issued in Massachusetts, though a permit does not guarantee that the housing will be built. Through the first five months of 2022, there were 18,371 single-family homes sold in Massachusetts, a 10.1 percent drop from the same period of 2021, The Warren Group said. Over the same time, the year-to-date median sale price has increased 10.4 percent to $530,000.