Rising home prices have pushed housing affordability in the U.S. lower in the second quarter, according to the Housing Opportunity Index (HOI) report released by the National Association of Home Builders (NAHB) and Wells Fargo Thursday morning.

Between April and June, 62% of all new and existing homes sold on the market were affordable for families making the median income (about $65,700) in the U.S. This is down from the 65% posted in the first quarter of 2016, and is 1.2 percentage points lower than a year ago. According to historical data, housing affordability usually takes a notch down in the second quarter, as a result of high prices caused by strong sales in warmer days. This is the sixth consecutive year that the HOI has decreased in the second quarter.

"Though we have seen a modest drop in affordability in the second quarter, the HOI is still fairly high by historical standards," said NAHB Chief Economist Robert Dietz in a statement. “Rising employment, favorable mortgage rates and increasing household formations will keep the housing market on a gradual, upward path during the rest of the year.”

Median home prices in the U.S. rose to $240,000 in the second quarter from $223,000 in the first quarter, and marks a 4.3% increase year-over-year. This is the highest median price in over eight years, from the $240,000 median home price set in the second quarter in 2007.

Meanwhile, average mortgage interest rates reached the lowest level seen in two years, from 4.05% to 3.88%. After rising briefly in Summer 2015, the mortgage rate has been trending down for three straight quarters, providing opportunity for potential home buyers. However, experts warn that the magic of low rates could be offset by price inflation in many markets to a large extent.

“Firm job growth, historically low interest rates and healthy price appreciation in many markets are all positive signs that the housing recovery continues to move forward,” said NAHB Chairman Ed Brady, in a statement. "At the same time, regulatory hurdles and rising costs for buildable lots and skilled labor continue to put upward pressure on the cost of building a home."

NAHB's quarterly Housing Opportunity Index gauges the share of affordable housing on the market for families earning the national median income. A total of 236 metropolitan areas were covered in the research for the second quarter of 2016.

Read the full release on National Association of Home Builders >>

More coverage of Housing Opportunity Index from BUILDER >>