The 2 Out of 5-Year Rule: A Homeowner’s Tax Break

If you're thinking about selling your home, there's a handy tax rule you should know about—the 2 out of 5-year rule. This IRS guideline can save you thousands by excluding up to $250,000 in capital gains from your taxable income—or $500,000 if you're married filing jointly.

To qualify, you must have owned and lived in the home as your primary residence for at least two of the five years leading up to the sale. These two years don’t need to be consecutive, and you don’t have to live in the house on the exact day of sale. For example, if you moved out for a job or family reasons but kept ownership, you might still qualify as long as your occupancy adds up to 24 months within that five-year window.

This rule, rooted in Section 121 of the Internal Revenue Code, is designed to protect typical homeowners from paying taxes on profits from their main home. It’s especially useful for people relocating for work, going through life changes, or even renting out their home temporarily.

There are exceptions, too. If you sold due to health issues, a job transfer, or unforeseen circumstances like divorce or natural disaster, you might still claim a partial exclusion even if you didn’t meet the full timeline.

The best part? You can use this exclusion multiple times, as long as you haven’t done so within the past two years. So whether you're upgrading, downsizing, or just moving on, the 2 out of 5-year rule could make your sale much more financially rewarding.

See also

In-depth articles

Related topics