Home prices hit a new record in June, even as home sales declined for the fifth straight month as lack of affordability continues to push buyers out of the market.

Iran PressAmerica: The median home price was $416,000 last month, up 13.4% from one year ago, according to a National Association of Realtors (NAR) report.

Sales of existing homes, single-family homes, townhomes, condominiums, and co-ops were down 5.4% in June from May and 14.2% from a year ago.

"Falling housing affordability continues to take a toll on potential homebuyers," said Lawrence Yun, NAR chief economist, adding: "Both mortgage rates and home prices have risen too sharply in a short span of time."

Inventory, which had been tight, saw its first turnaround in three years. The number of homes available for sale at the end of June was up 9.6% from May and 2.4% from a year ago.

"Finally, there are more homes on the market," said Yun. "Homes priced right are selling very quickly, but homes priced too high are deterring prospective buyers." 

208

Read More:

New poll says Americans’ view of economy, finances worsen

Biden tries to put inflation blame on Russia