My home sale capital gains tax?
Type the sale price, what you paid, your improvements and selling costs. The home sale capital gains tax calculator, a capital gains tax calculator on sale of property you lived in, applies the home sale exclusion and works out the 2026 federal tax on the rest.
- Federal tax on the sale
- $21,198.00
Selling for $900,000.00 with a $386,000.00 gain, you exclude $250,000.00 and owe $21,198.00 of 2026 federal tax.
- Gain on the sale
- $386,000.00
- Gain you exclude
- $250,000.00
- Maximum exclusion
- $250,000.00
- Taxable gain
- $136,000.00
- Net investment income tax part
- $798.00
- Rate on the taxable gain
- 15.59%
- Gain after tax
- $364,802.00
Federal tax on the sale: $21,198.00. Selling for $900,000.00 with a $386,000.00 gain, you exclude $250,000.00 and owe $21,198.00 of 2026 federal tax.
How much of the gain is taxed?
Federal tax on the sale by sale price
The results are estimates for information only. They are not financial, tax, or legal advice. Check the numbers with your lender or a qualified professional before you decide. Terms of use
How to calculate
Estimates the 2026 federal capital gains tax on selling your home: the gain after selling costs and improvements, the $250,000 or $500,000 exclusion (or a partial one), and the tax on the rest.
Example with the default inputs (Sale price $900,000.00, Selling costs (optional) $54,000.00, Purchase price and buying costs $400,000.00, Improvements (optional) $60,000.00, Filing status Single, Owned and lived in it 2 of the last 5 years? Yes, Other income $85,000.00): Selling for $900,000.00 with a $386,000.00 gain, you exclude $250,000.00 and owe $21,198.00 of 2026 federal tax.
Method: Gain = (sale price − selling costs) − (purchase price and buying costs + improvements). Maximum exclusion = $250,000 ($500,000 married filing jointly); × months ÷ 24 for a partial exclusion; $0 with none. Taxable gain = gain − the smaller of the gain and the maximum exclusion. Tax = 2026 Form 1040 tax with the taxable gain (long-term, or short-term when owned 1 year or less) − tax without it, both with the standard deduction.
- Tax year 2026, federal tax only, your main home. Married filing jointly assumes both spouses lived in the home 2 of the last 5 years and neither excluded gain on another home in the last 2 years; other statuses use $250,000.
- Other income is ordinary income such as wages, with the standard deduction and no credits. Every amount is at most $1 trillion.
- Not included: depreciation claimed for a home office or rental use after May 6, 1997 (taxed up to 25% and never excluded), time the home was not your main home after 2008, the surviving spouse and military rules, and state tax. An estimate, not tax advice.
Worked examples
Each example is checked against the calculator on every build.
- Sale price $900,000.00, Selling costs (optional) $54,000.00, Purchase price and buying costs $400,000.00, Improvements (optional) $60,000.00, Filing status Single, Owned and lived in it 2 of the last 5 years? Yes, Other income $85,000.00 gives Gain on the sale $386,000.00, Gain you exclude $250,000.00, Taxable gain $136,000.00, Federal tax on the sale $21,198.00, Net investment income tax part $798.00, Gain after tax $364,802.00.Source: IRS Publication 523 (2025), Selling Your Home: gain or loss, the $250,000 and $500,000 exclusion, the eligibility test, and the partial exclusion (months ÷ 24), https://www.irs.gov/publications/p523; tax with the gain − tax without it on the 2026 Form 1040 (Qualified Dividends and Capital Gain Tax Worksheet with IRS Rev. Proc. 2025-32 breakpoints; Form 8960)
- Sale price $1,200,000.00, Selling costs (optional) $70,000.00, Purchase price and buying costs $500,000.00, Improvements (optional) $100,000.00, Filing status Married filing jointly, Owned and lived in it 2 of the last 5 years? Yes, Other income $150,000.00 gives Gain on the sale $530,000.00, Gain you exclude $500,000.00, Taxable gain $30,000.00, Federal tax on the sale $4,500.00, Net investment income tax part $0.00.Source: IRS Publication 523 (2025), Selling Your Home: gain or loss, the $250,000 and $500,000 exclusion, the eligibility test, and the partial exclusion (months ÷ 24), https://www.irs.gov/publications/p523 ($500,000 joint); tax with the gain − tax without it on the 2026 Form 1040 (Qualified Dividends and Capital Gain Tax Worksheet with IRS Rev. Proc. 2025-32 breakpoints; Form 8960) (15% on $30,000)
- Sale price $600,000.00, Selling costs (optional) $36,000.00, Purchase price and buying costs $380,000.00, Filing status Single, Owned and lived in it 2 of the last 5 years? Moved early, Months that count 15, Owned it for More than 1 year, Other income $70,000.00 gives Gain on the sale $184,000.00, Maximum exclusion $156,250.00, Gain you exclude $156,250.00, Taxable gain $27,750.00, Federal tax on the sale $4,162.50, Rate on the taxable gain 15%.Source: IRS Publication 523 (2025), Selling Your Home: gain or loss, the $250,000 and $500,000 exclusion, the eligibility test, and the partial exclusion (months ÷ 24), https://www.irs.gov/publications/p523 (partial exclusion: months ÷ 24 × $250,000); IRS Topic 701, Sale of your home, https://www.irs.gov/taxtopics/tc701
- Sale price $300,000.00, Selling costs (optional) $18,000.00, Purchase price and buying costs $320,000.00, Filing status Single, Owned and lived in it 2 of the last 5 years? Yes, Other income $60,000.00 gives Gain on the sale -$38,000.00, Gain you exclude $0.00, Taxable gain $0.00, Federal tax on the sale $0.00.Source: IRS Publication 523 (2025), Selling Your Home: gain or loss, the $250,000 and $500,000 exclusion, the eligibility test, and the partial exclusion (months ÷ 24), https://www.irs.gov/publications/p523 (a loss on the sale of your main home cannot be deducted)
How it works
- Gain on the sale = (sale price − selling costs) − (purchase price and buying costs + improvements). Empty optional boxes count as $0. Below $0 is a loss, which is not deductible, so a loss gives $0 excluded, $0 taxable and $0 tax.
- Maximum exclusion: $500,000 married filing jointly, $250,000 for every other filing status.
- "Yes" (owned and lived in it 2 of the last 5 years): the full amount.
- "Moved early": the full amount × months ÷ 24, where months (0 to 24) is the shortest of the months you owned it, the months you lived in it in the last 5 years, and the months since you last excluded gain on a home.
- "No": $0.
- Gain you exclude = the smaller of the gain and the maximum exclusion (for a gain above $0).
- Taxable gain = gain − the gain you exclude.
- Federal tax on the sale = the 2026 federal tax with the taxable gain − the federal tax without it. Both returns have your other income as ordinary income (not wages), the standard deduction ($16,100 single and married filing separately, $32,200 married filing jointly and qualifying surviving spouse, $24,150 head of household) and no credits:
- the taxable gain is a long-term capital gain when you answered "Yes", or when you owned the home more than 1 year; otherwise ("1 year or less") a short-term gain, taxed as ordinary income. "Moved early" with more than 12 months that count and "1 year or less" contradict each other (the months that count are never more than the months you owned it), so there is no answer: "More than 12 months that count means you owned the home more than 1 year, so the gain is long-term.";
- tax on taxable income follows Form 1040 line 16: below $100,000 the Tax Table (the 2026 rate schedule at the middle of the income's row: rows of $0 to $5, $5 to $15 and $15 to $25, then $25 rows up to $3,000 and $50 rows from $3,000, rounded to whole dollars, half up), and the exact rate schedule from $100,000;
- a long-term gain goes through the Qualified Dividends and Capital Gain Tax Worksheet: ordinary income first, then the gain at 0% up to $49,450 of taxable income ($98,900 joint and surviving spouse, $66,200 head of household, $49,450 separately), 15% up to $545,500 ($613,700 joint and surviving spouse, $579,600 head of household, $306,850 separately) and 20% above, but never more than the tax figured as if it were ordinary income;
- the 3.8% net investment income tax on the lesser of the taxable gain and modified AGI over $200,000 ($250,000 joint and surviving spouse, $125,000 separately).
- Net investment income tax part = that tax with the gain − without it.
- Rate on the taxable gain = tax on the sale ÷ taxable gain × 100 (shown when the taxable gain is above $0).
- Gain after tax = gain − tax on the sale.
The gain amounts are exact decimals of what you typed; the federal tax uses the site's tax engine, which works in floating point, and the results show to the cent. If the gain, the maximum exclusion, the excluded or the taxable gain, or the rate is not 0 but too small to show as a number, there is no answer: 'A result is too small to show as a number: check the amounts.'
Figures that change each year
| Figure | 2026 value | Source | Next update |
|---|---|---|---|
| Home sale exclusion | $250,000; $500,000 joint | Publication 523; 26 U.S.C. 121(b) | Fixed by law (not indexed) |
| Top of the 0% long-term rate (taxable income) | $49,450; $98,900 joint; $66,200 head of household | Rev. Proc. 2025-32 section 4.03 | The IRS inflation-adjustment revenue procedure for 2027 (October to November 2026) |
| Top of the 15% long-term rate | $545,500; $613,700 joint; $579,600 head of household; $306,850 separate | Rev. Proc. 2025-32 section 4.03 | Same |
| Tax brackets and standard deduction | Rev. Proc. 2025-32 sections 4.01 and 4.14 | Rev. Proc. 2025-32 | Same |
| Net investment income tax | 3.8% over $200,000 ($250,000 joint) | Form 8960 instructions | Fixed by law (not indexed) |
When the data is out of date
After April 15, 2027 the page keeps using the 2026 tax tables and says so above the result.
Assumptions
- Tax year 2026, federal tax only, the sale of your main home. A joint return assumes both spouses meet the 2-year use test; other statuses use $250,000 (a surviving spouse who sells within 2 years of the death may qualify for $500,000).
- Other income is ordinary income such as wages, with the standard deduction and no credits. Every amount is at most $1 trillion.
- Left out: depreciation after May 6, 1997 (taxed up to 25%), periods after 2008 when the home was not your main home, military and other special rules, and state tax. An estimate, not tax advice.
Worked examples by hand
Single, sold for $900,000 with $54,000 of selling costs, bought for $400,000, $60,000 of improvements, $85,000 of other income. Gain = 846,000 − 460,000 = $386,000; exclude $250,000; taxable gain = $136,000. Without the sale: taxable income = 85,000 − 16,100 = 68,900; Tax Table row middle 68,925: 1,240 + 4,560 + 22% × 18,525 = 9,875.50, so $9,876. With it: taxable income = 204,900, of which 136,000 is gain; the ordinary 68,900 is taxed $9,876, the gain sits above $49,450, so 15% × 136,000 = 20,400; tax = $30,276. Net investment income tax: modified AGI 221,000 is $21,000 over $200,000, so 3.8% × 21,000 = $798. Tax on the sale = 30,276 + 798 − 9,876 = $21,198; gain after tax = $364,802.
Married filing jointly, sold for $1,200,000 with $70,000 of costs, bought for $500,000, $100,000 of improvements, $150,000 of other income. Gain = 1,130,000 − 600,000 = $530,000; exclude $500,000; taxable gain = $30,000. Taxable income without the sale = 150,000 − 32,200 = 117,800 (above the 0% limit of $98,900), so the gain is taxed at 15%: $4,500. Modified AGI of $180,000 is under $250,000: no net investment income tax.
Single, moved after 15 months for a new job: sold for $600,000 with $36,000 of costs, bought for $380,000, $70,000 of other income. Gain = 564,000 − 380,000 = $184,000; maximum exclusion = 15 ÷ 24 × 250,000 = $156,250; taxable gain = $27,750, long-term. Taxable income without it is 53,900, above $49,450, so the gain is taxed at 15% = $4,162.50.
A loss: sold for $300,000 with $18,000 of costs, bought for $320,000. Gain = 282,000 − 320,000 = −$38,000. A loss on your own home is not deductible: $0 tax.
Other questions people ask
How much capital gains tax do I pay when I sell my house?
Often none. If you owned and lived in the home for 2 of the 5 years before the sale, you exclude up to $250,000 of gain ($500,000 married filing jointly). Gain above that is taxed at 0%, 15% or 20% if you owned the home more than a year, plus the 3.8% net investment income tax at higher incomes. A single seller with a $386,000 gain and $85,000 of other income pays about $21,198.
How do I figure the gain on my home?
Gain = (sale price − selling costs) − (purchase price + buying costs + improvements). Selling costs are commissions, title, legal and other closing costs you paid; improvements are things that add value or life, like a new roof or kitchen, not repairs. A loss on your own home is not deductible.
Who gets the $500,000 exclusion?
Married couples filing jointly, when both spouses lived in the home for 2 of the last 5 years, at least one owned it for 2 of those years, and neither excluded gain on another home in the 2 years before. If only one spouse lived there 2 years, the limit is generally $250,000.
What if I sell before living there 2 years?
If you moved for a new job at least 50 miles farther away, for health reasons, or because of an unforeseen event such as a divorce, death or job loss, you get part of the exclusion: months ÷ 24 × $250,000 ($500,000 jointly). Months is the shortest of the time you owned it, the time you lived in it in the last 5 years, and the time since you last used the exclusion. Moving after 15 months gives 15/24 × $250,000 = $156,250.
Is the 2-year rule 2 years in a row?
No. The 24 months of ownership and of living in the home can be at any time in the 5 years before the sale, and they do not have to overlap. Short absences such as vacations still count as living there.
Do I have to report the sale if the gain is excluded?
Only if you got a Form 1099-S or have taxable gain. Then you report it on Form 8949 and Schedule D, showing the exclusion. Without a 1099-S and with all the gain excluded, you do not report it.
What about depreciation I took for a home office or rental?
Depreciation claimed after May 6, 1997 cannot be excluded; that part of the gain is taxed at up to 25%. This calculator leaves it out, so if you claimed depreciation your tax will be higher.