After four months of declines, existing home sales stabilized in June as housing inventory modestly improved, according to the National Association of Realtors (NAR). However, the median existing home price in June remained elevated and was the second-highest on record.

Total existing home sales, including single-family homes, townhomes, condominiums and co-ops, increased 1.4% to a seasonally adjusted annual rate of 5.86 million in June. On a year-over-year basis, sales were 22.9% higher than a year ago.

The first-time buyer share remained at 31% in June, level with May but down 35% from a year ago. The June inventory level increased from 1.21 to 1.25 million units but is still down from 1.54 million units a year ago.

At the current sales rate, the June unsold inventory sit at a 2.6-month supply, slightly up from May’s 2.5-month but still down from 3.9-month a year ago. This low level supply of resale homes is good news for home construction.

Homes stayed on the market for an average of just 17 days in June, an all-time low, unchanged from May and down from 24 days a year ago. In June, 89% of homes sold were on the market for less than a month.

The June all-cash sales share was 23% of transactions, even with last month and up from 16% a year ago.

Tight supply continues to push up home prices. The June median sales price of all existing homes was $363,300, up 23.4% from a year ago, representing the 112nd consecutive month of year-over-year increases. The median existing condominium/co-op price of $311,600 in June was up 19.1% from a year ago.

Geographically, three of four regions saw an increase in existing home sales in June, ranging from 1.7% in the West to 3.1% in the Midwest. Sales in the South remained flat in June. On a year-over-year basis, sales continued to grow by double-digits in all four regions, ranging from 18.8% in the Midwest to 45.1% in the Northeast.

Meanwhile, the Pending Home Sales Index (PHSI), also reported by the NAR, is a forward-looking indicator based on signed contracts. The PHSI rose 8.0% from 106.2 to 114.7 in May. On a year-over-year basis, sales were 13.7% higher than a year ago.

Though consumers are facing higher home prices and declining housing affordability, housing demand is expected to remain solid due to historically favorable mortgage rates and a promising economic outlook. Meanwhile, rising material prices and supply chain shortage are limiting builders’ abilities to meet the increased level of demand. The imbalance between housing supply and demand could hamper future sales by driving up house prices and eroding affordability.