While rising home prices across the nation may be good news as they imply recovering markets, the trend may dampen housing affordability. Having been historically high for the past few years, affordability dipped somewhat in the second quarter of this year, according to the National Association of Home Builders (NAHB)/Wells Fargo Housing Opportunity index.

Increasing prices and mortgage rates “contributed to affordability slipping to the lowest level in four years,” said David Crowe, chief economist at NAHB.

Nationally, the median home price rose from $185,000 in Q2 2012 to $202,000 over the most recent quarter.

At the same time, affordability fell from 73.7 percent in this year’s first quarter to 69.3 percent—meaning 69.3 percent of Americans earning the national median income could afford a home sold during the quarter.

The second quarter marks the first time since 2008 the index has fallen below 70 percent, according to NAHB.

“Such movement would be less concerning if it were not for ongoing discussions regarding potential changes to the mortgage interest deduction and federal support for the secondary mortgage market, both of which play enormous roles in keeping homeownership affordable,” Crowe said.

NAHB found a wide spectrum of affordability across major U.S. markets. The least affordable market is San Francisco-San Mateo-Redwood City, California, where affordability is just 19.3 percent, in contrast to Ogden-Clearfield, Utah—the most affordable major market—where affordability is 92.8 percent.

Ogden-Clearfield has topped the affordability chart for the past four quarters.

After the Ogden-Clearfield metro, the remaining markets on the list of top five most affordable major markets are located Midwest and Northeast. They include: Indianapolis-Carmen, Indiana (91.8 percent); Harrisburg-Carlisle, Pennsylvania (91.4 percent); Youngstown-Warren-Boardman, Ohio-Pennsylvania (90.9 percent); Buffalo-Niagara Falls, New York (90.7 percent).

Least affordable markets (after San Francisco) include Los Angeles-Long Beach-Glendale, California (28.3 percent); Santa Ana-Anaheim-Irvine, California (28.8 percent); New York-White Plains-Wayne, New York-New Jersey (29.8 percent); and San Jose-Sunnyvale-Santa Clara, California (32.2 percent).

By Krista Franks Brock