Real Estate · IRC §121 · IRS Pub 523 · Tax Year 2026
Home Sale Tax Exclusion Guide: IRC Section 121 (2026)
IRC section 121 allows you to exclude up to $250,000 (single) or $500,000 (married filing jointly) of capital gain from the sale of your principal residence. This guide covers the ownership and use tests, MFJ rules, partial exclusion for job and health moves, section 1250 depreciation recapture, NIIT on non-excluded gain, the nonqualified use ratio, and Schedule D reporting.
Want to estimate the exact federal tax on your home sale including the section 121 exclusion, section 1250 gain at 25%, and NIIT? The Home Sale Capital Gains Calculator runs the full math in seconds.
IRC section 121 excludes up to $250,000 of capital gain (single) or $500,000 (married filing jointly) from the sale of your principal residence if you owned and used the home for at least 24 months out of the past 60 months. Gain above the exclusion limit is taxed at the long-term capital gains rate (0, 15, or 20 percent for 2026 per Rev. Proc. 2025-32). Any portion of taxable gain attributable to prior depreciation deductions is taxed at a maximum 25 percent rate under section 1250. Excluded gain is not subject to the 3.8 percent net investment income tax.
Key Takeaways
Exclusion limit: $250,000 single / MFS / HOH; $500,000 MFJ. Enacted by the Taxpayer Relief Act of 1997; not adjusted for inflation since then.
Both tests required: you must have owned the home for 24+ months AND used it as your principal residence for 24+ months, each within the past 5 years. Tests can overlap.
For MFJ: EITHER spouse meets the ownership test; BOTH spouses must independently meet the 24-month use test.
Exclusion frequency: once every 2 years. A sale within 2 years of a prior exclusion triggers disqualification (partial exclusion may still apply).
Partial exclusion available when sale is due to change in employment, health, or unforeseen circumstances (IRC §121(c)).
Section 1250 unrecaptured gain: prior depreciation claims reduce basis; the depreciation-related portion of taxable gain is taxed at max 25%, not the LTCG rate.
NIIT (3.8%): applies only to non-excluded gain; fully excluded gain is NIIT-exempt. Threshold: $200,000 single / $250,000 MFJ (not inflation-adjusted).
Surviving spouse: full $500,000 exclusion available if sale occurs within 2 years of spouse's death and MFJ requirements were met before death (IRC §121(b)(4)).
Reporting: Form 8949 + Schedule D if you received Form 1099-S or have taxable gain above the exclusion.
Most states conform to the federal exclusion, but New Jersey does not. California and New York conform but tax gain at ordinary income rates.
IRC section 121, enacted by the Taxpayer Relief Act of 1997, allows taxpayers to exclude from gross income up to $250,000 of capital gain realized on the sale of their principal residence. For married couples filing jointly, the exclusion doubles to $500,000 if both spouses meet the use test and at least one spouse meets the ownership test.
The exclusion applies to gain, not to the sale price. If you sell a home for $800,000 and your adjusted basis is $600,000, your realized gain is $200,000. As a single filer, the full $200,000 is excluded and your federal capital gains tax on the sale is $0. If your gain were $350,000, the $250,000 exclusion would reduce your taxable gain to $100,000.
The exclusion limits have not been adjusted for inflation since 1997. A couple that bought a home in 2000 for $300,000 and sold in 2026 for $1,000,000 realizes $700,000 of gain. The $500,000 MFJ exclusion covers $500,000; the remaining $200,000 is taxable. Inflation-adjustment proposals have appeared in Congress repeatedly but have not passed.
Planning note: The exclusion covers gain, not sale price. High-cost markets regularly produce gains in excess of $500,000 for long-term owners. If you are in this position, modeling your basis, exclusion, LTCG rate, and NIIT exposure before closing is worth the time or professional fee.
How Do the Ownership and Use Tests Work?
IRC section 121(a) requires you to pass two tests independently, each measured against the 5-year period ending on the sale date.
Ownership Test
You must have owned the property for at least 24 months (in any combination) within the 5-year lookback period. Ownership does not have to be continuous. A taxpayer who owned the home for 18 months, rented it out, and then returned and owned it for another 12 months before selling has 30 months of ownership, satisfying the test.
For married couples filing jointly, either spouse can meet the ownership test. If one spouse owned the home for 10 years before the marriage, that ownership period counts for purposes of the MFJ exclusion.
Use Test
You must have used the home as your principal residence for at least 24 months within the same 5-year lookback period. Use does not have to be the same 24 months as ownership. Short temporary absences for vacation, medical treatment, or work do not break the use test as long as the home remains your primary place of return.
For married couples filing jointly, both spouses must independently meet the 24-month use test. A spouse who moved into the home 18 months before the sale date cannot count the prior owner-spouse's use period. Each spouse's use is measured separately.
The 5-Year Lookback Window
Section 121 Ownership and Use Test Summary
Requirement
Single / HOH / MFS
Married Filing Jointly
Ownership test
You own: 24 months in past 5 years
Either spouse: 24 months in past 5 years
Use test
You used as primary residence: 24 months in past 5 years
BOTH spouses: each 24 months in past 5 years independently
Continuous required?
No. Non-continuous periods count if total is 24+ months
No. Same flexibility applies
Same period required?
No. Ownership and use periods can differ but both must occur within the 5-year window
No. Same flexibility applies
Maximum exclusion
$250,000
$500,000
What Is My Adjusted Basis and Why Does It Determine My Gain?
Your realized gain is the difference between your amount realized (sale price less selling expenses) and your adjusted basis. Adjusted basis is not your purchase price. It is your original cost, increased by closing costs and improvements, and reduced by any depreciation you claimed.
What Increases Basis
Original purchase price. Not the appraised value, not the refinanced value, not the county assessment. The actual contract price you paid.
Acquisition closing costs. Title insurance, escrow fees, recording fees, legal fees, origination points to purchase (not to refinance), real estate transfer taxes paid by buyer.
Permanent improvements. Additions (new room, garage, deck), structural improvements (new roof, HVAC, foundation repair), major system upgrades (plumbing, electrical, windows), and landscaping with permanent features. IRS Publication 523 Appendix A is the authoritative list.
What Decreases Basis
Depreciation claimed. Any home office deduction claimed in prior years. Any depreciation claimed during a period of rental use. The IRS uses "allowed or allowable" - if you were entitled to claim depreciation but did not, the IRS still reduces your basis by the amount you were allowed to claim.
Casualty loss deductions. If you claimed a casualty loss that reduced your home's value and you received a deduction, that reduces your basis.
Energy credits. Certain residential energy credits reduce basis by the credit amount.
Common mistake: Many homeowners forget to include purchase closing costs from their original settlement statement, often $5,000 to $20,000 for a typical transaction. Locating the HUD-1 or Closing Disclosure from the original purchase can reduce your taxable gain dollar for dollar.
When Can I Get a Partial Exclusion?
IRC section 121(c) provides a reduced exclusion when you fail to meet the full 2-year test because the sale was forced by a qualifying event. Three categories qualify:
Change in place of employment. You (or your spouse, co-owner, or household member) started a new job or transferred to a new work location that is at least 50 miles farther from the home than the prior workplace. Treasury Regulation section 1.121-3(c) provides the safe harbor.
Health reasons. A physician recommended that you move to care for a family member's health, or your own health condition required the move. The health reason must be documented.
Unforeseen circumstances. IRS Reg. section 1.121-3(e) provides a list of per-se qualifying events: involuntary conversion (condemnation), natural disaster, death, divorce, unemployment with eligibility for unemployment compensation, and multiple births from the same pregnancy. Other events may qualify based on facts and circumstances.
Partial Exclusion Calculation
The reduced exclusion = maximum exclusion × (qualifying fraction). The qualifying fraction is the shorter of:
Number of months you met the ownership and use tests during the 5-year period; or
Number of months since the date of the most recent prior sale to which the exclusion applied
...divided by 24.
Partial Exclusion Example - Job Relocation, Single Filer
Months lived in home as primary residence15 months
Qualifying reasonJob relocation (50+ miles)
Partial fraction15 / 24 = 62.5%
Maximum single exclusion$250,000
Reduced exclusion available$156,250
The Nonqualified Use Ratio (Post-2009)
IRC section 121(b)(5) added a rule effective for property sold after December 31, 2009. If the home was used for non-primary-residence purposes after January 1, 2009 (and is not covered by the exceptions below), a portion of the gain is permanently excluded from the section 121 exclusion, regardless of the ownership and use test results.
The nonqualified use ratio = (aggregate nonqualified use periods after January 1, 2009) divided by (total ownership period after January 1, 2009). This ratio multiplied by total gain produces the nonqualified use gain, which is not excludable.
What Qualifies as a Nonqualified Use Period
Any period during which neither you nor your spouse (or former spouse) used the home as your principal residence counts as nonqualified use. Common examples: rental periods, extended vacancy, period of use as a vacation home.
Exceptions to Nonqualified Use
Trailing period exception: Any time after the last date you used the home as your primary residence within the 5-year lookback window is NOT counted as nonqualified use. This preserves the exclusion for sellers who moved out and then rented the home for a period before selling.
Military extended duty: Not more than 10 aggregate years of qualified official extended duty.
Temporary absences: Not more than 2 aggregate years of temporary absence due to change in employment, health conditions, or other unforeseen circumstances.
Practical impact: The trailing period exception protects most sellers who rented after moving out. If you lived in the home as your primary residence until 2023, then rented it, and sell in 2026, the rental period from 2023 to 2026 is a trailing period (after your last primary use) and is excluded from nonqualified use. The nonqualified use rule mainly affects sellers who rented the property first, then moved in, then sold - not the more common reverse pattern.
Section 1250 Unrecaptured Gain: The Depreciation Factor
If you ever used any part of the home for a deductible business purpose, you likely claimed depreciation. Common sources: home office deduction under IRC section 280A, rental of a room or unit in the home, or a formal rental period between owner-occupancy periods.
Depreciation reduces your adjusted basis. When you sell, the portion of gain attributable to that depreciation is section 1250 unrecaptured gain. Under IRC section 1(h)(1)(D), this gain is taxed at a maximum federal rate of 25 percent, regardless of your income level and regardless of the LTCG rate that applies to the rest of your gain.
How It Stacks with the Section 121 Exclusion
Section 1250 recapture applies only to taxable (non-excluded) gain. If the entire realized gain is covered by the section 121 exclusion, no section 1250 recapture applies. If some gain is taxable (exceeds the exclusion), the section 1250 recapture applies to the taxable portion first, before the LTCG rate schedule.
Depreciation Recapture Example (Single Filer, Partial Rental Use)
Realized gain$320,000
Prior depreciation on home office$22,000
§121 exclusion applied$250,000
Taxable gain after exclusion$70,000
§1250 gain (lesser of depreciation or taxable gain)$22,000 @ 25% = $5,500
Remaining LTCG ($48,000 at 15%)$7,200
Total federal tax on home sale$12,700
Net Investment Income Tax on Non-Excluded Gain
The 3.8 percent net investment income tax (NIIT) under IRC section 1411 applies to the lesser of: (1) net investment income, or (2) the excess of modified AGI over the applicable threshold. The NIIT thresholds are $200,000 for single filers and $250,000 for married filing jointly - and these thresholds have not been adjusted for inflation since NIIT was enacted in 2013 as part of the ACA.
Capital gain excluded under section 121 is expressly excluded from net investment income. Only the non-excluded taxable gain is included in net investment income for NIIT purposes.
Planning to Minimize NIIT
For sellers whose gain significantly exceeds the exclusion limit, NIIT creates an effective total federal rate of up to 23.8% on the non-excluded portion (20% LTCG + 3.8% NIIT). Three planning angles: (1) maximize adjusted basis by documenting all improvements and closing costs; (2) time the sale for a year when other ordinary income is unusually low, reducing MAGI below the NIIT threshold; (3) for very large gains, evaluate whether a charitable trust or installment sale structure can spread recognition across years.
Reporting the Sale: Form 8949 and Schedule D
If you receive Form 1099-S (Proceeds From Real Estate Transactions), you must report the sale on your return even if the gain is fully excluded. The 1099-S is issued by the settlement agent when gross proceeds exceed $250,000 ($500,000 for joint sellers).
Report the sale in Part II (long-term) of Form 8949 if you owned the home for more than one year. Use column (f) code "H" to indicate the exclusion. In column (g), enter the excluded gain as a negative number. The net taxable gain (column h) is what carries to Schedule D line 8b.
If you qualify for full exclusion and did not receive Form 1099-S, you may omit the sale from your return entirely, per IRS Publication 523. However, if your gain was large and there is any ambiguity about the exclusion qualification, reporting and claiming the exclusion explicitly is the conservative approach.
Estimated Taxes
If you have a taxable home sale gain, the IRS may require estimated tax payments to avoid an underpayment penalty. The sale gain is not subject to wage withholding. If you close in Q1 or Q2, you may need to make a Q2 or Q3 estimated tax payment. IRS Publication 505 covers the payment schedule.
Surviving Spouse and Military Extensions
Surviving Spouse Rule
IRC section 121(b)(4) provides that an unmarried individual whose spouse died can still claim the full $500,000 exclusion if the sale occurs within 2 years of the date of death and the $500,000 MFJ requirements were met immediately before the death. This means the deceased spouse must have met the ownership test and the surviving spouse must have met the use test for 24 months before the death. The surviving spouse must be unmarried on the sale date. This provision prevents survivors from being forced to sell immediately after the death to preserve the larger exclusion.
Military and Government Extended Duty
IRC section 121(d)(9) allows taxpayers on qualified official extended duty to suspend the 5-year test period for up to 10 years. This effectively extends the window during which the home can qualify as a principal residence even while the owner is stationed away. A service member who owned and used a home for 2 years before deployment, then was away for 6 years, and then sells after returning can still qualify because the 5-year test is paused during the deployment. The taxpayer must make an election to suspend the period.
State Income Tax on Home Sale Gain
Most states with a broad individual income tax conform to the federal section 121 exclusion. However, state LTCG rates vary significantly:
California: Conforms to §121 exclusion. No LTCG preference - all gain taxed at ordinary income rates up to 13.3%.
New York: Conforms to §121 exclusion. Capital gains taxed as ordinary income at state rates up to 10.9%.
New Jersey: Does NOT recognize the §121 exclusion. The full realized gain is taxable for New Jersey gross income tax purposes. This is the most significant state-specific trap for NJ homeowners.
Pennsylvania: Conforms to §121. No LTCG preference - gain taxed at flat 3.07% state rate.
Texas, Florida, Nevada, Washington: No state income tax. No state capital gains tax applies.
For sellers in high-tax states with large gains above the exclusion limit, combined federal and state rates can reach 30 to 40 percent on the taxable portion.
Practitioner Insight
The biggest recoverable money in home sale tax planning is usually in the basis calculation, not in the exclusion math. I regularly see clients who have lived in a home for 20 years and have $80,000 to $120,000 of undocumented improvements that would reduce their taxable gain substantially. A new kitchen in 2010, a finished basement in 2014, a deck and landscaping in 2018 - each of these was paid for but never tracked against basis. When the gain exceeds the exclusion, finding and documenting those improvements is often worth $10,000 to $25,000 in avoided capital gains tax at no risk. Preserve contractor invoices and permits for every significant capital project. The IRS does audit home sale returns, particularly when Form 1099-S is issued and the reported gain looks inconsistent with the exclusion claimed.
Real-World Scenario: California Homeowner With Gain Above the Exclusion
David and Sandra, married filing jointly, bought their San Jose home in 2007 for $550,000. They paid $15,000 in acquisition closing costs and made $95,000 in documented improvements over 19 years. Their adjusted basis is $660,000. They sell in 2026 for $1,450,000 after paying $75,000 in agent commissions and closing costs. Amount realized: $1,375,000. Realized gain: $715,000.
The $500,000 MFJ exclusion applies because both spouses have lived in the home continuously. Taxable gain: $215,000. With other ordinary income of $200,000 (combined), taxable ordinary income (after $32,200 standard deduction) is $167,800 MFJ. The $215,000 LTCG stacks on top. The 15% LTCG bracket runs to $613,700 MFJ; $167,800 ordinary income leaves $445,900 of 15% LTCG room. The full $215,000 LTCG falls in the 15% bracket: federal LTCG tax = $32,250.
California state tax: California conforms to §121, so $215,000 is taxable at ordinary income rates. At California's 9.3% rate, state tax is approximately $20,000. Total estimated tax burden: $32,250 + $6,270 + $20,000 = $58,520 - on a $1.45M sale with $715K of gain, a $500K exclusion, and 19 years of ownership. Documenting $95,000 of improvements saved approximately $14,000 in combined federal and state tax compared to using the purchase price alone as basis.
When the Section 121 Exclusion Does Not Apply or Is Reduced
Rental property or investment property: Section 121 applies only to your principal residence. A home you never lived in as your primary home does not qualify. A home used primarily as a rental with brief personal use does not qualify. Use the Rental Income Tax Calculator for investment property sales.
Sold within 2 years of a prior exclusion: You cannot claim the exclusion twice within any 2-year window. The 2-year clock resets on the date of each qualifying sale, not the closing date.
MFJ - one spouse failed the use test: If one spouse meets the use test and one does not, the exclusion is limited to $250,000 per qualifying spouse under IRC §121(b)(2)(B). The MFJ $500,000 limit requires BOTH spouses to independently satisfy the 24-month use test.
Home received as a like-kind exchange: Property acquired in a 1031 exchange and sold within 5 years of the exchange is disqualified from the §121 exclusion for the period related to the exchange (TIPRA 2005 added this rule).
Nonqualified use ratio: Property used for non-primary purposes before the last primary use period can trigger a partial disqualification under IRC §121(b)(5). The trailing period exception often eliminates this concern, but periods of rental use before moving in are always nonqualified use.
Property partly used for business: If any portion of the home was claimed as a home office or rental, the exclusion applies only to the personal-use portion. The business portion is treated separately (recaptured as §1250 gain, not excluded).
Loss on primary residence: Not deductible. Losses on personal-use property do not qualify for capital loss treatment on Schedule D.
FAQ: IRC Section 121 Home Sale Exclusion
What is the IRC section 121 home sale exclusion?
IRC section 121 allows you to exclude from gross income up to $250,000 of capital gain from the sale of your principal residence if you are a single filer, or up to $500,000 if you are married filing jointly. To qualify, you must have owned and used the home as your principal residence for at least 24 months out of the 5-year period ending on the sale date. You cannot claim the exclusion more than once every 2 years. The exclusion applies to the gain, not the sale price. It was enacted by the Taxpayer Relief Act of 1997 and the limits have not been adjusted for inflation since then.
What are the ownership and use tests for the home sale exclusion?
IRC section 121(a) requires two separate tests, both measured over the 5-year period ending on the sale date. The ownership test: you must have owned the property for at least 24 months in that 5-year window. The use test: you must have used the property as your principal residence for at least 24 months in that 5-year window. The 24 months do not have to be continuous, and the ownership and use periods can overlap or be different 2-year segments. For married filing jointly, either spouse can meet the ownership test, but both spouses must independently meet the use test.
Can I get a partial exclusion if I did not meet the 2-year test?
Yes. IRC section 121(c) allows a reduced exclusion if you failed to meet the full 2-year requirement but sold due to a qualifying reason: a change in place of employment, health reasons, or unforeseen circumstances. The reduced exclusion equals the applicable maximum ($250,000 or $500,000) multiplied by the shorter of: (1) the months you met the ownership and use tests during the 5-year period, or (2) the months since a prior exclusion sale divided by 24. Example: single filer who lived in the home 15 months and sold for job relocation gets $250,000 times (15/24) = $156,250.
What is section 1250 unrecaptured gain and how does it affect my home sale?
If you claimed depreciation on the property at any point (for a home office deduction, rental use, or casualty loss deduction), that depreciation reduces your adjusted basis. When you sell, the IRS taxes the depreciation-related portion of your taxable gain as section 1250 unrecaptured gain at a maximum 25 percent federal rate under IRC section 1(h)(1)(D). This portion is separate from the long-term capital gains rate schedule. If the entire gain is covered by the section 121 exclusion, no section 1250 recapture applies on the excluded portion.
What is my adjusted basis and why does it matter?
Your adjusted basis is the starting point for computing gain. It begins with the original purchase price, then is increased by closing costs you paid at acquisition (title insurance, recording fees, legal fees) and by permanent improvements. It is reduced by any depreciation you claimed. Adjusted basis = purchase price plus acquisition costs plus improvements minus cumulative depreciation. A higher adjusted basis means a lower taxable gain. Many sellers understate their basis by forgetting purchase closing costs or improvements made years ago.
Does the net investment income tax apply to my home sale?
Only on the non-excluded portion. Gain excluded under IRC section 121 is expressly excluded from net investment income under IRC section 1411. If your gain is fully covered by the $250,000 or $500,000 exclusion, no NIIT applies. NIIT at 3.8 percent applies only if you have taxable gain above the exclusion AND your AGI exceeds $200,000 (single) or $250,000 (MFJ). These NIIT thresholds are not adjusted for inflation.
Can I use the exclusion on a second home or vacation property?
No. The section 121 exclusion applies only to your principal residence. A second home or vacation property does not qualify. If you convert a vacation home to a principal residence by moving in full-time, the use test clock starts from the date you begin using it as your primary home. Periods of non-primary-residence use after January 1, 2009, may also reduce the exclusion through the nonqualified use ratio under IRC section 121(b)(5).
What are the rules for surviving spouses selling a home?
IRC section 121(b)(4) allows a surviving spouse to claim the full $500,000 exclusion if the sale occurs within 2 years of the date of the deceased spouse's death and the MFJ requirements were met immediately before the death. The surviving spouse must still meet the use test for 24 months, and the deceased spouse must have met the ownership and use tests before death. The surviving spouse must be unmarried on the sale date. This provision prevents survivors from being forced to sell immediately to preserve the larger exclusion.
How do I report a home sale on Form 8949?
If you receive Form 1099-S, report the sale in Part II of Form 8949. Use column (f) code "H" to indicate the exclusion. In column (g), enter the excluded gain as a negative number. The net taxable gain carries to Schedule D. If you qualify for full exclusion and did not receive Form 1099-S, you may omit the sale from your return per IRS Publication 523. If you received a 1099-S and the gain is fully excluded, report it on Form 8949 and show zero taxable gain.
Treas. Reg. §1.121-3 - Partial exclusion safe harbors for employment, health, and unforeseen circumstances
Decision Step: Do You Qualify for the Full, Partial, or No Exclusion?
Full Exclusion ($250K single / $500K MFJ)
You (and your spouse for MFJ) have owned the home for 24+ months in the past 60, AND used it as your principal residence for 24+ months in the past 60 (separately measured for each MFJ spouse). You have not used the exclusion on another home sale within the past 2 years. Your realized gain is at or below the applicable exclusion limit. Result: $0 federal capital gains tax; no NIIT.
Gain Above the Exclusion Limit
You qualify for the full exclusion, but your realized gain exceeds $250K (single) or $500K (MFJ). Use the Home Sale Capital Gains Calculator to estimate the tax on the excess. Consider maximizing basis documentation (improvements, purchase closing costs, and any depreciation claimed) to minimize taxable gain. Check whether any portion of the taxable gain is section 1250 recapture from prior depreciation. NIIT applies if your AGI exceeds $200K (single) / $250K (MFJ).
Partial Exclusion (Job / Health / Unforeseen)
You did not meet the full 2-year test, but the sale was due to a qualifying reason (change in place of employment, health condition requiring a move, or unforeseen circumstances). Calculate your reduced exclusion: max exclusion × (qualifying months / 24). Document the qualifying event carefully. IRS Reg. §1.121-3 provides the per-se qualifying events and the facts-and-circumstances standard for non-per-se events.
Not Qualified - Investment or Rental Property
The home was never your principal residence, or you failed to meet the use test by any amount and have no qualifying reason. The full gain is taxable as LTCG (and §1250 recapture for depreciation claimed). For investment property, use the Rental Income Tax Calculator to model your full exposure including depreciation recapture and cost basis allocation.
Disclaimer: This guide is for educational purposes only and does not constitute tax advice. Tax law is complex and individual circumstances vary. Consult a qualified tax professional or CPA before making decisions based on this content. National Tax Tools is not a tax advisory firm.