It depends on whether you qualify for the home sale exclusion. This exclusion lets you omit from gross income up to $250,000 of gain ($500,000 on a joint return), but only if you meet certain conditions:
Rules for determining whether a person is active in a business activity for passive activity rule purposes. Unless the tests are met, passive loss limits apply.