Capital Gains Tax Calculator – U.S. Real Estate
Estimate your capital gain, exclusion, and federal tax for property sales. Based on IRS §121 primary residence rules.
Inputs
Primary residence rules
- Owned and used the home for at least 2 years in the last 5.
- Did not claim another exclusion in the past 2 years.
- $500k exclusion if MFJ and both meet use test; otherwise $250k.
Results
Total Capital Gain
$0
Exclusion Applied
$0
Taxable Gain
$0
Estimated Federal Tax Owed
$0
How to Use This Capital Gains Tax Calculator
- Enter the property’s Sale Price
- Enter the Original Purchase Price
- Enter the total Cost of Improvements (renovations, additions, upgrades)
- Enter Selling Costs (agent commissions, title fees, transfer taxes)
- Select your Filing Status (Single, Married Filing Jointly, Married Filing Separately)
- Check if the property qualifies as your primary residence (2 of last 5 years)
- If Married Filing Jointly, check if both spouses meet the 2-year use test
- Select your assumed capital gains tax rate (15% typical, 20% higher income, or 23.8% with NIIT)
- Click Calculate — see your total gain, exclusion, taxable gain, and estimated tax owed
How Capital Gains Tax is Calculated (Formula)
The calculator follows IRS Section 121 rules for primary residence exclusion:
Adjusted Basis = Purchase Price + Improvements
Total Capital Gain = Sale Price − Selling Costs − Adjusted Basis
Exclusion = (Qualifies ? (Filing Status === MFJ ? $500,000 : $250,000) : $0)
Taxable Gain = Max(0, Total Gain − Exclusion)
Estimated Tax Owed = Taxable Gain × Capital Gains Rate
Real Example
Inputs:
- Sale Price: $850,000
- Original Purchase Price: $450,000
- Improvements: $65,000
- Selling Costs: $40,000
- Filing Status: Married Filing Jointly
- Qualifies for Exclusion: Yes
- Both spouses meet use test: Yes
- Capital Gains Rate: 15%
Results:
- Adjusted Basis: $515,000 ($450k + $65k)
- Total Capital Gain: $295,000 ($850k − $40k − $515k)
- Exclusion Applied: $295,000 (up to $500k MFJ limit)
- Taxable Gain: $0 (fully excluded)
- Estimated Federal Tax Owed: $0
Why Use This Capital Gains Tax Calculator?
- ✅ IRS Section 121 Compliant — Follows primary residence exclusion rules
- ✅ Includes Improvements — Renovations and additions increase your cost basis
- ✅ Includes Selling Costs — Commissions and fees reduce your taxable gain
- ✅ Married Filing Jointly Logic — Correctly applies $500k exclusion when both spouses qualify
- ✅ Multiple Tax Rate Options — 15% (typical), 20% (higher income), or 23.8% (including NIIT)
- ✅ Step-by-Step Explanation — Shows the full calculation breakdown
- ✅ Free & Unlimited — No signup required
- ✅ Mobile Friendly — Responsive design for phones, tablets, and desktops
Frequently Asked Questions
What is the Section 121 primary residence exclusion?
IRS Section 121 allows homeowners to exclude up to:
– $250,000 of capital gains (single filers)
– $500,000 of capital gains (married filing jointly)
Requirements: Owned and lived in the home for at least 2 of the last 5 years before sale.
What counts as a capital improvement?
Improvements that increase your home’s value or extend its life:
✅ Kitchen or bathroom renovation
✅ Room addition or finished basement
✅ New roof, HVAC system, or windows
✅ Landscaping, deck, or fence
✅ New flooring or siding
❌ Repairs and maintenance (paint, fixing leaks) do NOT count
What selling costs can I deduct?
Deductible selling costs include:
– Real estate agent commissions
– Title fees and escrow charges
– Transfer taxes and recording fees
– Legal fees
– Home warranty premiums
These reduce your capital gain before applying the exclusion.
What capital gains tax rate applies?
Long-term capital gains tax rates for 2026 (based on taxable income):
– 0%: Single up to $47,025 / MFJ up to $94,050
– 15%: Single $47,026-$518,900 / MFJ $94,051-$583,750 (most common)
– 20%: Single over $518,900 / MFJ over $583,750
– +3.8% NIIT (Net Investment Income Tax) for high earners (over $200k Single / $250k MFJ)
What if I don’t qualify for the full exclusion?
You may qualify for a reduced exclusion if you sold due to:
– Change in employment (moving 50+ miles for work)
– Health issues or doctor-recommended move
– Unforeseeable events (divorce, multiple births, damage to home)
– Death of spouse
What about state capital gains tax?
This calculator estimates federal capital gains tax only. Many states also tax capital gains (rates vary 0-13.3%). Consult a tax professional for state-specific calculations.
How to avoid paying capital gains tax on home sale?
Strategies to reduce or eliminate capital gains tax:
1. Live in the home for 2 of the last 5 years — qualify for Section 121 exclusion
2. Keep receipts for improvements — increase your cost basis
3. Time the sale — if gain exceeds exclusion, sell in a lower-income year
4. 1031 exchange (investment properties only, not primary residence)
Related Real Estate & Tax Calculators
- Property Tax Calculator — Estimate annual property taxes
- Home Affordability Calculator — How much house can you afford?
- Mortgage Refinance Calculator — Should you refinance?
- Home Renovation ROI Calculator — Value added by improvements
- Real Estate Calculators — More property tools
Disclaimer: This capital gains tax calculator provides estimates for informational purposes only. Tax laws are complex and change frequently. This is not professional tax advice. Consult a qualified tax professional or CPA before making decisions based on these calculations.
