San Francisco teachers are getting a hard lesson in the economics of the housing market this month.

First, the real estate site Trulia estimated that only 0.4 percent of homes for sale in San Francisco are within a price range that a teacher at median wages can reasonably afford.

Now, rental site ApartmentList comes along with a second course of extremely bad news, as even teachers who rent may face failing prospects.

According to a study the site released this week, San Francisco ranked dead last—50 out of 50—in measuring the rent burden placed on local teachers. ApartmentList’s Sydney Bennett writes:

In almost a third of cities (primarily located on the coasts), teachers spend more than 30% of their income on rent. For example, in San Francisco and New York fifth teachers have to spend nearly 70% of their income to rent a one bedroom. [...] The situation seems to worsen as teachers become more experienced, with fifth and tenth year teachers facing bigger challenges than first year teachers.

Greater burdens for more experienced teachers happen because as people age they tend to need or want larger homes, but salary increases for experience have trouble keeping up with the higher rents.

Fact checking the numbers, at the beginning of this month ApartmentList calculated a median market rent of $3,470/month in the city.

(Some of its competitors provided lower figures, closer to the $3,300/month mark, although such a bargain would probably not be much comfort to embattled educators.)

According to the school district salary schedule, San Francisco teacher pay varies depending on a number of variables, but first-year teacher with a BA makes $53,672/year, or about $4,472/month.

The site’s median rent for a one bedroom San Francisco home in March would eat up 77 percent of that, and keep in mind that we’re not even accounting for taxes.

A new teacher with a BA plus 60 units makes nearly $59,000/year, but may also qualify for bonuses for things like extra certifications or teaching a subject that’s difficult to fill.

It’s probably not even possible for a single San Francisco teacher to qualify for all $10,500 worth of combined bonuses offered.

But even if anyone did, they’d still pay 60 percent of their monthly income toward a small apartment at the ApartmentList median. Tough town.

After 10 years in the district, a teacher with 60 units on top of a BA can make up to $74,799/year, bonuses not included.

But if you want to upgrade from that one-bedroom apartment, a two bedroom home will cost somewhere in the neighborhood of $4,560/month at market prices, or roughly 73 percent of monthly salary before taxes. Only a little better off than teachers with one tenth of your experience.