Rainbow-colored lights illuminate City Hall in San Francisco, California June 26, 2013, the evening after the United States Supreme court ruled on California's Proposition 8 and the federal Defense of Marriage Act. The court handed a significant victories to gay rights advocates in both cases, but fell short of issuing a landmark ruling on same-sex marriage. Reuters/Noah Berger Even doctors are getting priced out of San Francisco's frenzied housing market, according to Trulia.

Medical practitioners such as anesthesiologists and surgeons occupy the top nine spots in the Bureau of Labor Statistics' ranking of the highest-paying jobs in America. But by comparing doctors' annual median salary to the median house price in San Francisco, Trulia found only 41.6% of homes to be affordable even for them.

That share jumped to 90.7% in Chicago, a major city where home prices are rising but at a slower pace. In Dayton, Ohio, doctors could afford 99.6% of the market.

A shortage of inventory and aggressive bidding wars are raising house prices at more than twice the rate of wage growth across the US, but especially in San Francisco.

Trulia also looked into affordability for lower-paying jobs. Restaurant workers, who have a median salary of $28,612, face the most difficulty: Trulia found that 0% of San Francisco houses were affordable for them. With a median wage of $72,340, teachers could confidently shop around in only 0.4% of the market, while first responders had access to 2.6% of the market.



Trulia Overall, Trulia found that most of the time, households with at least two working people have more access to the housing market than single-income households.

The ratio of house prices to median income is one way to gauge housing affordability. Compared with other cities in the world like Hong Kong and Vancouver, San Francisco is actually a lot cheaper.