SAN FRANCISCO (CBS SF) – Housing affordability in California is at its lowest in 10 years and fewer than one in five households can afford to buy a median-priced single-family home in the Bay Area, according to the California Association of Realtors.

The group released its quarterly Housing Affordability Index report, based on home sales in the second quarter.

READ MORE: UPDATE: Judge Won't Delay Case Against Los Gatos Mom Accused of Hosting Drunken Teen Sex Parties

In the nine-county region, the realtors found the median home price for a single-family home is $1.035 million and buyers would need an in income of at least $219,380 to qualify. Only 18 percent of Bay Area residents could afford to buy, down from 23 percent in the 1st quarter.

San Francisco and San Mateo counties were among the least affordable in the state. Only 14 percent of prospective homebuyers in either county could afford the median home price of $1.625 million in San Francisco and $1.65 million in San Mateo.

ALSO READ: Rent For One Lavish Palo Alto Townhouse A Whopping $35,000 A Month

The realtors found that a prospective homebuyer would need to earn at least $344,000 in San Francisco to afford $8,610 a month in mortgage, taxes and insurance.

A homebuyer in San Mateo County would need an even higher income, $349,740, which is more than six times the income needed to buy a median-priced home in the entire U.S. The monthly payment for a median priced Peninsula home would be $8,740.

The income needed to buy the median-priced home in San Francisco and San Mateo counties has gone up more than $40,000 since the end of last year.

READ MORE: Oakland Fire Crews Battle Two-Alarm Blaze At Apartment Building

Prospective buyers in Marin and Santa Clara counties would need incomes of more than $295,000 to afford a median-priced home in either county.

Despite prices that continue to rise, the realtors found affordability had actually gone up in Marin and San Francisco counties from a year ago, mostly due to higher wages.

Meanwhile, affordability dropped in Alameda, Contra Costa, Santa Clara, Solano and Sonoma counties and held steady in Napa and San Mateo counties.

ALSO READ: Startling Poll Finds 46% Of Bay Area Residents Want To Leave

Statewide, only 26 percent of California households could afford the median priced home of $596,730, down from 31 percent in the first quarter. The realtors said it was the 21st consecutive quarter the affordability index has been below 40 percent.

The index assumes a homebuyer is putting 20 percent down on a 30-year fixed-rate home loan, with an interest rate of 4.70 percent.

MORE NEWS: FBI: Apparent Human Remains Found Near Brian Laundrie's Belongings

Tim Fang is a digital producer for CBS San Francisco and a native of the Bay Area. Follow him on Twitter @fangtj.