Housing affordability increased in 22 of the Golden State's 28 metropolitan areas during the third quarter, according to the California Building Industry Association. On a statewide basis, a family earning the median income could have afforded 63.5% of the new and existing homes sold during the three months ended Sept. 30, up from 61.3% in the second quarter. "As builders continue to compete with a glut of foreclosures and as housing prices continue to find their footing, this remains an opportune time for prospective home buyers," said Mike Winn, CBIA’s president and CEO. The San Francisco, San Mateo and Marin County metro area was California’s least-affordable for the 12th consecutive quarter, and second in the nation with just one-third of homes sold being affordable to a family earning the median income. That is also higher than 27.5% in the second quarter. The metro area of Sutter County and Yuba County, about an hour north of Sacramento, was California’s most-affordable with 89.3% affordability, up from 88% in the second quarter. Nationwide, 72.9% of new and existing homes sold in the third quarter were affordable to families earning the national median income, up slightly from 72.6% in the second quarter. The New York City metro area is the nation's least-affordable market for the 14th consecutive quarter with 23.3% affordability. Fairbanks, Alaska, was the most-affordable housing market in the U.S. with 97.8% of its properties affordable for the average family. Write to Kerry Curry. Follow her on Twitter @communicatorKLC.