When you sell your home, you may owe capital gains tax — but most homeowners qualify to exclude a significant portion of the profit. Under Section 121 of the Internal Revenue Code, you can exclude up to $250,000 of gain (single) or $500,000 (married filing jointly) from federal income tax, provided you have owned and lived in the home as your primary residence for at least 2 of the past 5 years. For 2026, these exclusion amounts remain unchanged. Any gain above the exclusion is taxed as a long-term capital gain.

Quick answer: Single filers exclude up to $250,000. Married filers exclude up to $500,000. You must have owned and used the home as your primary residence for at least 2 of the last 5 years. The exclusion can be used once every 2 years. Gains above the exclusion are taxed at long-term capital gains rates (0%, 15%, or 20%).

Section 121 Exclusion: Key Facts 2026

Item Detail
Exclusion — single filer $250,000
Exclusion — married filing jointly $500,000
Ownership test Owned for at least 2 of the last 5 years
Use test Used as primary residence for at least 2 of the last 5 years
Frequency limit Once every 2 years
Excess gains taxed at Long-term capital gains rates (0%, 15%, 20%)
NIIT on excess gains 3.8% for high earners

Two Tests You Must Pass

1. Ownership Test

You must have owned the home for at least 2 years within the 5-year period ending on the sale date. The 2 years do not need to be consecutive.

2. Use Test

You must have used the home as your principal residence for at least 2 years within the 5-year period ending on the sale date. Again, not required to be consecutive — a total of 730 days over the 5-year window qualifies.

Both tests are required. You can have owned a home for 10 years but if you rented it out for the last 3 years before sale and didn’t live there, you may fail the use test.

Calculating Your Taxable Gain

Step 1: Calculate your adjusted cost basis

$$ ext{Adjusted Basis} = ext{Purchase Price} + ext{Capital Improvements} - ext{Depreciation Taken}$$

Capital improvements that add to basis:

  • Room additions, new kitchens, new bathrooms
  • New roof, HVAC replacement, new windows
  • Landscaping and hardscaping (permanent)
  • Swimming pool, deck, fence

Do NOT add: repairs and maintenance (painting, fixing plumbing, etc.)

Step 2: Calculate gain

$$ ext{Gain} = ext{Sale Price} - ext{Selling Costs} - ext{Adjusted Basis}$$

Selling costs that reduce gain: real estate agent commissions, transfer taxes, advertising, legal fees.

Step 3: Apply the exclusion

$$ ext{Taxable Gain} = ext{Total Gain} - ext{Exclusion Amount}$$

Worked example — married couple:

Item Amount
Purchase price (2016) $350,000
Capital improvements $75,000
Adjusted basis $425,000
Sale price $1,000,000
Selling costs (6%) $60,000
Total gain $1,000,000 − $60,000 − $425,000 = $515,000
Section 121 exclusion (MFJ) −$500,000
Taxable gain $15,000

The couple owes long-term capital gains tax on $15,000. At the 15% rate, that’s $2,250 in federal tax — on a $1 million home sale. Without the exclusion, they would owe $77,250.

Partial Exclusion for Special Circumstances

If you do not fully meet the 2-year ownership and use tests, you can claim a partial exclusion if the primary reason for the sale was:

  • Job relocation — new job is at least 50 miles farther from the home than your old job
  • Health — a doctor recommended moving, or you moved to care for a family member
  • Unforeseen circumstances — death, divorce, disaster (flood, fire, etc.), multiple births, job loss, inability to make mortgage payments

Partial exclusion formula:

$$ ext{Partial Exclusion} = ext{Full Exclusion} imes rac{ ext{Months of Qualifying Use/Ownership}}{24}$$

Example: A single filer owns the home for 12 months and must relocate for a new job. Partial exclusion: $250,000 × (12/24) = $125,000

Special Situations

Surviving Spouse

If your spouse passed away within the last 2 years and you haven’t remarried, you can claim the full $500,000 married exclusion — provided the ownership and use tests were met jointly.

Divorce

A divorced spouse who receives the home as part of a divorce settlement can add the other spouse’s ownership period to meet the 2-year ownership test, even if they lived elsewhere.

Home Office or Rental Use

If you claimed home office deductions or rented part of your home, depreciation taken must be “recaptured” at ordinary income rates (up to 25%) — even when using the Section 121 exclusion. Keep records of all depreciation claimed to calculate this correctly.

Non-Resident Alien Sellers

Different rules apply under FIRPTA (Foreign Investment in Real Property Tax Act) for non-resident alien sellers. Buyers must withhold 15% of the sale price unless an exemption applies.

Do You Need to Report the Sale?

You do not need to report the home sale on your tax return if:

  • Your gain is fully excluded (under $250K/$500K), AND
  • You did not receive a Form 1099-S (proceeds from real estate transactions)

You must file Schedule D and Form 8949 if:

  • Your gain exceeds the exclusion amount
  • You received Form 1099-S
  • You are claiming a partial exclusion

Long-Term Capital Gains Rates on Excess Gains 2026

Filing Status 0% Rate Threshold 15% Rate 20% Rate Threshold
Single Up to $47,025 $47,025–$518,900 Over $518,900
Married Filing Jointly Up to $94,050 $94,050–$583,750 Over $583,750
Head of Household Up to $63,000 $63,000–$551,350 Over $551,350

High-income sellers (Modified AGI over $200K single / $250K MFJ) may also owe the 3.8% Net Investment Income Tax (NIIT) on the taxable gain.

The Section 121 exclusion is one of the most valuable tax benefits in the US tax code. Homeowners who have lived in their home for 2+ years and are selling in a rising market should plan their cost basis carefully — track every capital improvement, verify your 2-year ownership and use dates, and consult a tax professional if your gain approaches or exceeds the exclusion limit.

WealthVieu
Written by WealthVieu

WealthVieu researches and writes data-driven personal finance guides using primary sources including the IRS, Bureau of Labor Statistics, Federal Reserve, and Census Bureau.

The content on Wealthvieu is for informational purposes only and should not be considered financial, tax, or investment advice. Consult a qualified professional before making financial decisions. Full disclaimer · Editorial policy