📈 Track your real cost basis automatically — avg cost, live P&L, weekly signals Try Pro free →
2026 federal rates · Short-term vs long-term side by side

Capital Gains Tax Calculator

See your exact federal tax under short-term and long-term treatment, side by side — including the 3.8% NIIT surtax if it applies to you.

Filing status
Other taxable income (before this gain)
$
Capital gain amount
$
Days held
Short-term (≤1 year)
$0
0% effective
Long-term (>1 year)
$0
0% effective
What waiting for long-term treatment saves
$0
Based on your current inputs
Tax breakdown — your current holding period
Component Amount Rate applied

Note: "Other taxable income" should be your income after deductions (AGI minus standard or itemized deduction) — not gross income. This calculator stacks your gain on top of that number to determine which bracket(s) it falls into, following the same method the IRS uses.

Uses official 2026 IRS federal tax brackets and NIIT thresholds (Rev. Proc. 2025-32). Does not include state taxes, which vary significantly and can add substantially to your total tax. Does not model collectibles (28% cap), QSBS, Section 1250 recapture, or the 0% MAGI-based reduction some deductions require. Not tax advice — consult a professional before filing.

How this calculator works

Enter your other taxable income, your gain amount, and how many days you've held (or plan to hold) the asset. The calculator computes your exact federal tax under both short-term treatment (ordinary income rates) and long-term treatment (0%/15%/20% preferential rates), including the 3.8% Net Investment Income Tax if your income exceeds the threshold — so you can see precisely what holding period matters for your specific numbers.

A worked example

A single filer with $180,000 in other taxable income and a $50,000 gain, comparing short-term vs long-term treatment:

$50,000 gain — short-term vs long-term
Short-term (ordinary rates + NIIT)$15,398 total tax
Long-term (15% LTCG + NIIT)$8,640 total tax
Savings from waiting for long-term$6,758

The exact savings depend heavily on your specific income and which tax brackets the gain straddles — there's no universal multiplier. This is precisely why a calculator is more useful than a rule of thumb: the difference could be a few hundred dollars or several thousand, depending entirely on your numbers.

Is it always worth waiting for long-term treatment?

Usually, but not automatically. The tax savings from waiting need to be weighed against the risk of the position moving against you while you wait. If you're 340 days into holding a volatile stock and it could easily drop 10% in the remaining 25 days, that risk may outweigh the tax benefit of crossing the one-year line — especially for a smaller gain where the tax difference is modest in dollar terms.

The math is worth running explicitly, not assuming. For a large gain in a high tax bracket, the savings can be substantial and clearly worth a short wait. For a small gain or in a low tax bracket where you might already qualify for the 0% long-term rate, the difference may be minimal — in which case, other factors (like conviction in the position, or wanting to lock in a gain before a known risk event) may reasonably take priority.

Frequently asked questions

Why does the calculator ask for "other" income separately from the gain?

Because capital gains tax brackets — and short-term ordinary rates — depend on your total taxable income, not the gain in isolation. A $30,000 gain is taxed very differently for someone with $40,000 in other income (likely at or near the 0% long-term rate) versus someone with $400,000 in other income (likely at the top 20% rate plus NIIT). Separating the two lets the calculator stack them correctly, the same way the IRS does.

Does this calculator account for state taxes?

No — this calculator shows federal tax only. Most states tax capital gains as ordinary income with no preferential long-term rate, and state rates vary enormously — from 0% in states with no income tax to over 13% in California. Add your state's marginal rate to these federal figures for a complete picture, or check whether your state offers any capital gains preferences (a small number do).

What if I have multiple gains and losses in the same year?

This calculator models a single gain in isolation. In practice, gains and losses are netted together — losses first offset gains of the same type (short-term against short-term, long-term against long-term), then excess losses offset the other type. Only your net gain after this netting process is what actually gets taxed. See our capital gains tax guide for the full netting rules.

How accurate is the NIIT calculation here?

This calculator applies NIIT to the lesser of your net investment income or the amount your MAGI exceeds the threshold — the correct IRS methodology. However, it uses your taxable income as a proxy for MAGI, which is a simplification. True MAGI can differ from taxable income due to certain deductions and exclusions being added back. For income near the NIIT threshold, this simplification could shift the result modestly — verify with a tax professional if you're close to the line.

Can I use this for crypto gains too?

Yes — the IRS taxes cryptocurrency gains under the same short-term/long-term framework and rates as stocks, so this calculator applies equally to crypto. Just make sure your cost basis and holding period are calculated correctly first, which is more complex for crypto due to per-wallet tracking rules — see our cost basis calculator to work that out first.