Section 121 Exclusion: keep $250K (single) / $500K (married) tax-free when selling your home
The Section 121 home sale exclusion is the single largest tax break available to most American homeowners — but it has strict qualifying rules. Here's exactly how it works, the partial-exclusion exceptions, and the math on a typical sale.
The headline numbers
Under IRS Section 121, homeowners can exclude from federal capital gains tax:
- $250,000 of gain on a primary residence sale — single filers
- $500,000 of gain on a primary residence sale — married filing jointly
Gain above the exclusion is taxed at long-term capital gains rates (0%, 15%, or 20% federal depending on income), plus state cap gains tax, plus 3.8% Net Investment Income Tax for high earners.
The 2-of-5-year rule
To qualify for the full exclusion, you must pass two tests:
- Ownership test: You owned the home for at least 2 of the 5 years immediately before the sale.
- Use test: You used the home as your primary residence for at least 2 of the 5 years immediately before the sale.
The two years don't need to be:
- Continuous (you can have temporary absences)
- The same 2 years for both ownership and use (e.g., owned years 1-3, lived in years 3-5 still passes)
- Right before the sale (just within the 5-year window)
For married couples, only ONE spouse needs to meet the ownership test, but BOTH spouses must meet the use test, to claim the full $500K joint exclusion.
How often can you use it?
Once every 2 years. If you sold a home and used the Section 121 exclusion in the past 2 years, you must wait or accept a partial exclusion.
Partial-exclusion exceptions
If you sold before meeting the 2-year requirement, you may still qualify for a partial exclusion if the sale was due to one of three approved reasons:
- Change in employment: New job 50+ miles further from your home than the old job was. Self-employment changes count if circumstances are similar.
- Health: A doctor recommended a move for medical reasons (you, spouse, child, parent, or other qualifying person).
- Unforeseen circumstances: Death, divorce, multiple births from a single pregnancy, job loss, casualty damage, or other circumstances the IRS deems beyond reasonable expectation.
Partial exclusion = (months of ownership ÷ 24) × full exclusion amount. So 12 months as a single filer = (12 ÷ 24) × $250K = $125K of excluded gain.
How to calculate your taxable gain
- Calculate your adjusted cost basis:
- Original purchase price
- + Closing costs at purchase (title insurance, recording fees, etc.)
- + Capital improvements (kitchen remodel, new roof, addition, etc.)
- − Depreciation taken if you ever rented the home
- Calculate your amount realized:
- Sale price
- − Selling expenses (commission, transfer tax, repair credits)
- Capital gain = amount realized − adjusted cost basis
- Apply Section 121 exclusion ($250K single / $500K married)
- Taxable gain = capital gain − exclusion (any negative number = $0 tax)
Worked example: married couple, $300K profit
- Bought primary home in 2018 for $400,000 + $8K closing costs = $408K basis
- Added kitchen remodel ($35K) + new roof ($15K) = $458K adjusted basis
- Sold in 2026 for $750K, paid $50K in commissions/closing = $700K realized
- Total gain = $700K − $458K = $242K
- Section 121 exclusion (married): $500K
- Taxable gain: $0 (gain entirely under the exclusion)
Without Section 121, that $242K gain would have generated ~$48K in federal cap gains tax + ~$9K NIIT + state cap gains depending on location. The exclusion saves the family $50K+.
Worked example: $700K profit on the same home
- Same basis $458K. Sold for $1.2M, paid $80K commissions = $1.12M realized
- Total gain = $1.12M − $458K = $662K
- Section 121 exclusion (married): $500K
- Taxable gain: $162K
- Federal long-term cap gains @ 15% = $24,300
- NIIT @ 3.8% = $6,156
- State cap gains (e.g., CA at 13.3%) = $21,546
- Total tax: ~$52,000 on a $700K profit — vs ~$210K without Section 121
Special cases
Renting out before selling
If you converted your primary home to a rental and then sold, the Section 121 exclusion still applies for the years it was your primary residence (within the 5-year lookback). However, depreciation taken during the rental years is recaptured at up to 25% — even on an otherwise-excluded gain.
Death of a spouse
If your spouse died and you haven't remarried, you can claim the full $500K exclusion for up to 2 years after their death — provided you owned and used the home as your primary residence in the qualifying period.
Divorce
If a home is transferred to you in a divorce, you generally inherit your ex-spouse's ownership and use periods. So if you held it as a primary residence for 1 year before the divorce, then sold 1 year after, you may meet the 2-year requirement using your ex's ownership period.
What doesn't qualify
- Investment properties (use 1031 exchange for those)
- Vacation homes / second homes (unless converted to primary for 2+ years)
- Inherited homes you never lived in (use stepped-up basis instead)
- Land sales (the exclusion applies to the dwelling and adjacent land used as a residence)
- Sales within 2 years of using the exclusion previously (no full exclusion; partial may apply)
Run the numbers on your sale
- Home Sale Proceeds Calculator — net cash after federal capital gains tax with Section 121 exclusion automatically applied.
- Seller's Net Sheet — total seller costs at closing (commission, transfer tax, repair credits, mortgage payoff).
Calculate your after-tax home sale proceeds →
Section 121 exclusion automatically applied based on filing status. Federal long-term capital gains, state cap gains, and NIIT modeled. See your true cash-in-hand after the sale.