HomeEquityKit

2026 Home Sale Capital Gains Tax Calculator (IRS IRC § 121)

Model your adjusted basis (improvements + closing fees), $250,000/$500,000 primary residence exclusion, prior rental depreciation recapture, and 2026 LTCG + NIIT.

2026 Standards Verified · FHFA $832,750 Limit · HPA 78%/80% PMI · IRC § 121 · No Lead Forms·Methodology

Purchase Basis, Improvements & Sale Proceeds

Federal Filing Status (IRC § 121 Cap)
$
$
$

Roof, remodel, HVAC — not routine repairs

$
$
$

Sets your 0%/15%/20% LTCG & NIIT stack

$

Subject to 25% Unrecaptured § 1250 tax (cannot be excluded by § 121)

Estimated 2026 Federal Tax Due100% Excluded Under § 121
$0

Taxable long-term gain after § 121 exclusion: $0.

Amount Realized (Sale - Selling Costs)
$840,000
Adjusted Cost Basis
$408,000
Total Capital Gain
$432,000
IRS IRC § 121 Exclusion Applied
-$432,000
Taxable Long-Term Capital Gain
$0
Federal LTCG Tax (0% / 15% / 20%)
$0
3.8% Net Investment Income Tax (NIIT)
$0
Total Estimated Federal Tax
$0

Educational Estimate Only: Not a loan offer, appraisal, legal, or tax advice. HomeEquityKit is an independent publisher — not a lender, broker, title company, or CPA. 100% browser-local calculation; 0 KB uploaded.

Worked Example: Married vs. Single Selling an $880,000 Home Purchased for $350,000

Suppose you purchased your primary residence for $350,000, added $50,000 in documented capital improvements (roof, kitchen remodel), and sell it for $880,000 with $40,000 in broker commissions and closing costs.

Your Adjusted Basis is $400,000 and your Amount Realized is $840,000, yielding a net capital gain of $440,000. If you are Married Filing Jointly (MFJ) and lived in the home for at least 2 of the past 5 years, the $500,000 IRC § 121 exclusion wipes out the entire $440,000 gain — leaving $0 federal tax.

Under the exact same numbers as a Single filer ($250,000 exclusion), $190,000 remains taxable ($440,000 − $250,000). Stacked on $150,000 of other taxable income, that triggers $28,500 in 15% federal LTCG tax plus $5,320 in 3.8% NIIT ($33,820 total).

IRS IRC § 121 Adjusted Basis, Exclusion & 2026 LTCG Stacking

Adjusted Basis      = Purchase_Price + Buying_Fees + Capital_Improvements - Prior_Depreciation
Amount Realized     = Sale_Price - Selling_Costs (commissions, transfer tax, title)
Total Capital Gain  = max(0, Amount_Realized - Adjusted_Basis)
Sec. 1250 Recapture = min(Total_Gain, Prior_Depreciation)  [Taxed up to 25%, NOT excludable]
Taxable LTCG        = max(0, (Total_Gain - Recapture) - Sec_121_Exclusion)
NIIT (3.8%)         = 3.8% * min(Taxable_Investment_Gain, max(0, MAGI - $200k/$250k))

Routine maintenance and repairs (painting, fixing a leak) do NOT increase cost basis, whereas permanent capital improvements that add value or prolong useful life (new roof, HVAC, room addition, kitchen renovation) DO increase basis. Keep receipts — every $10,000 of documented improvements can save $1,500–$2,380 in federal tax if your gain exceeds the § 121 exclusion.

Official Regulatory & Statutory Sources

2026 Federal Long-Term Capital Gains & IRC § 121 Thresholds

Parameter (2026 Tax Year)Single FilerMarried Filing Jointly (MFJ)
IRC § 121 Exclusion (2-of-5-Yr Rule)$250,000$500,000
0% Federal LTCG Bracket (up to)$49,450 taxable income$98,900 taxable income
15% Federal LTCG Bracket (up to)$545,500 taxable income$613,700 taxable income
20% Federal LTCG Bracket (above)Over $545,500Over $613,700
3.8% NIIT MAGI Threshold$200,000 MAGI$250,000 MAGI

Frequently Asked Questions

What is the IRS 2-out-of-5-year rule for selling a primary residence?+

To claim the full $250,000 (Single) or $500,000 (Married Filing Jointly) IRC § 121 exclusion, you must have owned the home AND lived in it as your main home for at least 24 months (730 days, not necessarily consecutive) during the 5 years ending on the closing date.

Which home improvements count toward increasing my cost basis?+

Per IRS Publication 523, capital improvements that add value, adapt the home to new uses, or extend its life increase your basis — including additions, new roofs, central HVAC, kitchen/bath remodels, driveways, and landscaping. Routine repairs and maintenance do not.

Does the $250k/$500k exclusion wipe out prior rental depreciation recapture?+

No. Any depreciation you claimed (or were allowed to claim) while renting out the property or claiming a home office after May 6, 1997 is taxed as Unrecaptured Section 1250 Gain at up to 25% and cannot be shielded by the § 121 exclusion.

Does the 3.8% Net Investment Income Tax (NIIT) apply to excluded home sale gains?+

No. Only the taxable portion of your home sale gain above your IRC § 121 exclusion counts toward your Modified Adjusted Gross Income (MAGI) and Net Investment Income for the 3.8% NIIT.