Home Sale Capital Gains Calculator
Estimate the 2026 federal tax on selling your primary home after the Section 121 exclusion: adjusted basis, taxable gain, and long-term capital gains tax.
Total federal tax
Long-term capital gains tax plus any net investment income tax on the taxable gain.
$9,750.00
- What this means
- The exclusion covers part of the gain; the remainder is taxable at long-term rates.
- Total gain
Amount realized minus adjusted basis. Negative means a loss, which is not deductible.
- $315,000.00
- Excluded by Section 121
The part of the gain removed by the exclusion.
- $250,000.00
- Taxable gain
The gain left after the exclusion, taxed at long-term rates.
- $65,000.00
- Adjusted basis
Purchase price plus purchase closing costs plus capital improvements.
- $296,000.00
- Amount realized
Sale price minus selling costs.
- $611,000.00
- Capital gains tax
- $9,750.00
- Net investment income tax
An extra 3.8 percent when modified AGI is over the threshold (200k single, 250k married).
- $0.00
- Effective rate on the gain
Total federal tax divided by the total gain.
- 3.10%
Gain and tax breakdown
| Item | Amount |
|---|---|
| Sale price | $650,000.00 |
| Selling costs | -$39,000.00 |
| Adjusted basis | -$296,000.00 |
| Total gain | $315,000.00 |
| Section 121 exclusion | -$250,000.00 |
| Taxable gain | $65,000.00 |
| Federal tax owed | -$9,750.00 |
Quick answer: With the example inputs this page loads by default, the headline result (Total federal tax) comes to $9,750.00. Estimate the 2026 federal tax on selling your primary home after the Section 121 exclusion: adjusted basis, taxable gain, and long-term capital gains tax. Change any input above and every figure updates instantly in your browser.
Figures shown are for the 2026 tax year. The calculator always applies the current year's figures.
Your inputs never leave your browser, and nothing is stored. See our privacy policy .
Fact-check: results on this page are verified against an independently coded reference oracle that covers all 106 calculators on this site. See how we verify .
When you sell your primary home, the taxable gain is your sale price minus selling costs and your adjusted basis (what you paid plus improvements). The Section 121 exclusion then removes up to $250,000 of gain if you are single, or $500,000 if married filing jointly, when you owned and lived in the home for 2 of the last 5 years. This calculator estimates the federal tax on whatever gain is left for the 2026 tax year.
What this result means
The headline is the federal tax you would owe on the sale after the Section 121 exclusion. Most home sellers owe nothing: if your gain is below the exclusion ($250,000 single, $500,000 married filing jointly), the exclusion wipes it out and the tax is zero. Only the gain above the exclusion is taxable, and it is taxed at the long-term capital gains rates of 0, 15, or 20 percent, stacked on top of your other taxable income. High earners may also owe the 3.8 percent net investment income tax on the taxable portion once modified AGI passes $200,000 single or $250,000 married filing jointly. If you do not meet the 2-of-5-year ownership and use test, no exclusion applies and the entire gain is taxable. This is a federal estimate only. It does not include state tax, depreciation recapture from prior rental or business use, or partial exclusions for a work, health, or unforeseen-circumstances move. This is an estimate for education, not tax advice.
Assumptions
- Estimates are for the 2026 federal tax year and cover a primary residence only. Your adjusted basis is the original purchase price plus purchase closing costs plus capital improvements. Your amount realized is the sale price minus selling costs. The gain is the amount realized minus the adjusted basis.
- The Section 121 exclusion removes up to $250,000 of gain for a single filer or head of household, and up to $500,000 for a married couple filing jointly, when you owned and used the home as your main residence for at least 2 of the 5 years before the sale. These limits are statutory (Taxpayer Relief Act of 1997) and have never been adjusted for inflation. The married 500,000 dollar limit assumes both spouses meet the use test and neither excluded a gain on another home in the prior 2 years.
- If you answer that the home does not meet the 2-of-5-year ownership and use test, no exclusion is applied and the full gain is taxable. The calculator does not model a reduced (partial) exclusion for a sale forced by a change in workplace, health, or other unforeseen circumstances; a qualifying partial exclusion could lower the tax.
- Because a qualifying primary-home sale has been held for at least 2 years, the gain is treated as long-term. The taxable gain (the part above the exclusion) stacks on top of your other taxable income and is taxed through the 2026 long-term capital gains brackets of 0, 15, and 20 percent for your filing status, so part of it can fall in a lower band and part higher.
- The Net Investment Income Tax adds 3.8 percent on the lesser of the taxable gain or the amount your modified AGI (your other taxable income plus the taxable gain) exceeds the statutory threshold of $200,000 single and head of household or $250,000 married filing jointly. These thresholds are not adjusted for inflation.
- A loss on the sale of a primary home is shown but is treated as zero tax, because a personal-residence loss is not deductible. Enter improvements only, not repairs or maintenance: improvements add value or prolong the home's life and are added to basis, while ordinary repairs are not.
- Federal tax only. State capital gains tax is not included, and many states tax the gain as ordinary income. Also not modeled: depreciation recapture on any period the home was rented or used for business (this is taxed separately and is out of scope here, see the rent-vs-sell and rental calculators), the alternative minimum tax, and any interaction with other income items.
- All figures are rounded to the nearest cent. This is an estimate for educational purposes only, not tax advice. Confirm the current limits and rates with the IRS or a tax professional before acting.
Key terms
Definitions for the terms this calculator uses, in our finance glossary .
How it works
When you sell your primary home, the taxable gain is not simply the price minus what you paid. It is built up in a few steps, and for most sellers the Section 121 exclusion erases it entirely.
Adjusted basis is what the home cost you for tax purposes: the original purchase price, plus the closing costs you paid to buy it, plus any capital improvements. Improvements are things that add value or prolong the home’s life, such as a renovation, an addition, or a new roof. Ordinary repairs and maintenance do not count.
Amount realized is your sale price minus your selling costs, such as the agent commission and transfer taxes.
Gain is the amount realized minus the adjusted basis. If it is negative, the sale is a loss, and a loss on a personal residence is not deductible, so no tax is due.
The Section 121 exclusion then removes up to $250,000 of gain if you file single or head of household, or up to $500,000 if you are married filing jointly. To qualify you must have owned the home and used it as your main residence for at least 2 of the 5 years before the sale (the ownership and use test), and generally not have claimed the exclusion on another home in the prior 2 years. The married $500,000 limit assumes both spouses meet the use test. These dollar limits were set by the Taxpayer Relief Act of 1997 and have never been adjusted for inflation, so a long-held home can grow past them.
The taxable gain is whatever is left after the exclusion. Because a qualifying home has been held for years, it is a long-term gain, taxed at the federal rates of 0, 15, or 20 percent. The rate is not flat: the taxable gain stacks on top of your other taxable income, filling the 0 percent band first, then 15 percent, then 20 percent, using the 2026 thresholds for your filing status. Higher earners may also owe the 3.8 percent Net Investment Income Tax on the lesser of the taxable gain or the amount their modified adjusted gross income exceeds $200,000 (single, head of household) or $250,000 (married filing jointly). Those thresholds are statutory and are not indexed for inflation either.
Worked example
A single filer bought a home for $250,000, paid $6,000 in purchase closing costs, and later spent $40,000 on a renovation. They sell for $650,000 and pay $39,000 in selling costs, with $90,000 of other taxable income, for 2026.
- Adjusted basis: $250,000 + $6,000 + $40,000 = $296,000.
- Amount realized: $650,000 minus $39,000 = $611,000.
- Gain: $611,000 minus $296,000 = $315,000.
- Section 121 exclusion (single): $250,000, so the taxable gain is $315,000 minus $250,000 = $65,000.
- The $65,000 stacks on $90,000 of income, landing inside the 15 percent long-term band ($49,450 to $545,500), so the tax is $65,000 times 15 percent = $9,750.
- Modified AGI of $155,000 is below the $200,000 NIIT threshold, so no NIIT applies.
The effective federal rate on the whole $315,000 gain is about 3.1 percent, because the exclusion does most of the work. Had this been a married couple filing jointly, the $500,000 exclusion would have covered the full $315,000 gain and the tax would be $0.
Scope and limitations
Federal tax only, for the 2026 tax year, and for a primary residence. If the home does not meet the 2-of-5-year ownership and use test, the calculator applies no exclusion and the full gain is taxable; it does not model a reduced (partial) exclusion for a sale forced by a change in workplace, health, or other unforeseen circumstances, which could lower the tax. Not modeled: state capital gains tax (many states tax the gain as ordinary income), depreciation recapture on any period the home was rented or used for business (taxed separately and out of scope here), the alternative minimum tax, and other income interactions. Enter your ordinary taxable income after deductions so the long-term rate lands in the right band. This is an estimate for education, not tax advice.
Sources
- IRS, Topic no. 701, Sale of your home
- IRS, Publication 523, Selling your home
- IRS, Topic no. 559, Net investment income tax
- IRS, Topic no. 409, Capital gains and losses
- 2026 long-term capital gains thresholds: IRS Rev. Proc. 2025-32. Section 121 limits: statutory, Taxpayer Relief Act of 1997 (unchanged since).
Frequently asked questions
- Do I pay capital gains tax when I sell my house?
- Often you do not. If the home was your main residence for at least 2 of the last 5 years, the Section 121 exclusion removes up to $250,000 of gain if you file single, or $500,000 if married filing jointly. Only gain above that is taxable. Because home prices and the exclusion are large, most sellers owe no federal tax on a primary-home sale.
- What is the home sale exclusion?
- The Section 121 exclusion lets you exclude gain on the sale of your main home: up to $250,000 of gain for a single filer and up to $500,000 for a married couple filing jointly. To qualify you must have owned the home and used it as your main residence for at least 2 of the 5 years before the sale, and generally not have used the exclusion on another home in the prior 2 years.
- How is the taxable gain on a home sale calculated?
- Start with the amount realized, which is your sale price minus selling costs such as the agent commission. Subtract your adjusted basis, which is what you paid plus purchase closing costs plus capital improvements. That is your total gain. Then subtract the Section 121 exclusion. Whatever is left is the taxable gain, taxed at long-term capital gains rates.
- What tax rate applies to the gain above the exclusion?
- The taxable gain is taxed at the long-term capital gains rates of 0, 15, or 20 percent, based on your total taxable income, since a qualifying home has been held over a year. Higher earners may also owe the 3.8 percent net investment income tax. The taxable gain stacks on top of your other income, so it can span more than one rate band.
- Do capital improvements reduce my home sale tax?
- Yes. Capital improvements, such as a kitchen renovation, an addition, or a new roof, are added to your cost basis, which lowers your gain and can lower your tax. Keep receipts. Ordinary repairs and maintenance do not count and are not added to basis. Selling costs like the agent commission also reduce the gain.
Related calculators
By Sam Sage Last reviewed .