Sell Your Home Tax-Free: The Section 121 Exclusion Guide

If you make $100,000 in the stock market, you pay taxes. If you make $100,000 selling your crypto, you pay taxes. But thanks to IRS Section 121, if you make $500,000 selling your home, you can legally pay $0 in federal taxes. It is arguably the single greatest wealth-building tool in the US Tax Code. There is just one catch: You must follow the “2 out of 5 Years” rule perfectly. Here is how to ensure your massive windfall stays in your pocket, not the IRS’s vault.

BMT Tax Team BMT Tax Team · 📅 Feb 2026 · ⏱️ 5 min read · TAX › HOME SALE
Single
$250k
Tax-Free ProfitBenefit
Married
$500k
Tax-Free ProfitBenefit
Rule
2 Years
Must Live ThereFact
House for sale sign with a large red sticker reading TAX FREE PROFIT

The Golden Ticket: If you lived there for 2 years, up to $500k of profit is yours to keep. The IRS gets nothing.

Image Source: bestmoneytip.com

1. The Magic Numbers: $250k and $500k

This exclusion applies to your Net Profit (Capital Gain), not the total sales price.

Calculation Example
Bought for: $400,000 (Cost Basis)
Sold for: $900,000
Gain: $500,000
Taxable Amount (Married): $500k Gain – $500k Exclusion = $0 Taxable.
👉 You keep all $500,000 profit. No form to file (usually), no tax bill.

2. The “2 out of 5 Years” Rule Explained

To qualify, you must pass two tests during the 5-year period ending on the date of sale.

Test Name Requirement Notes
Ownership Test Owned for 24 months Doesn’t have to be continuous.
Use Test Lived in for 24 months Must be “Primary Residence.” (Vacation homes don’t count).

*The 24 months do not need to be consecutive. You could live there in Year 1 and Year 5.

3. Forced to Move Early? (The Loophole)

What if you have to sell after only 1 year? You might get a Partial Exclusion if the move is due to:

  • Work: Your job moved more than 50 miles away.
  • Health: You moved for medical reasons (e.g., need a care facility).
  • Unforeseen Circumstances: Divorce, death of a spouse, or multiple births (twins/triplets).
The Pro-Rated Math
If you lived there for 1 year (50% of the requirement), you get 50% of the exclusion limit.
• Single Limit becomes $125,000.
• Married Limit becomes $250,000.

4. The Trap: Did You Rent It Out?

If you rented the house out for a few years, things get complicated.

⚠️ Depreciation Recapture
If you claimed depreciation while renting it, you must pay that back (taxed at 25%) when you sell. Section 121 does not wipe out depreciation recapture tax.
⚠️ Non-Qualified Use
Since 2009, if you rented the house before you lived in it, you might lose a portion of the tax-free gain based on the ratio of rental years to total years.

5. Frequently Asked Questions

Can I do this with a second home?
Only if you move in. You must move into the vacation home and live there for 2 years to convert it into a “Primary Residence.” Even then, you may owe tax on the years it was a vacation home (Non-Qualified Use).
What if my spouse dies?
You have 2 years. If you sell within 2 years of your spouse’s death, you can still claim the full $500,000 married exclusion (provided you qualified before the death).