Selling Your Home: Tax Guide
A guide by Taxstra Tax & Accounting — CPA-led tax strategy for business owners
Section 121 Exclusion Overview
Up to $250k/$500k tax-free capital gains
Section 121 of the Internal Revenue Code allows you to exclude capital gains on your primary residence: $250,000 single, $500,000 married filing jointly. This is among the most valuable tax benefits in the code. A couple selling a home for $200k gain pays zero tax. A couple with $600k gain pays tax on only $100k.
Section 121: $250k/$500k Exclusion
Must own home for 2+ of last 5 years AND use as primary residence for 2+ of last 5 years. If tests met, capital gain is excluded up to limit. Married couple: both spouses must meet 2-year test (can be different homes if divorced/widowed). Exclusion is per primary residence, once per 2 years.
The exclusion is automatic—you don't need to claim it explicitly. If you meet the tests, you simply exclude up to $250k/$500k when calculating capital gains on Schedule D. The remaining gain (if any) is subject to capital gains tax.
Maximize Exclusion: Plan Timing
If you own home 1.5 years and must sell (job relocation), you fail the 2-year test and get reduced exclusion (pro-rata). If you can delay sale 6 months, you meet 2-year test and get full exclusion. One decision worth $30k-$100k in tax savings (depending on gain).
2-Year Ownership & Residency Tests
How the IRS counts time for Section 121
Section 121 requires two tests: (1) ownership test: owned home for 2+ of last 5 years. (2) Residency test: used as primary residence for 2+ of last 5 years. Timing is counted from sale date going backward. Example: sold March 2026. Look back to March 2021. Owned Jan 2021-March 2026? That's 5 years (meets test). Lived there the whole time? Meets test.
Ownership & Residency Separate Tests
Can own home 5 years but only lived there 2 years (meets both tests). Or own 3 years, lived there 3 years (meets both tests). Must meet BOTH for full exclusion. If miss either, reduced exclusion applies.
Timing nuances: For residency test, temporary absences (vacation, business travel) do not break residency. A home used as primary residence is your main home even if you're away frequently. If you rent out part of home (investment), that doesn't break residency if the other part is primary residence.
Common Mistake: Counting Residence Wrong
Couple buys home Jan 2020, separates May 2023 (one spouse leaves). Sells Oct 2024. Ownership test: 4.8 years (meets). Residency test (leaving spouse): only 3 years (meets). Residency test (remaining spouse): 4.8 years (meets). Each spouse gets $250k exclusion (if unmarried at sale). But married filing jointly at sale? Coordination matters; consult CPA.
Cost Basis Calculation
Purchase price + improvements - depreciation
Cost basis determines your capital gain. Basis = purchase price + capitalized costs (closing costs, title insurance, legal fees) + capital improvements (roof, addition, renovation, HVAC) - depreciation deducted (if home office or rental).
Cost Basis Example
Bought home Jan 2020: $300k. Closing costs: $15k. Kitchen renovation: $50k. Roof replacement: $20k. Home office depreciation (5 years): $5k. Cost basis: $300k + $15k + $50k + $20k - $5k = $380k. Sale price: $700k. Capital gain: $320k.
Improvements increase basis (new roof, addition, renovations). Repairs do not (fixing existing, maintenance). Distinction matters: roof repair $2k vs new roof $20k. The former doesn't increase basis; latter does.
Track Home Improvements
Keep receipts and documentation of all home improvements. In 10+ years of ownership, you may forget $30k-$50k in renovations. A spreadsheet of improvements (date, cost, description) is invaluable at sale. Increases basis = reduces capital gains = saves tax.
Capital Gains Tax Rates
15% and 20% on gains exceeding Section 121 exclusion
Long-term capital gains (assets held over 1 year) are taxed at preferential rates: 0%, 15%, or 20% (2026). Short-term gains (assets held under 1 year) are taxed as ordinary income. A home owned 2+ years qualifies as long-term.
2026 Capital Gains Tax Brackets
Single: 0% up to $47.025k, 15% $47k-$518.9k, 20% over $518.9k. MFJ: 0% up to $94.05k, 15% $94k-$583.75k, 20% over $583.75k. Widowed spouses get MFJ rates (special rule for 2 years post-death).
Example: Married couple, sale gain $400k after Section 121 exclusion ($500k). If income is low enough to be in 0% bracket, no tax. If income puts them in 15% bracket, tax: $400k × 15% = $60k. If income exceeds $583.75k (pushing into 20% bracket), tax is higher.
Year of Sale Tax Planning
If you have capital loss from business or investments (can offset home sale gain), recognize loss in same year as home sale. Or defer home sale to lower-income year (sabbatical, retirement transition). A $400k gain at 0% rate saves $60k tax vs 15% rate.
Partial/Reduced Exclusions
When the 2-year test is not met
If you don't meet the 2-year test but have a qualifying reason (job relocation, medical condition, unforeseen circumstance), you may claim a reduced Section 121 exclusion. Reduction is pro-rata: (months of qualifying use / 24 months) × full exclusion.
Reduced Exclusion Example: Job Relocation
Bought home 18 months ago (June 2024), got job offer in San Francisco, must sell Dec 2025. Own 18 months (don't meet 2-year test). Reduced exclusion (single): (18/24) × $250k = $187.5k. Gain $300k. Taxable gain: $112.5k × 15% = $16.9k tax (vs $45k if no reduced exclusion).
Qualifying reasons for reduced exclusion: (1) job relocation, (2) medical condition requiring relocation for care, (3) divorce/separation, (4) death of spouse/co-owner. Unforeseen circumstances may qualify (natural disaster damaging home, etc.). Each case is reviewed.
Reduced Exclusion Requires Documentation
To claim reduced exclusion, you must provide documentation to IRS: job offer letter, medical records, divorce decree, death certificate. Without documentation, IRS denies reduced exclusion. Keep all supporting materials when filing return.
| Metric | Single | Married |
|---|---|---|
| Section 121 Exclusion Amount | $250,000 | $500,000 (if both spouses meet 2-year test) |
| Ownership Test | ||
| Residence Test | ||
| Frequency of Use | ||
| Capital Gains Tax Rate (2026) | ||
| Capital Gains Tax Rate (2026, MFJ) | ||
| Cost Basis Components | ||
| Real Estate Commission & Selling Costs | ||
| Primary vs Vacation Home | ||
| Rental Property (Previously Primary) | ||
| Like-Kind Exchange (1031) | ||
| 10-Year Capital Gains Example: Original Cost $300k, Sale Price $700k |
Frequently Asked Questions
10 home sale tax questions answered
More Life-Event Tax Guides
Plan Your Home Sale Tax Strategy
Section 121 exclusion can save $60k-$150k in capital gains tax on a home sale. Cost basis optimization, timing, and reduced exclusion planning are critical. Get expert advice before listing your home.
Find Out What You're Overpaying in Taxes
Book a free 30-minute call to walk through your situation. We'll tell you exactly how our CPA-led team can help — and whether we're the right fit.
