The Section 121 Exclusion
Section 121 allows homeowners to exclude up to $250,000 (single) or $500,000 (married filing jointly) of capital gains on the sale of their primary residence. To qualify, you must have owned and used the property as your primary residence for at least 2 of the 5 years preceding the sale.
The 2-year requirement isn't continuous. You can move out and back, or have non-residence periods, as long as the total ownership AND total use both reach 2 years out of the last 5. The two clocks run independently.
The exclusion is per-sale, not per-lifetime. You can use it every 2 years for a different home. Many people don't realize this — successful real estate operators have used Section 121 multiple times across decades.
What 'primary residence' means: where you actually live as your main home. Not a vacation home (different rules), not a rental (different rules), not a second home you visit occasionally. The IRS looks at where you spend the most time, where you're registered to vote, where you receive mail, where your driver's license says you live.
Married filing jointly requirements: both spouses must meet the use test, but only one needs to meet the ownership test. So if you're newly married and your spouse moved into your existing home, you might qualify for the joint $500K exclusion before they've owned it for 2 years (as long as they've USED it as primary residence for 2 years).
Calculating Capital Gains on Sale
Capital gain = Adjusted sale price minus Adjusted basis. Adjusted sale price = sale price minus selling costs (real estate commission, transfer taxes, attorney fees, title insurance). Adjusted basis = purchase price plus capital improvements minus prior depreciation.
Selling costs are critical. On a $1M sale with 6% real estate commission ($60K) plus other closing costs ($10K), $70K reduces your gain — saving up to $14,000 in capital gains tax (at 20% rate). Many sellers forget to subtract these costs.
Capital improvements increase basis. Examples: kitchen remodel, bathroom addition, new roof, new HVAC, solar panels, finished basement. NOT repairs (painting, fixing leaks, replacing fixtures of similar quality). The distinction matters — improvements add to basis indefinitely; repairs don't.
Concrete example: bought a home in 2010 for $400K. Spent $80K on improvements (kitchen, deck, finished basement) over the years. Selling in 2026 for $850K, with $55K of selling costs.
Adjusted sale price: $850K - $55K = $795K.
Adjusted basis: $400K + $80K = $480K.
Capital gain: $795K - $480K = $315K.
If single: exclude $250K, owe tax on $65K of long-term gain. Federal tax (15% LTCG): $9,750. State tax varies.
If married: exclude entire $315K. Tax owed: $0.
Partial Exclusion for Early Sales
What if you sell within 2 years of buying or moving in? The full exclusion isn't available, but a partial exclusion may be if you sold for a 'qualifying reason.'
Qualifying reasons (partial exclusion available): job change requiring relocation (50+ miles farther from former home), health-related move (recommended by physician for treatment), unforeseen circumstances (natural disaster, divorce, multiple births, death of co-owner, job loss with subsequent unemployment).
Partial exclusion calculation: full exclusion × (months of qualifying use / 24 months). So if you lived in the home 12 months before a job-required move, your exclusion is 12/24 × $250K (single) = $125K, or 12/24 × $500K (MFJ) = $250K.
Concrete example: bought home January 2025 for $400K. Job offer in another state April 2026. Move 50+ miles away. Sell home for $480K. Months of qualifying use: 16. Partial exclusion: 16/24 × $250K (single) = $166,667. Your gain ($80K minus selling costs ~$30K = $50K) falls entirely within the partial exclusion. Tax owed: $0.
Without a qualifying reason, no exclusion is available. The full gain is taxable as long-term capital gain (if held over 1 year) or short-term capital gain at ordinary rates (if held less than 1 year). Selling without a qualifying reason at 1.5 years means losing the full exclusion benefit.
Depreciation Recapture
If you ever rented out the property (even short-term Airbnb), claimed home office depreciation, or otherwise depreciated portions of the property, depreciation recapture applies even on a primary residence sale.
Section 1250 depreciation recapture: depreciation taken (or allowable, even if not taken) is recaptured at 25% federal rate at sale, not the preferential 15-20% LTCG rate.
Concrete example: home rented out for 4 years before becoming primary residence. Depreciation taken: $40K. At sale, $40K is recaptured at 25% = $10K of additional federal tax — even if the gain otherwise falls within the Section 121 exclusion.
Home office depreciation: if you claimed the regular method home office deduction (not the simplified method), you took depreciation on the business-use percentage of the home. That depreciation is recaptured at sale even if you stopped using the home office before selling.
Strategic move: if you have meaningful depreciation recapture exposure, consider whether to claim the home office deduction. The simplified method ($5/sq ft, max $1,500) doesn't trigger recapture. The regular method's larger annual deduction is partially offset by the eventual recapture cost.
Conversion of rental to primary residence: if you converted an investment property to your primary residence, the 'pre-2009 nonqualifying use period' rules limit the Section 121 exclusion. The portion of gain allocable to nonqualifying use is taxable; only the qualifying-use portion qualifies for exclusion.
Spousal and Family Considerations
Surviving spouse: a widow/widower can claim the $500K exclusion (rather than $250K) if they sell within 2 years of the spouse's death AND they meet the use/ownership tests as a couple while the deceased spouse was alive.
Divorce: ownership/use tests are tackled per spouse. If one spouse owned the home longer and the other used it (after marriage), they may both meet the tests via the marriage, allowing the $500K exclusion to apply to the joint sale.
Sale to ex-spouse incident to divorce: tax-free transfer under Section 1041. The recipient spouse takes the original cost basis. Future sale follows normal Section 121 rules but uses the original basis.
Children inheriting: if you die holding the home, your heirs receive stepped-up basis to fair market value at death. The Section 121 exclusion is moot — the entire historical gain disappears via basis step-up. Children selling shortly after inheritance face minimal tax.
Gifting home to children: transfers your basis (carryover basis), not stepped-up basis. Children must meet the use test themselves to qualify for Section 121. Generally avoid gifting during life unless you have specific estate planning reasons.
Strategic Timing
Time the sale to maximize exclusion: if you've been using the home as primary residence for 1.5 years and are about to sell at a $300K gain, waiting an additional 6 months to hit the 2-year mark allows full $250K exclusion (saving $37,500 of tax at 15% LTCG plus state).
Time the sale year for tax bracket: a year you have lower other income may put you in the 0% LTCG bracket for any non-excluded gain. Selling in a low-income year (between jobs, sabbatical, retirement) can reduce tax on amounts above the exclusion.
Coordinating with state move: if you're moving from a high-tax state to a no-tax state, time the home sale before establishing residency in the new state to use no-tax-state rules. But high-tax states can claim residency for the year if you spent more than half there.
Improvement timing: capital improvements made shortly before sale still increase basis. If you're considering a remodel anyway and planning to sell in 2-3 years, the improvement reduces gain dollar-for-dollar.
Multiple homes: if you own multiple residences, you can choose which is your primary residence based on actual use. Strategically establishing a long-held second home as primary residence (lived in 2+ years) can use Section 121 on a property with substantial appreciation.