Home Sale Tax Calculator — Capital Gains on Property 2026
Free home sale tax calculator for 2026. Calculate capital gains tax on the sale of your home, rental property, or second home. Includes $250K/$500K exclusion, cost basis, and depreciation recapture. No sign-up.
When you sell your home, you may owe capital gains tax on the profit. If it's your primary residence and you've lived in it for at least 2 of the last 5 years, you can exclude up to $250,000 (single) or $500,000 (married) of the gain. Any remaining gain is taxed at long-term capital gains rates of 0%, 15%, or 20%, plus a 3.8% Net Investment Income Tax if your income is high enough. Rental properties are subject to depreciation recapture at 25%.
Last reviewed: February 2026 · By Rachel Mitchell, CPA · Information verified against IRS.gov & IRC Section 121
Home Sale Tax Quick Summary
Primary Residence Exclusion
$250K / $500K
$250,000 for single filers, $500,000 for married filing jointly. Must live in home 2 of last 5 years.
Long-Term Capital Gains Rate
0% / 15% / 20%
Plus 3.8% NIIT for high earners. Rate depends on your taxable income level.
Depreciation Recapture
25%
On accumulated depreciation for rental properties. Taxed regardless of your income bracket.
Enter your home sale details to estimate your capital gains tax. All calculations follow IRS rules for 2026.
Additions, renovations, new roof, etc. (not repairs)
Real estate commissions, closing costs, transfer taxes
Need 24+ months for full exclusion. 0–60 range.
How Capital Gains Tax on a Home Sale Works — Complete Guide
When you sell a home for more than you paid for it, the profit is a capital gain. The IRS taxes this gain, but several exclusions and rules can reduce or eliminate the tax. The biggest break is the Section 121 primary residence exclusion, which lets you exclude up to $250,000 (single) or $500,000 (married filing jointly) of the gain if you meet certain conditions.
The tax you owe depends on three main factors: (1) whether the home was your primary residence, a rental, or a second home; (2) how long you owned it (short-term vs. long-term); and (3) your overall taxable income, which determines your capital gains rate. Understanding these factors is key to calculating your tax accurately.
Primary residence exclusion (Section 121): To qualify, you must have owned and used the home as your primary residence for at least 2 of the 5 years before the sale. The 2 years don't need to be consecutive — you just need 24 months total. You can only use this exclusion once every 2 years. If you're married filing jointly, both spouses must meet the residency requirement, but only one needs to meet the ownership requirement.
Cost basis calculation: Your cost basis isn't just the purchase price. It's the purchase price plus capital improvements minus any depreciation you claimed. Capital improvements are projects that add value, prolong the home's life, or adapt it to a new use — think new roof, room addition, or major kitchen renovation. Repairs and maintenance (painting, fixing leaks) don't count. Selling costs like real estate commissions and closing fees also reduce your gain.
Short-term vs. long-term capital gains: If you owned the home for more than one year, the gain is long-term and taxed at preferential rates (0%, 15%, or 20%). If you owned it for one year or less, it's short-term and taxed at your ordinary income rate — which can be significantly higher. Most home sales involve long-term gains since people typically own homes for years.
Net Investment Income Tax (NIIT): If your modified adjusted gross income (MAGI) exceeds $200,000 (single) or $250,000 (MFJ), you may owe an additional 3.8% tax on your capital gains. This tax applies to the lesser of your net investment income or the amount your MAGI exceeds the threshold. It stacks on top of the regular capital gains rate.
Step-by-Step: How to Calculate Capital Gains on a Home Sale
Determine your cost basis
Start with the original purchase price, add the cost of capital improvements (new roof, room additions, major renovations), and subtract any depreciation you claimed (or could have claimed) on the property. This is your adjusted cost basis.
Subtract cost basis from sale price
Take the sale price and subtract your adjusted cost basis and selling costs (real estate commissions, title insurance, transfer taxes, and other closing costs). The result is your total capital gain.
Apply the primary residence exclusion
If the home was your primary residence and you lived there for at least 24 of the last 60 months, subtract $250,000 (single) or $500,000 (MFJ). If you lived there less than 24 months but qualify for a partial exclusion, prorate based on months lived.
Calculate tax on the remaining gain
Apply the appropriate long-term capital gains rate to the taxable gain: 0% if your taxable income is below ~$47K (single) / ~$94K (MFJ), 15% up to ~$518K / ~$583K, or 20% above those thresholds. Add 3.8% NIIT if your MAGI exceeds $200K / $250K.
Add depreciation recapture tax
If the property was ever rented out and you claimed depreciation, multiply the accumulated depreciation by 25%. Add this to your capital gains tax. The total is your overall tax on the sale.
Primary Residence Exclusion Rules (Section 121)
The Section 121 exclusion is the single most important tax break for home sellers. Here are the rules you need to know:
Exclusion Amounts
- • $250,000 for single filers
- • $500,000 for married filing jointly
- • Married couples: both must meet residency test
- • Only one spouse needs to meet ownership test
Qualification Requirements
- • Own and use as primary residence for 2 of 5 years
- • The 2 years don't need to be consecutive
- • Can only use exclusion once every 2 years
- • Must report sale even if gain is fully excluded
Partial Exclusion
- • Available if move due to health, job, or unforeseen events
- • Prorated: (months lived / 24) × full exclusion
- • IRS Safe Harbors: move >50 miles for work
- • Also: divorce, death of spouse, multiple births
Does NOT Apply To
- • Rental properties (never your primary residence)
- • Vacation / second homes
- • Home flipped in under 1 year
- • Property held in a corporation or trust
Rental Property & Second Home Sales
Selling a rental property or second home is very different from selling your primary residence. Here's what you need to know:
Depreciation recapture at 25%: When you sell a rental property, all the depreciation you claimed (or were entitled to claim) over the years is "recaptured" and taxed at a flat 25% rate. This is separate from the regular capital gains tax. For example, if you claimed $50,000 in depreciation over 10 years, you'll owe $12,500 in recapture tax, regardless of your income bracket. This is reported on Form 4797.
No primary residence exclusion for pure rentals: If the property was always a rental and never your primary residence, you cannot use the Section 121 exclusion. The entire gain is taxable. However, the gain above the depreciation recapture amount is still taxed at the more favorable long-term capital gains rates.
1031 exchange option: Instead of paying tax on the sale of a rental property, you can defer the gain by doing a 1031 like-kind exchange. You must identify a replacement property within 45 days and close within 180 days. The replacement property must be an investment or business property — not a personal residence. This defers the tax; it doesn't eliminate it. When you eventually sell without a 1031 exchange, you'll owe tax on the accumulated gain.
Converting rental to primary residence: If you move into your rental property and use it as your primary residence for at least 2 of the 5 years before selling, you may qualify for the Section 121 exclusion. However, the IRS has a 5-year look-back rule: any period after 2008 where the property was not your primary residence ("non-qualified use") reduces the exclusion proportionally. The depreciation recapture still applies regardless.
Capital Gains Tax Rates for 2026
Long-term capital gains (assets held more than one year) are taxed at preferential rates based on your taxable income. Here are the thresholds for 2026:
| Rate | Single | Married Filing Jointly |
|---|---|---|
| 0% | Up to ~$47,000 | Up to ~$94,000 |
| 15% | ~$47,000 to ~$518,000 | ~$94,000 to ~$583,000 |
| 20% | Over ~$518,000 | Over ~$583,000 |
+ 3.8% NIIT for high earners: If your MAGI exceeds $200,000 (single) or $250,000 (MFJ), the Net Investment Income Tax adds 3.8% on top of your capital gains rate. So the effective maximum rate is 23.8% (20% + 3.8%). This applies to the lesser of your net investment income or the amount your MAGI exceeds the threshold.
Short-term capital gains (property held one year or less) are taxed at ordinary income rates, which range from 10% to 37%. There is no preferential treatment for short-term gains. This is why holding a property for more than one year before selling is so important for tax purposes.
Home Sale Tax — Key Data for 2026
Primary Residence Exclusion (Single)
$250,000
Primary Residence Exclusion (MFJ)
$500,000
Long-Term Capital Gains Rate
0% / 15% / 20%
Depreciation Recapture Rate
25%
NIIT Rate
3.8%
Residency Test
2 of 5 years
0% Rate Threshold (Single)
~$47,000 taxable income
0% Rate Threshold (MFJ)
~$94,000 taxable income
Home Sale Tax Calculator FAQ
How much capital gains tax will I pay when I sell my house?
What is the Section 121 primary residence exclusion?
What if I don't meet the 2-of-5-year residency test?
How is cost basis calculated for a home sale?
What is depreciation recapture on a rental property sale?
Do I pay capital gains tax if I sell my house at a loss?
What is the 3.8% Net Investment Income Tax (NIIT)?
Can I avoid capital gains tax with a 1031 exchange?
What counts as a capital improvement vs. a repair?
How does selling a second home differ from a primary residence?
What are the capital gains tax rates for 2026?
Do I need to report the sale of my home to the IRS?
Related Calculators
Link to This Calculator
Help others find this free tool — add a link to your website or blog.
<a href="https://thetaxcalc.com/home-sale-tax-calculator" title="Home Sale Tax Calculator 2026 — Capital Gains on Property">Home Sale Tax Calculator 2026 — Capital Gains on Property</a>
Lead Tax Analyst, TheTaxCalc
Rachel Mitchell is a Certified Public Accountant with over 12 years of experience in individual and small-business taxation. She specializes in federal and state income tax compliance, FICA optimization, and payroll tax strategy. Rachel holds an MS in Taxation from Golden Gate University and is an active member of the AICPA.