We're used to hearing that homeownership is out of reach for many in the Bay Area. But it's still shocking to read a new report that says you need to make just over $343,000 in order to afford a median-priced home in San Francisco.

The report was compiled by Compass but uses data from the California Association of Realtors, which took into account median home sale prices and prevailing mortgage rates in the second quarter of 2019. It assumed a 20 percent down payment and also includes taxes and insurance in monthly costs. With all those figures taken into account, it should run $8,580 a month for a median-priced home in SF.

Only 17 percent of San Franciscans can afford these payments, which is actually an increase over what we've seen in the past few years. The recent uptick can mainly be attributed to a significant drop in mortgage rates over the last year, according to the report, as well as stagnating home prices and wage growth as lower-income residents have been forced to leave the area and higher-income households move in.

ALSOThis $18 million Seacliff home was the second-biggest real estate deal in San Francisco this year

Home affordability in San Francisco hovered between 10 and 15 percent between 2012 and 2018. It hit an all-time low of 8 percent in the third quarter of 2007, just before the financial crisis hit, as many people were getting loans beyond their means.

San Francisco condo prices are lower and therefore more affordable — though not by much. Households with an income of just over $252,oo0 can afford a median-priced condo in San Francisco. That gets buyers a median of 1,143 square feet, compared with a median of 1,734 square feet in a home.

For the biggest bang for your buck in the Bay Area, check out central Contra Costa cities like Moraga and Orinda. You might need an income over $270,000 to afford a home there, but you get substantially more space — a median of 2,460 square feet.

Across the Bay Area in general, it takes about a $200,000 income to afford a home. Alameda, Santa Cruz, Contra Costa, Sonoma and Monterey counties come in under that amount and San Mateo, Marin and Santa Clara join San Francisco above.

Only Solano County was affordable for those making under $100,000 a year.

Emily Landes is a writer and editor who is obsessed with all things real estate.