Capital gains tax calculator (2026)
Estimate the federal tax on your 2026 stock sales. Enter your other taxable income and each sale; the calculator nets short- and long-term results and stacks the gain on top of your income through the 2026 IRS brackets, so a gain that straddles the 0%/15% or 15%/20% line is split correctly.
Your 2026 taxable income after the standard or itemized deduction, without the sales you enter below (otherwise the gain is counted twice) and without qualified dividends, which go in their own box because they are taxed at the 0/15/20% rates. Include wages, interest and non-qualified dividends. Enter every other stock sale of the year as its own row below.
Sales in 2026
Example data — replace the income and these two sales with your own.
One row per sale (or per lot). A loss is a row where proceeds are below cost.
More options: prior-year loss carryover, NIIT
From the Capital Loss Carryover Worksheet in your 2025 return (Pub. 550 Worksheet 4-1 or the Schedule D instructions) — the amounts that go on your 2026 Schedule D lines 6 and 14. Enter them as positive numbers.
Both are needed to estimate the 3.8% NIIT (Form 8960). Leave either blank to skip it.
Tax year 2026, US federal income tax. Sources: Rev. Proc. 2025-32 (brackets and 0/15/20% ceilings), Form 8960 instructions (NIIT), Pub. 550 (loss limit, carryover). Last verified Oct 15, 2026.
Not included:
- State and local income tax
- The alternative minimum tax (AMT)
- Collectibles gain (28% rate) and unrecaptured §1250 gain on real estate (25% rate); §1202 small-business stock
- Wash-sale disallowed losses and basis adjustments — see the tax-loss harvesting calculator
- Short sales, options, futures and other derivatives
- Credits, deduction phase-outs and the IRS Tax Table’s $50 bands (this uses the rate schedules; under $100,000 of taxable income the Tax Table can differ by a few dollars)
Educational estimate, not tax advice. Your figures never leave the page — the calculation runs in your browser; pageview analytics never see your numbers.
Short-term vs long-term — why it matters
Sell within a year and the profit is a short-term gain, taxed as ordinary income at your regular bracket. Hold more than a year and it is a long-term gain, taxed at 0%, 15% or 20%. The holding period starts the day after you buy and includes the day you sell (IRS Pub. 550), so a few days can move a sale from one side to the other.
2026 long-term capital gains brackets
The thresholds apply to total taxable income including the gain; the gain sits on top of your other income.
| Filing status | 0% up to | 15% up to | 20% |
|---|---|---|---|
| Single | $49,450 | $545,500 | over $545,500 |
| Married filing jointly / qualifying surviving spouse | $98,900 | $613,700 | over $613,700 |
| Head of household | $66,200 | $579,600 | over $579,600 |
| Married filing separately | $49,450 | $306,850 | over $306,850 |
Source: IRS Rev. Proc. 2025-32, §4.03 (“Maximum Zero Rate Amount” and “Maximum 15% Rate Amount” for taxable years beginning in 2026); ordinary brackets from §4.01. Last verified against irs.gov Oct 15, 2026. The calculator stays on 2026 until the IRS publishes the 2027 figures; none were on irs.gov when last verified.
The 3.8% net investment income tax (NIIT)
A separate 3.8% tax applies to the smaller of your net investment income (capital gains included) or the amount your modified AGI exceeds $250,000 (married filing jointly or qualifying surviving spouse), $125,000 (married filing separately) or $200,000 (single or head of household). These amounts are set in the tax code and are not adjusted for inflation. Source: Instructions for Form 8960, checked Oct 15, 2026.
Worked example
These are the calculator’s starting values. A single filer has $45,000 of taxable income before any sales, sells a fund held three years for a $10,000 gain and a stock held five months for a $1,500 loss.
- Netting. The short-term loss offsets the long-term gain: $10,000 − $1,500 = $8,500 of net long-term gain.
- Stacking. It sits on top of $45,000. The 0% band for single filers runs to $49,450, so $4,450 is taxed at 0% and the other $4,050 at 15%: $607.50 of federal income tax on the sales, on top of the $5,152 due on the $45,000.
- A flat 15% would have said $1,275 — the gap is the part of the gain that fits under the 0% ceiling.
Harvesting-room mode, same filer with $30,000 of income and a $30,000 unrealised long-term gain: the room is $49,450 − $30,000 = $19,450 that could be realised at 0%; the other $10,550 would be taxed at 15% ($1,582.50).
When the year ends in a loss
A net capital loss reduces your other income by up to $3,000 a year ($1,500 married filing separately). The rest carries forward and keeps its character; short-term losses are used first (IRS Pub. 550, Worksheet 4-1). The calculator shows the carryover to 2027. If you plan to rebuy what you sold at a loss, check the wash-sale rule first.
Capital gains calculator FAQ
Why does the calculator ask for income EXCLUDING the sale?
Because long-term gains are stacked on top of your other taxable income. The rate on the gain depends on how much room is left below the $49,450 (single) 0% ceiling and the 15% ceiling after your other income — so the tool adds the gain itself. If you typed a total that already includes the gain, it would be counted twice and the estimate would come out too high.
Is the 0%, 15% or 20% rate applied to my whole gain?
No. Each dollar of gain is taxed at the rate for the band it lands in, so one sale can be split — part at 0% and part at 15%, or part at 15% and part at 20%. Short-term gains are not on this scale at all: they are added to ordinary income and taxed at your regular 2026 bracket, 10% to 37%.
How are losses netted, and what is the $3,000 limit?
Short-term gains and losses are netted together, long-term gains and losses together, and then the two results are netted against each other. If the year still ends in a net loss, up to $3,000 ($1,500 if married filing separately) reduces your other income; the rest carries forward to next year and keeps its short- or long-term character. Prior-year carryovers can be entered under “More options”.
Does it include the 3.8% net investment income tax?
Only if you enter both your modified adjusted gross income and your net investment income. The NIIT is 3.8% of the smaller of your net investment income or your MAGI above $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). It is reported on Form 8960 and is separate from the income tax shown.
What is the 0% gain-harvesting room?
If your taxable income is below the 0% long-term ceiling, you can realise long-term gains up to that ceiling and pay no federal income tax on them, then rebuy to reset your cost basis (the wash-sale rule applies to losses, not gains). The “0% harvesting room” mode shows how much room you have and how much of a given gain would spill into the 15% band. Realising gains still raises your AGI, which can affect credits, state tax and income-tested programs.
Is this tax advice?
No. It is an educational estimate of US federal income tax under the published 2026 IRS tables, with the exclusions listed under the calculator. Your return depends on things this page does not see. Check with a tax professional before acting on it.
This math stops at what you typed in.
Tradune runs it continuously on your real holdings — with your money-weighted return next to a buy-and-hold SPY twin, and SEC insider filings flagged on the stocks you own.
Educational analytics — not investment advice.