Owning a house is less affordable for average earners in the U.S. than at any time in 17 years.

The costs of a typical home—including mortgage payments, property insurance and taxes—consumed 35.1% of the average wage in the second quarter, the highest share since 2007 and up from 32.1% a year earlier, according to a new report from Attom. 

Growth in expenses, along with mortgage rates hovering around 7%, have outpaced income gains as a persistent shortage of listings pushed the median home price to a record-high $360,000, Attom said. In more than a third of U.S. markets, ownership costs ate up 43% of average local wages, far above the 28% considered to be a guideline for affordability. 

The latest data “presents a clear challenge for home buyers,” Rob Barber, chief executive officer of Attom, said in a statement. “It’s common for these trends to intensify during the spring buying season when buyer demand increases. However, the trends this year are particularly challenging for house hunters.”

Pricey markets in the West and Northeast had the biggest declines in affordability, including Orange and Alameda counties in California, and Brooklyn and Nassau County in New York.

Among the 589 counties analyzed, 582, or 98.8%, were less affordable in the second quarter than their historic affordability averages, Attom said.

This article was provided by Bloomberg News.