Capital Gains Section 121 — The Tax-Free Home-Sale Exclusion
Internal Revenue Code §121 lets you exclude up to $250,000 (single) or $500,000 (married filing jointly) of capital gain when you sell your primary residence. You can take it repeatedly throughout your life — but no more than once every 2 years. This is the most-overlooked tax provision for homeowners.
The basic rule
To claim the exclusion you must have:
- Owned the home for at least 2 of the 5 years before sale (the "ownership test")
- Lived in it as your primary residence for at least 2 of those same 5 years (the "use test")
- Not used the exclusion on another home in the 2 years before this sale
The two-year periods do not have to be consecutive. You can rent the home out for a year, live there for two years, rent again, and still qualify.
Partial exclusion when you don't fully qualify
If you sell before completing the 2-year tests, you can still claim a prorated exclusion if you sold for one of these IRS-recognized reasons:
- Change in employment (50+ mile move for new job under §121(c)(1))
- Health (move primarily for medical care)
- Unforeseen circumstances (death of spouse, divorce, multiple births, natural disaster, involuntary conversion, terrorism, listed by IRS)
- Active-duty military "stop-the-clock" — up to 10 years of qualified official extended duty toll the use/ownership clocks (§121(d)(9))
- Foreign Service / Peace Corps — similar tolling under §121(d)(9)
Prorated exclusion = (months of qualifying use ÷ 24) × the full exclusion amount. So 12 months of use as a single filer = $125,000 exclusion.
Critical details people miss
- Exclusion applies to gain, not sale price. Capital improvements (kitchen reno, addition, new roof, new HVAC) increase your cost basis and reduce taxable gain.
- Married couples filing jointly need only one spouse to meet ownership; both spouses must meet the use test for the full $500k exclusion.
- Period of nonqualified use (e.g., used as a rental before becoming primary residence) reduces the excludable portion proportionally per §121(b)(5).
- You can take the exclusion repeatedly throughout your life — but no more than once every 2 years.
- Depreciation recapture: any depreciation claimed on the home (e.g., for a home office or rental period) is taxed at 25% capital-gains rate and is NOT excluded by §121.
Worked example — modest gain
You bought for $300,000 in 2018, did $40,000 in capital improvements (kitchen + roof), and sold for $550,000 in 2026. Your adjusted cost basis is $340,000. Your gain is $210,000. Single filer: the entire $210,000 is below the $250,000 exclusion → tax owed: $0. MFJ: entire gain excluded as well, with $290,000 of the $500,000 exclusion still unused.
Worked example — high gain that exceeds the exclusion
You bought for $400,000 in 2010, did $60,000 in improvements, and sold for $1,400,000 in 2026. Adjusted basis is $460,000. Gain is $940,000. MFJ: $500,000 excluded, $440,000 taxable at long-term capital-gains rates (0% / 15% / 20% based on income; high earners also pay 3.8% Net Investment Income Tax).
Military stop-the-clock
Under §121(d)(9), a qualified service member on extended active duty more than 50 miles from their primary residence can suspend the 5-year window for up to 10 years. This means you could rent out your home for a 10-year deployment cycle and still meet the use test on return. Same rule applies to Foreign Service officers and Peace Corps volunteers.
Practical implication: a service member who buys a home, lives in it 1-2 years, then deploys for 8+ years, can sell on return and still claim the full exclusion.