Capital Gains Tax on Real Estate (2026)
Selling a house or investment property is often the largest financial transaction of a person's life — and the tax implications are substantial. The good news: most homeowners pay little or no capital gains tax when they sell their primary residence thanks to a powerful exclusion. Rental property owners face a different set of rules, including depreciation recapture. This guide covers both situations for the 2026 tax year.
Selling your primary residence — the Section 121 exclusion
Under IRC Section 121, you can exclude up to $250,000 of capital gain (single filers) or $500,000 (married filing jointly) when you sell your primary home — completely tax-free at the federal level. This is the most valuable tax break available to most Americans.
Qualification requirements
To qualify for the full exclusion, you must meet both the ownership and use tests:
- Ownership test: You owned the home for at least 2 years during the 5-year period ending on the sale date.
- Use test: You used the home as your primary residence for at least 2 years during the same 5-year period.
The two required years do not need to be continuous. You could have lived in the home for 18 months, rented it for 3 years, moved back for 6 months, and still qualify if your cumulative primary residency totals 24 months within the 5-year window.
You can only use the Section 121 exclusion once every 2 years. If you sold another home within the past 2 years and used the exclusion, you are ineligible.
MFJ $500,000 exclusion requirements
For the $500,000 married filing jointly exclusion, both spouses must meet the use test (2 years of primary residence). Only one spouse needs to meet the ownership test. If only one spouse qualifies on the use test, the maximum exclusion is $250,000.
Partial exclusion for partial qualification
If you do not fully meet the 2-year requirement but had to sell due to a qualifying unforeseen circumstance (job change, health issue, divorce, or similar reason), you may claim a partial exclusion proportional to the time you met the requirements. For example, if you lived there for 12 months out of the required 24 and qualify for a partial exclusion, you could exclude $125,000 (single) or $250,000 (MFJ) — 50% of the full amount.
How to calculate your home sale gain
Your capital gain is determined by:
- Determine your adjusted basis: Original purchase price + closing costs at purchase + capital improvements (renovations, additions, new roof, new HVAC, etc.) − any casualty losses claimed − depreciation taken (if ever used as a rental)
- Calculate net proceeds: Sale price − selling expenses (agent commissions, closing costs, transfer taxes, staging, repairs required for sale)
- Gross gain: Net proceeds − Adjusted basis
- Apply the exclusion: Subtract up to $250,000 / $500,000 if you qualify
- Taxable gain: Any remaining gain above the exclusion is taxed at long-term capital gains rates
What counts as a capital improvement (vs. ordinary repair)?
Only capital improvements — not routine maintenance — can be added to your basis. The IRS distinguishes them as follows:
| Adds to Basis (Capital Improvement) | Does NOT Add to Basis (Repair) |
|---|---|
| New kitchen, bathroom remodel | Painting rooms |
| Room addition, new deck, new fence | Fixing broken windows |
| New roof, new HVAC, new water heater | Patching the existing roof |
| New flooring (not repairs) | Refinishing existing floors |
| Garage construction | Fixing the garage door opener |
| Swimming pool, landscaping, driveway | Lawn mowing and routine maintenance |
Keep receipts for all capital improvements — they can meaningfully reduce your gain. A $40,000 kitchen renovation saves $6,000 in federal tax for someone in the 15% bracket.
Worked example: primary home sale
Tom and Sarah (married, filing jointly) bought their home in 2017 for $350,000. They spent $80,000 on a kitchen addition and new roof. They sold in 2026 for $920,000 with $55,000 in selling costs.
- Adjusted basis: $350,000 + $80,000 = $430,000
- Net proceeds: $920,000 − $55,000 = $865,000
- Gross gain: $865,000 − $430,000 = $435,000
- Section 121 MFJ exclusion: − $500,000 → $0 taxable (gain is less than exclusion)
- Federal capital gains tax: $0
If the gain had been $550,000 instead (say, sale price was $1,035,000), only $50,000 would be taxable, and at long-term rates (likely 15% = $7,500 federal tax).
Rental property capital gains
Rental properties do not qualify for the Section 121 exclusion (unless the property was also your primary residence for 2+ years). When you sell a rental property you have held over one year, the gain is taxed at long-term capital gains rates — but with an important additional tax: depreciation recapture.
Depreciation recapture (Section 1250)
When you own rental real estate, the IRS requires you to deduct depreciation each year (residential property depreciates over 27.5 years, commercial over 39 years). When you sell, the IRS recaptures all those depreciation deductions and taxes them at a special maximum rate of 25%, regardless of your income level. This applies even if you are otherwise in the 0% long-term capital gains bracket.
The formula is:
- Accumulated depreciation = Annual depreciation × Years owned
- Unrecaptured Section 1250 gain = lesser of (accumulated depreciation) or (total gain)
- This portion is taxed at max 25%
- Remaining gain above the recaptured amount = regular long-term capital gains rates (0/15/20%)
Worked example: rental property sale
Jennifer bought a rental condo 10 years ago for $300,000 and has been depreciating it. She sells for $550,000 with $25,000 in selling costs. She is in the 15% long-term bracket. Annual depreciation was $10,909 (residential: $300,000 ÷ 27.5 years).
- Adjusted basis (after depreciation): $300,000 − ($10,909 × 10) = $300,000 − $109,090 = $190,910
- Gross gain: ($550,000 − $25,000) − $190,910 = $525,000 − $190,910 = $334,090
- Depreciation recapture portion: $109,090 taxed at 25% = $27,272
- Remaining long-term gain: $334,090 − $109,090 = $225,000 taxed at 15% = $33,750
- Total federal tax: $27,272 + $33,750 = $61,022
The 1031 like-kind exchange — defer everything
Under IRC Section 1031, you can sell an investment property and defer 100% of the capital gains tax — including depreciation recapture — by rolling the proceeds into a qualifying "like-kind" replacement property. Key rules:
- 45-day identification window: You must identify up to 3 potential replacement properties within 45 days of closing the sale.
- 180-day closing window: You must close on the replacement property within 180 days of the sale.
- Qualified intermediary required: You cannot directly receive the sale proceeds. A Qualified Intermediary (QI) holds them in escrow during the exchange.
- Equal or greater value: To defer all tax, the replacement property must be of equal or greater value, and you must reinvest all equity. Receiving any cash ("boot") triggers partial taxation.
- Investment property only: Your primary residence does not qualify. Vacation homes may qualify with restrictions.
The deferred tax is not forgiven — it follows you into the replacement property. Each subsequent exchange continues the deferral. However, if you hold the replacement property until death, your heirs receive a stepped-up basis and the accumulated deferred tax is permanently eliminated.
NIIT on real estate gains
Real estate gains are included in Net Investment Income for NIIT purposes. If your MAGI exceeds $200,000 (single) or $250,000 (MFJ), you owe an additional 3.8% NIIT on the taxable gain. This applies to both rental property gains and primary home gains above the Section 121 exclusion.
Primary home gains that are fully covered by the exclusion are NOT subject to NIIT — the excluded amount does not count as net investment income.
State taxes on real estate gains
All of the above is federal. Your state will also claim its share — most states tax real estate gains as ordinary income at full state rates, with no equivalent to the Section 121 exclusion (though most states honor the federal exclusion by conformity). California's 13.3% top rate applies to home sale gains above the federal exclusion amount, for instance.
See individual state guides for your state's rate and rules.
Installment sales — spread the gain over years
If you sell real property and carry back a note (seller financing), you can report the gain using the installment method (Form 6252). Instead of recognizing the full gain in the year of sale, you recognize gain proportionally each year as you receive principal payments. This can:
- Keep each year's taxable income in a lower bracket
- Potentially reduce NIIT exposure if each year's gain stays near or below the threshold
- Generate interest income on the note (taxed as ordinary income)
Depreciation recapture must be recognized in full in the year of sale regardless of installment treatment — it cannot be spread. Installment sales are complex and require careful planning with a CPA.
Frequently asked questions
If I inherit a home and sell it, do I pay capital gains tax?
Generally very little. Inherited property receives a stepped-up basis to fair market value at the date of the decedent's death. If you sell the home soon after inheriting it (while prices are relatively unchanged), your gain is near zero. The sale is automatically classified as long-term. If the home has appreciated since your inherited it, you owe long-term capital gains tax only on that additional appreciation.
Can I use the $250k exclusion on a vacation home?
Only if it also qualifies as your primary residence. You must have used the vacation home as your primary residence for at least 2 of the last 5 years. A vacation home that you visit a few weeks per year and rent the rest of the time does not qualify for the Section 121 exclusion on the rental portion. Since the Tax Cuts and Jobs Act (2017), the exclusion must be apportioned between qualifying primary use periods and non-qualifying (rental or other) use periods for homes acquired after 2008.
What if I have a home office in my house?
If you have claimed home office deductions that included depreciation for a portion of your home, that depreciation must be recaptured when you sell — even if the rest of the gain is excluded under Section 121. The home office depreciation is taxed at the 25% depreciation recapture rate. Keep records of home office depreciation taken over the years.
What is the holding period for real estate?
The same 1-year rule applies: if you sell real estate you have held for more than one year, any gain is long-term. For real property, the holding period begins on the date of purchase (the closing date). Flipping a house within a year produces a short-term gain taxed as ordinary income — up to 37%. Most real estate investors plan to hold at least 13 months to ensure long-term treatment even if paperwork takes longer than expected.