How much of your income do you spend on rent? And how much should you spend on rent?

A rule of thumb says don't spend more than 33 percent of gross (pretax) income, and many landlords won't go over that limit, at least without a co-signer.

So how do people in the Bay Area, which has some of the highest rents in the nation, do it?

For many high-tech workers, it's not a problem. For everyone else, it's a combination of luck, subleasing a room in a rent-controlled apartment, getting a co-signer, living frugally and doubling or tripling up.

Hilary Waldo, a middle-school math teacher making $42,000 a year, lucked out two years ago when she found a room in a two-bedroom apartment with three other people near Golden Gate Park. Her share of the rent is just $750 a month, or 21 percent of her income.

One downside: Her bedroom is a dining room, with four doors leading into it.

Another is feeling a bit trapped. "If I ever left the city, if I wanted to teach abroad, how could I keep my place? I don't know what I would do," she says.

The average asking rent for a one-bedroom apartment in large complexes in San Francisco is roughly $2,900, says Nick Grotjahn, a spokesman for RealFacts, which tracks rental trends.

If that is one third of your income, you need to earn around $8,700 a month, or $105,000 a year, to afford it. "That is like a high-tech worker," he says.

Or two people making half a tech income.

Jed Kolko, Trulia's chief economist, recently looked at what percent of the average monthly salary would be needed to rent a median-priced, two-bedroom apartment in 26 metro areas.

"You would think we'd need to go above that, but we often haven't needed to. The people coming into the city to apply for our apartments are making huge salaries - all six digits," she says. "It's insane. I'm the first to admit it."

About 60 to 65 percent of her applicants are coming from outside the Bay Area, usually from New York, Los Angeles or directly from college. Many coming from New York are pleasantly surprised.

Felicia Cooper was spending 45 percent of her gross pay on rent in Manhattan, where she worked in book publishing. She moved back to San Francisco last year and is now spending only 21 percent, mainly because her salary nearly doubled when she got a job as a tech-company sales rep.

House hunting here was much tougher than in New York, where she paid a broker to find a place. In San Francisco, most renters navigate the market solo.

Like 'sorority rush'

"Here, you have to be very purposeful about it," Cooper says. "I would refresh (an app on) my cell phone every hour" to see if anything new popped up.

She also had to woo potential roommates. At open houses, "it was like sorority rush," she says. "You would have to win over these girls to see if they want to be your friend." At one, there was a sign-in sheet, "where you had to write down a perk to living with you. I said I have a lot of good books you can borrow."

Cooper lucked out when she landed a spot in a four-bedroom apartment in Lower Pacific Heights with three other women. To cope with the single bathroom, "We have a shower schedule," she says.

Jen Cust didn't think anything could be worse than New York when she moved to the Bay Area almost two years ago until she found herself getting outbid for apartments.

"One time we were looking at a place in the Inner Richmond. There were 15 or 20 other groups of people. Some guy went up to the landlord and said, 'We can pay $200 more (per month) than what you are asking and we can give you four months rent in advance.' We couldn't do that, so he got the place," she says.

The first place she landed cost 40 percent of her income and required a parent's signature, which was a tad embarrassing since she was 27 at the time.

Later, a friend of a friend was moving out of a place in North Beach and she talked the landlord into letting her take it, even though it cost $1,200 a month, about 36 percent of her income.

Unable to save

Aliah Miller, who works at a YMCA and as a nanny, spends roughly 40 percent of her income on a two-bedroom place she shares with her boyfriend in Lower Pacific Heights.

The rent is about $2,900 a month. He pays more than half because he earns more, but they each pay about 40 percent of their gross.

They considered moving to a one-bedroom apartment, but would have saved only a couple of hundred dollars a month.

"I can pay my bills, can lead a decent life, but I can't save anything," she says. "Part of me feels sick every time I write my rent check. Part of me feels it is worth the sacrifice. I love my apartment. I love coming home every day."

Not every tenant is willing to put a third of income into rent.

Sarah Gilbert and her boyfriend have decided to spend up to $3,000 (or a bit more with parking) for a one-bedroom apartment in San Francisco. That's 20 to 25 percent of their combined income. She's a nurse practitioner. He's in city government.

Although they could spend more, having just moved here from New Haven, Conn., they're still in a state of sticker shock. Plus, he owns a home in New Haven he's trying to rent out and she has student loans. "I'm a conservative spender," she says.

Heavy burden for some

It seems like as income goes up, the percent one could spend on rent should go up. For example, a person making $50,000 a year who spent a third on rent would have $2,788 a month left over for other things. Someone making $100,000 a year would have $5,555 left over.

But as income moves up "everything else moves up," Grotjahn says. "You are OK with a Honda when you are making $50,000 a year. When you are making $75,000, suddenly it's an Acura."

In reality, lower-income people spend a greater percentage of income on rent.

A study by the National Low Income Housing Coalition found that 41 percent of San Franciscans spend 30 to 50 percent of their income on housing, and 20 percent spend more than 50 percent.

"These rates are significantly higher for lower-income households," says Althea Arnold, an analyst for the coalition. For example, 52 percent of extremely low-income households (those making 30 percent or less of the median income) spend more than half their income on rent.

How much of your income do you spend on rent, and how does it compare?