Housing affordability declined slightly in the first quarter of this year, but remains near historic highs according to the National Association of Home Builders/Wells Fargo Housing Opportunity Index (HOI), released on Tuesday.

The Index looks at the percentage of homes sold in a local area that are affordable to families earning the median income in that area during the quarter.  The measure incorporates sales prices of both new and existing homes and the current interest rates on fixed and adjustable rate loans.

On a national basis 73.7 percent of homes sold during the quarter (median, $184,000) were affordable to families earning the national median income of $64,400.  In the fourth quarter of 2012 74.9 percent of homes met the affordability criteria.

"Thanks to very favorable mortgage rates and prices, housing affordability has remained quite high over the past four years," observed NAHB Chairman Rick Judson.  "The HOI has not slipped below 70 since the end of 2008. That said, from a builder's perspective, it should be noted that rising costs for building materials, lots and labor are making it somewhat more expensive to construct new homes in today's market."

The most affordable market in the country was Ogden-Clearfield, Utah where 93.4 percent of homes sold during the first quarter were deemed affordable.  This was the third consecutive quarter that this area, north of Salt Lake City, topped the list, although its affordability slipped slightly from 93.7 in the fourth quarter.  The median house price was $210,000 and the median income in the area is $70,800

Other major U.S. housing markets at the top of the affordability chart in the first quarter included Indianapolis, and Lakeland-Winter Haven, Florida. The most affordable small housing market was Mansfield, Ohio at 97.5, followed by Cumberland, Maryland, and Fairbanks, Alaska.

At the other end of the spectrum, the San Francisco metro area was the least affordable major market with only 28.9 percent of homes sold being affordable to families earning the area's median income of 102,000. The median house price in the area was $675,000.  Next were the New York City metro area and Santa Ana, California.  Two other California cities, Los Angeles, and San Jose were also among the top five least affordable.

The least affordable small housing market in the first quarter was Santa Cruz-Watsonville, Calif., where 37.1 percent of all new and existing homes sold were affordable to those earning the area's median family income of $73,800. Two other small California markets were second and third, Salinas, and the San Luis Obispo area.

"HOI results for the beginning of 2013 are little changed from what they were at the end of 2012, with Ogden-Clearfield Utah holding onto the title of the nation's most affordable major housing market and San Francisco-San Mateo-Redwood City, Calif. retaining its position as the least affordable major market," noted NAHB Chief Economist David Crowe. "The bottom line is that, for consumers who can qualify for a mortgage at today's attractive rates, the majority of homes being sold remain within their grasp in markets nationwide."