Can the business pay my rent?

Can my startup pay for the apartment if my cofounders and I live and work there?
It's complicated.
The IRS rules are: it's only a business expense if it's used exclusively and consistently for business.
If you had a three-bedroom apartment and you and your cofounders used one of the bedrooms exclusively for business, that would be a fine thing to be a business expense.But a one-bedroom apartment that you lived in would never pass that test, because it's not exclusively used for business.
Do founders still have the company pay the full rent sometimes? Absolutely. Do we recommend doing it? No—it just isn't worth it.
Why does this rule exist?
Companies are required to pay payroll tax when they compensate employees. (Your company can't just write you a check.)
Sometimes, people try to get clever by paying themselves less, but having the company purchase personal items or personal services on their behalf. The IRS doesn't like this, because their perspective is: what you're doing here is actually compensating yourself... but you're not paying payroll tax on that compensation.
That's a problem.
What if I'm in San Francisco for Y Combinator?
How about this case? You don't live in San Francisco, but you've been accepted into YC. You and your cofounders get an apartment that you both live and work in for the duration of your time in the accelerator (~3mo), and after the batch is over, you go back home.
Is this a case where the company can fully pay the rent? Yes. Because this is now a travel/lodging expense—if you went on a weeklong business trip, the company could pay for your airfare and hotel, and this is the same scenario.
Disclaimer: We’re three-time startup founders and startup finance enthusiasts, not lawyers, financial advisors, CPAs, or tax preparers. This article is not legal advice, financial advice, or tax advice and isn’t meant as a substitute for consulting your own qualified advisors.