How this calculator works
Capital gains are not taxed on their own. They are added on top of your other income, and where they land decides the rate. The calculator works through that “stacking” in four steps.
- Ordinary taxable income first. Enter your taxable income after deductions, leaving out any gains. This fills the regular brackets from the bottom up.
- Short-term gains next. Gains on assets held one year or less are taxed like wages. The calculator adds them on top of ordinary income and taxes them at the regular 2026 bracket rates.
- Long-term gains on top. Gains on assets held more than one year stack above everything else. The part that falls under the 0% threshold is tax-free. The part between the 0% and 15% thresholds is taxed at 15%. Anything above that is taxed at 20%.
- Net Investment Income Tax (optional). If you enter your modified AGI, the calculator checks it against the NIIT threshold. It adds 3.8% on the smaller of your total gains or the amount of MAGI above the threshold.
The result shows tax on ordinary income, tax on short-term gains, tax on each long-term band, any NIIT and the total.
2026 capital gains rates at a glance
The long-term thresholds below apply to total taxable income, including the gains. They come from IRS Revenue Procedure 2025-32. The NIIT thresholds are set in the law and are not adjusted for inflation.
| Filing status | 0% rate up to | 15% rate up to | 20% rate above | NIIT threshold (MAGI) |
|---|---|---|---|---|
| Single | $49,450 | $545,500 | $545,500 | $200,000 |
| Married filing jointly | $98,900 | $613,700 | $613,700 | $250,000 |
| Head of household | $66,200 | $579,600 | $579,600 | $200,000 |
| Married filing separately | $49,450 | $306,850 | $306,850 | $125,000 |
The IRS explains holding periods and how gains are reported in Tax Topic 409.
Worked example
Single filer partly in the 0% band
Priya is single. She has $40,000 of ordinary taxable income and sells stock she held for three years at a $30,000 long-term gain.
- Tax on ordinary income: $1,240 (10% of $12,400) + $3,312 (12% of $27,600) = $4,552
- Room left in the 0% band: $49,450 − $40,000 = $9,450, taxed at 0%
- Rest of the gain: $30,000 − $9,450 = $20,550 × 15% = $3,082.50
- Total federal tax: $4,552 + $3,082.50 = $7,634.50
Nearly a third of Priya’s gain is tax-free. Her total taxable income of $70,000 is far below the $200,000 NIIT threshold.
Married couple with both kinds of gain
Dana and Chris file jointly. They have $200,000 of ordinary taxable income, a $30,000 short-term gain and a $50,000 long-term gain. Their MAGI is $280,000.
- Tax on $200,000 of ordinary income: $33,424
- Short-term gain, taxed from $200,000 to $230,000: 22% of $11,400 ($2,508) + 24% of $18,600 ($4,464) = $6,972
- Long-term gain, from $230,000 to $280,000: all above $98,900 and below $613,700, so $50,000 × 15% = $7,500
- NIIT: MAGI over threshold is $280,000 − $250,000 = $30,000; gains are $80,000; 3.8% × $30,000 = $1,140
- Total: $33,424 + $6,972 + $7,500 + $1,140 = $49,036
The short-term gain cost them about 23% on average. The larger long-term gain was taxed at 15%, plus the NIIT on part of it.
Short-term vs long-term: why the holding period matters
The line between short and long term is one year. An asset held for exactly one year is still short-term; it must be held more than one year. Selling a day too early can move a gain from the 15% rate to 22% or 24%.
Losses also matter. Capital losses offset gains of the same type first, then the other type. If losses are bigger than gains, a limited amount can offset ordinary income each year, and the rest carries forward. This calculator takes net gains, so enter the figure after losses.
Some people with low taxable income in a given year, such as early retirees, choose to sell long-term holdings while they still fit inside the 0% band. Others spread a large sale across two tax years to keep more of it under a lower threshold. The calculator lets you test these scenarios side by side.
Read more in our guide to long-term vs short-term capital gains.
A common mistake: thinking gains raise your wage tax
Because gains stack on top, they never push your ordinary income into a higher bracket. Your wages are taxed the same with or without the sale. What a large gain can do is use up the 0% band, and it can raise MAGI enough to trigger the NIIT or reduce income-based credits.
To find your ordinary taxable income, the federal income tax calculator and the tax bracket calculator are a good starting point.
What this calculator doesn’t include
- State and local taxes on gains.
- Qualified dividends as a separate input. They use the same rates as long-term gains.
- The special higher rate on unrecaptured Section 1250 gain from real estate depreciation.
- The special higher rate on collectibles and certain small business stock.
- The home sale exclusion, loss carryovers and cost-basis calculations.
- NIIT on investment income other than the gains you enter, such as interest or rent.
- The alternative minimum tax.
For your return, check the Schedule D instructions or ask a tax professional.