Row of identical houses and yards in Queens, New York

Homeownership is less affordable for average earners in the U.S. than at any point in the last 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 .

Rising expenses, coupled 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 over a third of U.S. markets, ownership costs consumed 43% of average local wages, significantly above the 28% threshold considered a guideline for affordability.

The latest data “presents a clear challenge for homebuyers,” 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.”

Pricier markets in the West and Northeast experienced the most significant 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 compared to their historical affordability averages, Attom said.