Tax Implications of Selling Your Home

Selling your primary residence can generate a significant capital gain, but the tax code provides one of the most generous exclusions available. Under Section 121, single filers can exclude up to 250,000 dollars of gain and married couples filing jointly can exclude up to 500,000 dollars. However, specific ownership and use tests must be met, and the rules become more complex with partial exclusions, rental conversions, and second homes.
The Section 121 Exclusion
To qualify for the full exclusion, you must have owned the home for at least two of the five years before the sale and lived in it as your primary residence for at least two of those five years. The ownership and use periods do not need to be consecutive. You can only use this exclusion once every two years. If both spouses meet the requirements, a married couple can exclude up to 500,000 dollars of combined gain.
Calculating Your Gain
Your taxable gain is the sale price minus your cost basis minus selling expenses. Your cost basis starts with what you paid for the home and increases with capital improvements like a new roof, kitchen remodel, or room addition. Routine maintenance and repairs do not increase your basis. Selling expenses include agent commissions, title insurance, and transfer taxes. Keep records of all improvements throughout your ownership.
Partial Exclusions and Special Cases
- Job relocation, health reasons, or unforeseen circumstances allow a partial exclusion even if you lived there less than two years
- Homes converted from rental property have a nonqualified use period that reduces the exclusion
- Depreciation taken during rental use must be recaptured at 25 percent regardless of the exclusion
- Inherited homes receive a stepped-up basis to fair market value at the date of death
Reporting the Sale
If your gain is fully excluded and you received a Form 1099-S, you should still report the sale on your tax return to document the exclusion. If any portion of the gain is taxable, report it on Schedule D and Form 8949. Long-term capital gains rates of 0, 15, or 20 percent apply depending on your income level. State income taxes on the gain vary by state, and some states do not conform to the federal exclusion amounts.
References
- IRS: Topic 701 Sale of Your Home (irs.gov/taxtopics/tc701)
- IRS Publication 523: Selling Your Home (irs.gov/publications/p523)
Key Takeaways
- Section 121 excludes up to $250,000 of gain (single) / $500,000 (MFJ) if you owned and used it as a primary home 2 of the last 5 years.
- Gain above the exclusion is taxed at long-term capital gains rates (0%, 15%, or 20% in 2025).
- Depreciation recapture applies if the home was ever used as a rental or home office — taxed at up to 25%.
- Improvements (new roof, kitchen remodel) add to cost basis; repairs (painting) do not.
- The 1099-S from the closing doesn't determine taxability — you still report and exclude on Form 8949/Schedule D.
Common Mistakes to Avoid
- Missing the 2-of-5 test by weeks — careful planning of the sale date can save five figures.
- Forgetting to track improvements over decades, then owing tax on phantom gains that were really cap-ex.
- Assuming the exclusion is once-in-a-lifetime — it's actually usable every 2 years.
- Ignoring depreciation recapture on a home that was rented even briefly during ownership.
- Not using the partial exclusion for early sale due to job relocation, health, or unforeseen circumstances — it prorates the gain cap.
Evelyn's Portland Home Sale: $340K Gain, $0 Federal Tax
Evelyn G. and her husband sold their Portland, Oregon home in July 2025 for $825,000 after buying it in 2013 for $420,000. After $45,000 of documented capital improvements and $52,000 of selling costs, their realized gain was $308,000. Because they met the Section 121 ownership-and-use tests, the entire gain qualified for the MFJ exclusion and they owed $0 federal capital gains tax.
- Sale price: $825,000 | Original cost basis: $420,000
- Adjusted basis with capital improvements (kitchen, roof, HVAC): $465,000
- Selling costs (6% realtor, title, transfer tax): $52,000 — reduces amount realized
- Realized gain: $825,000 − $52,000 − $465,000 = $308,000
- Section 121 MFJ exclusion: $500,000 (owned + used as primary residence 2 of last 5 years)
- Taxable gain: $0 | Federal tax owed: $0
- Oregon state tax on the sale: $0 (exclusion applies at state level too)
The Section 121 primary-residence exclusion is one of the most generous provisions in US tax code — up to $250,000 single / $500,000 MFJ of gain tax-free, reusable every two years. The two tests are strict: owned the home at least 2 of the last 5 years, and used it as primary residence at least 2 of the last 5 years. Partial exclusions apply for hardship sales (job relocation, health, unforeseen circumstances) — worth asking about before assuming an early sale disqualifies.
Case Study: Marcelo E. Uses the Section 121 Home-Sale Exclusion
Marcelo E. and spouse (MFJ, Iowa, $130,000) sold their primary home in August 2024 for $560,000, bought in 2015 for $280,000. Section 121 of the Internal Revenue Code excludes up to $500,000 of gain for MFJ ($250,000 single) if they meet ownership and use tests.
- Gross sale: $560,000. Selling costs (commissions, transfer tax): $33,600.
- Amount realized: $526,400. Adjusted basis: $280,000 plus $42,000 improvements = $322,000.
- Realized gain: $204,400.
- Section 121 exclusion MFJ: up to $500,000 - gain fully excluded.
- Federal tax owed on the gain: $0. Reported only if 1099-S was issued or loss is claimed (loss on primary home is not deductible).
Marcelo's $204,400 gain is fully tax-free because of Section 121. The ownership test (owned 2 of last 5 years) and use test (lived in it as primary residence 2 of last 5 years) both qualified. Publication 523 covers every edge case including partial exclusions after a qualifying life event, depreciation recapture on prior rental use, and allocations for non-qualified use after 2009.
Home Sale Taxation 2025: Section 121 Exclusion, Edge Cases, and 1099-S Reporting
The Section 121 primary-residence exclusion is one of the most generous provisions in the US tax code, allowing up to $250,000 (single) or $500,000 (MFJ) of gain on a home sale to be completely federal-tax-free. Understanding the eligibility tests and the partial-exclusion exceptions for hardship sales is essential for anyone selling a home — especially in markets that have seen significant appreciation since purchase.
The Two-Out-of-Five-Years Tests
To qualify for the full Section 121 exclusion, you must meet both the ownership test and the use test: you must have owned the home at least 2 of the last 5 years ending on the sale date, AND used it as your primary residence at least 2 of the last 5 years. The two-year periods do not need to be consecutive. A homeowner who lived in a house for 2 years, rented it out for 2 years, and sold in the 5th year still qualifies (though depreciation recapture on the rental period applies separately).
Calculating the Gain
- Amount realized: sale price minus selling costs (realtor commission, title, transfer tax, legal fees)
- Adjusted basis: original purchase price + capital improvements (additions, renovations, new HVAC/roof/kitchen) − prior depreciation
- Gain: amount realized minus adjusted basis
- Exclusion: up to $250,000 single / $500,000 MFJ
- Taxable portion of gain: gain minus applicable exclusion, taxed at LTCG rates (0/15/20%)
Partial Exclusion for Hardship Sales
Homeowners who fail the 2-year tests but sell due to change in employment (new job more than 50 miles away), health reasons (documented medical need), or unforeseen circumstances (divorce, death in family, multiple births, job loss causing inability to afford housing) may qualify for a prorated partial exclusion. The calculation is (months of qualifying use / 24) × $250,000 or $500,000. Selling at month 12 of ownership for a qualifying hardship reason would unlock a $125,000 single-filer exclusion rather than zero.
Form 1099-S Reporting
The title/settlement company reports the sale to the IRS on Form 1099-S unless the sale price is below $250,000 (single) or $500,000 (MFJ) AND the seller certifies in writing that the entire gain qualifies for exclusion. In practice, many closing agents issue 1099-S for every sale regardless, requiring the seller to report the transaction on Schedule D and Form 8949 with the exclusion claimed — even though no tax is owed. Failing to report a 1099-S'd sale triggers an IRS mismatch letter 12–18 months later. The paperwork cost is the same either way; reporting it contemporaneously is simpler.
Try Our Free Calculators
Get accurate estimates in seconds
Frequently Asked Questions
Do I have to pay tax on profits from selling my home?
How do I calculate the gain on a home sale?
What if my home has been a rental at some point?
How often can I use the home sale exclusion?
Do I have to report a home sale even if no tax is owed?
Sources & References
- IRS.gov — Official Tax Information
- IRS Publication 17 — Your Federal Income Tax
- Tax Foundation — Tax Data & Research
All tax data is sourced from official government publications and updated regularly. Last verified: March 2026.


