Section 121 Home Sale Exclusion Calculator

Section 121 lets you exclude up to $250K (single) / $500K (MFJ) of gain on the sale of your primary residence — if you owned + lived there 2 of the last 5 years. Calculate full or prorated exclusion for early-move scenarios.

Purchase + improvements
Section 121 Exclusion
Taxable Gain
Total Tax
Amount realized (sale − costs)
Adjusted basis
Total gain
Max exclusion ($250K or $500K)
Proration factor (months/24)
Actual exclusion
Taxable gain (LTCG)
Federal + state tax
Ad Space

Section 121 (IRC §121) allows homeowners to exclude up to $250,000 (single) or $500,000 (married filing jointly) of capital gain from the sale of their primary residence. Requirements: owned the home 2 of the last 5 years AND used as primary residence 2 of the last 5 years. For early moves due to job change, health, or unforeseen circumstances, a prorated exclusion is available.

The Two-Year Test

Two separate tests, both must be met: (1) Ownership test: owned the home 2 years out of the last 5. (2) Use test: used as primary residence 2 years out of the last 5. The 2 years don't need to be consecutive. Can be used once every 2 years per IRC §121(b)(3).

Prorated Exclusion for Early Moves

If you sell before 24 months for a qualifying reason, you get a prorated exclusion = (months owned + used) / 24 × $250K or $500K. Qualifying reasons: (1) Job change — new workplace ≥50 miles further from old home. (2) Health — for diagnosis, treatment, or relief of any disease/injury/condition. (3) Unforeseen circumstances — divorce, death, multiple births from same pregnancy, casualty/theft, change in employment status.

Depreciation Recapture Exception

If the home was previously rented (or had home office deductions), depreciation taken cannot be excluded under Section 121. It's taxed at 25% (Section 1250 recapture). The remaining gain above the depreciation may qualify for Section 121 exclusion. Common trap: home office deduction creates partial depreciation that becomes taxable on sale.

Last updated May 2026. Sources: IRS Pub 523 Selling Your Home.