Nationwide housing affordability dipped in the second quarter of 2014 as several markets saw a firming of home prices, according to the National Association of Home Builders/Wells Fargo Housing Opportunity Index (HOI).

In all, 62.6% of new and existing homes sold between the beginning of April and the end of June were affordable to families earning the U.S. median income of $63,900. This is down from the 65.5% of homes sold that were affordable to median-income earners in the first quarter.

The national median home price increased from $195,000 in the first quarter to $214,000 in the second quarter. Meanwhile, average mortgage interest rates decreased from 4.57% to 4.44% in the same period.

"With interest rates near historically low levels and strengthening job growth, now continues to be a great opportunity to buy a home," said  Kevin Kelly, NAHB chairman, a home builder and developer from Wilmington, Del.

"The second quarter HOI reflects the slow but steady march toward the historic levels of price appreciation and interest rates that result in affordability levels we experienced before the mid-2000s boom," said David Crowe, NAHB chief economist. "While we are seeing a slight decrease in affordability, it is still fairly high by historical standards."

Youngstown-Warren-Boardman, Ohio-Pa. claimed the title of the nation's most affordable major housing market, as 90.4% of all new and existing homes sold in this year's second quarter were affordable to families earning the area's median income of $52,700. 

Meanwhile, Cumberland, Md.-W.Va. was the most affordable smaller market, with 97.2% of homes sold in the second quarter being affordable to those earning the median income of $54,100.

Other major U.S. housing markets at the top of the affordability chart in the second quarter included Indianapolis-Carmel, Ind.; Syracuse, N.Y.; Harrisburg-Carlisle, Pa.; and Scranton-Wilkes-Barre, Pa; in descending order.

Meanwhile, smaller markets joining Cumberland at the top of the affordability chart included Kokomo, Ind.; Davenport-Moline-Rock Island, Iowa-Ill.; Battle Creek, Mich.; and Lima, Ohio; in descending order.

For a seventh consecutive quarter, San Francisco-San Mateo-Redwood City, Calif. was the nation's least affordable major housing market. There, just 11.1% of homes sold in the second quarter were affordable to families earning the area's median income of $100,400.

Other major metros at the bottom of the affordability chart were Santa Ana-Anaheim-Irvine, Calif.; Los Angeles-Long Beach-Glendale, Calif.; San Jose-Sunnyvale-Santa Clara, Calif.; and New York-White Plains-Wayne, N.Y.-N.J.; in descending order.

All five least affordable small housing markets were in California. At the very bottom was Santa Cruz-Watsonville, where 16.6% of all new and existing homes sold were affordable to families earning the area's median income of $77,900. Other small markets included Napa, Salinas, Santa Rosa-Petaluma, and San Luis Obispo-Paso Robles; in descending order. 

Please visit nahb.org/hoi for tables, historic data and details.