Capital Gains Tax Calculator
Estimate 2026 federal tax on stock, fund or property gains the way the IRS worksheet does: short- and long-term gains, losses and carryover, qualified dividends, the 3.8% NIIT, and your room left at 0%.
How the calculator works
It follows the same four steps as your Form 1040:
- Net your short-term gains and losses, and separately your long-term gains and losses (Schedule D), including any loss carried over from last year.
- Combine the two. A net loss reduces your other income by up to $3,000 ($1,500 married filing separately); the rest carries forward.
- Work out taxable income: your other income plus net gains and qualified dividends, minus the standard deduction (or the deduction you enter).
- Stack long-term gains and qualified dividends on top of your ordinary income and apply 0%, 15% and 20% to the slices that fall in each band, exactly as in the IRS Qualified Dividends and Capital Gain Tax Worksheet. Then add the 3.8% net investment income tax if your income is over the threshold.
The headline number is the difference between your federal tax with the gains and without them, so it includes every knock-on effect, not just a flat rate times the gain.
2026 long-term capital gains rates
| Filing status | 0% on taxable income up to | 15% up to | 20% above |
|---|---|---|---|
| Single | $49,450 | $545,500 | $545,500 |
| Married filing jointly | $98,900 | $613,700 | $613,700 |
| Head of household | $66,200 | $579,600 | $579,600 |
| Married filing separately | $49,450 | $306,850 | $306,850 |
Source: IRS Rev. Proc. 2025-32, section 4.03. Short-term gains use the ordinary 2026 tax brackets.
2025 rates, for returns still being filed
If you filed an extension for your 2025 return (due October 15, 2026), switch the calculator's tax year to 2025. The 2025 long-term rates use these taxable-income ceilings:
| Filing status | 0% up to | 15% up to | 2025 standard deduction |
|---|---|---|---|
| Single | $48,350 | $533,400 | $15,750 |
| Married filing jointly | $96,700 | $600,050 | $31,500 |
| Head of household | $64,750 | $566,700 | $23,625 |
| Married filing separately | $48,350 | $300,000 | $15,750 |
Source: IRS Rev. Proc. 2024-40, sections 3.01 (brackets) and 3.03 (0% and 15% ceilings). The 2025 standard deduction is the higher amount set by the One Big Beautiful Bill Act and restated in Rev. Proc. 2025-32; the $15,000 single figure first published in Rev. Proc. 2024-40 no longer applies.
Three things most calculators miss
- Stacking. A single filer with $40,000 of taxable ordinary income and a $20,000 long-term gain pays 0% on the first $9,450 of the gain (up to the $49,450 ceiling) and 15% on the other $10,550: $1,582.50 in total, an effective 7.9%, not 15%.
- A 2026 quirk. The 12% ordinary bracket for single filers runs to $50,400, but the 0% capital gains band stops at $49,450. Someone whose ordinary taxable income lands between those two pays 12% on wages but 15% on every dollar of long-term gain.
- Room at 0%. The calculator shows how much more long-term gain you could realize this year without paying any federal tax on it. A married couple with $20,000 of other income and a $60,000 long-term gain pays $0, and still has $51,100 of room in the 0% band. Selling and rebuying to reset your cost basis at 0% is called tax-gain harvesting; wash-sale rules apply to losses, not gains.
Losses and carryover
Short-term losses offset short-term gains first, long-term losses offset long-term gains, and then the two sides net against each other. If the result is a loss, $3,000 ($1,500 married filing separately) comes off your other income and the rest carries to next year. Example: a $12,000 short-term loss against a $5,000 long-term gain uses $5,000 against the gain, deducts $3,000 and carries $4,000 forward as short-term. Enter last year's carryover under "More options". See our guide to tax-loss harvesting.
The 3.8% net investment income tax
It applies to the smaller of your investment income or your income over the threshold. A single filer with $180,000 of other income and a $50,000 long-term gain has a modified AGI $30,000 over the $200,000 threshold, so only $30,000 of the gain bears the extra 3.8% ($1,140), not all $50,000.
What this calculator leaves out
- State and local income tax.
- Collectibles (taxed at up to 28%) and unrecaptured section 1250 gain on depreciated real estate (up to 25%), which use a different IRS worksheet.
- The home sale exclusion: up to $250,000 of gain on your main home ($500,000 joint) can be excluded under IRC §121 if you meet the ownership and use tests. Enter only the taxable part.
- AMT, the kiddie tax, and effects of a higher income on Social Security taxation, the senior deduction or Medicare IRMAA.
For the full background, read our capital gains tax guide.
Sources
IRS Rev. Proc. 2025-32 (2026 brackets, 0%/15% ceilings, standard deduction); the Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions; Schedule D and its instructions (netting and the Capital Loss Carryover Worksheet); IRS Topic 409; IRC §§1(h), 1211(b), 1212(b) and 1411; the IRS net investment income tax Q&A ("these threshold amounts are not indexed for inflation"). The calculator uses exact bracket math; the IRS tax table below $100,000 rounds to $50 rows, so a filed return can differ by a few dollars. All examples are hypothetical. This is an estimate for general information, not tax advice.
Frequently Asked Questions
How is capital gains tax calculated?
Short-term gains (assets held one year or less) are added to your ordinary income and taxed at your normal rates. Long-term gains and qualified dividends are stacked on top of your other taxable income and taxed at 0%, 15% or 20% depending on where that stack lands. The IRS does this in the Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions, which is what this calculator follows.
What are the 2026 capital gains tax brackets?
Per IRS Rev. Proc. 2025-32, long-term gains are taxed at 0% up to $49,450 of taxable income for single filers ($98,900 married filing jointly, $66,200 head of household, $49,450 married filing separately), 15% up to $545,500 ($613,700 joint, $579,600 head of household, $306,850 separate), and 20% above that.
How much capital gain can I have without paying tax?
Long-term gains are taxed at 0% as long as your total taxable income, including the gain, stays at or under the 0% ceiling: $49,450 for single filers and $98,900 for married couples filing jointly in 2026. Taxable income is after deductions, so with only the 2026 standard deduction ($16,100 single, $32,200 joint) the total income before deductions can be about $65,550 single or $131,100 joint. Use the calculator's "room left in the 0% bracket" for your exact figure.
Do capital gains push me into a higher tax bracket?
Long-term gains do not raise the rate on your wages or other ordinary income, because they sit on top of it. But a short-term gain does push your long-term gains up the stack, which can move some of them out of the 0% band. In the calculator, try a single filer with $55,000 of other income, $10,000 long-term and $5,000 short-term: the short-term gain costs $1,267.50, about 25%, because it pushes $4,450 of long-term gain from 0% to 15%.
How long do I have to hold an investment for long-term rates?
More than one year. IRS Topic 409 says a gain is long-term if you held the asset for more than one year, and short-term if one year or less.
How much capital loss can I deduct?
After netting all gains and losses, a net capital loss reduces your other income by up to $3,000 a year ($1,500 if married filing separately), under IRC §1211(b). Anything above that carries forward to future years and keeps its short-term or long-term character (§1212(b)).
What is the 3.8% net investment income tax?
An extra 3.8% under IRC §1411 on the smaller of your net investment income or the amount by which your modified AGI exceeds $200,000 (single and head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). The thresholds are set in the statute and are not indexed for inflation.
Does this include state tax?
No. It is federal only. Most states tax capital gains as ordinary income, and a few have no income tax at all, so check your state separately.
Can I calculate capital gains tax for 2025?
Yes. Switch the tax year to 2025. The 0% rate applied up to $48,350 of taxable income for single filers ($96,700 married filing jointly, $64,750 head of household), and 15% up to $533,400 ($600,050 joint, $566,700 head of household, $300,000 separate), per IRS Rev. Proc. 2024-40. The 2025 standard deduction is $15,750 single and $31,500 joint after the One Big Beautiful Bill Act.


