Free tool · no sign-up

US capital gains tax calculator

Enter what you sold. This works out which sales were long-term, nets the losses in the right order, and stacks the gain on your income to find the rate that actually applies.

Taxable income is the figure after your deduction — the “taxable income” line of the return, not your salary. Tax year 2025.

Sales this year
SHORT-TERM · 120 days+$6,000
LONG-TERM · 2284 days+$18,000
Federal tax on these sales
$4,020
16.8% of the net gain
Short-term (ordinary rates)
$6,000
$1,320 tax
Long-term (0 / 15 / 20%)
$18,000
$2,700 tax
How the long-term gain was rated
$18,000 at 15% → $2,700

The rate is set by where the gain lands on top of your other income, which is why one sale can be taxed at two rates.

Federal tax only, for tax year 2025. No state tax, and no wash sales, collectibles, qualified small business stock, §1256 contracts or unrecaptured §1250 gain — each of which changes the answer for the holdings it applies to. Arithmetic, not tax advice.

enMoney keeps the trade history this calculation needs — every lot, every date, every cost basis — across US, Indian and Australian holdings in one ledger. A US tax pack (Form 8949, Schedule D, foreign tax credit) is not built — leave your email if that is the one you need, and it counts towards whether it gets built. What enMoney does and doesn’t do for US filers.

Long-term needs more than one year. The IRS counts from the day after you bought, so a sale on the one-year anniversary is still short-term — buy on 1 January 2024 and sell on 1 January 2025 and you are taxed at ordinary rates; sell on 2 January and you are not. On a large gain that single day is the most expensive one in the year.

The long-term rate is not a property of the gain. The 0%, 15% and 20% bands are thresholds on your total taxable income, with the gain stacked on top of everything else. The same $20,000 gain is free for someone with $30,000 of income and costs $4,000 for someone at $600,000 — and for the person in between, part of it is taxed at 0% and the rest at 15%. Any calculator that applies one rate to the whole gain is wrong for everybody near a boundary, which is most people.

Losses net in a set order. Short-term gains and losses net against each other first, long-term likewise, and only then do the two net together. That ordering matters: a short-term loss shelters short-term gain — the kind taxed at your ordinary rate — before it ever touches a gain taxed at 15%.

If you end the year with a net loss, only $3,000 of it comes off your ordinary income ($1,500 filing separately). The rest is not lost: it carries forward indefinitely, available against future gains.

Above a modified AGI of $200,000 — $250,000 filing jointly, $125,000 filing separately — an extra 3.8% net investment income tax applies to the part of the gain over the line. Those thresholds have never been indexed to inflation, so more people cross them every year.

Two things this does not model and you should know about. Wash sales: sell at a loss and buy the same security within 30 days either side, and the loss is disallowed and added to the new lot's basis instead. And if you hold non-US funds, the FBAR checker covers the reporting side — a foreign mutual fund is usually a PFIC, which is taxed under rules nothing on this page applies to.

Frequently asked questions

How long do I have to hold a stock for the long-term capital gains rate?

More than one year. The holding period starts the day after you acquire the asset, so selling on the one-year anniversary is short-term. Buy on 1 January 2024 and you need to sell on 2 January 2025 or later for long-term treatment.

What are the 2025 long-term capital gains rates?

0%, 15% or 20%, decided by your total taxable income including the gain. For 2025 a single filer pays 0% up to $48,350 of taxable income, 15% up to $533,400 and 20% above that; married filing jointly the 0% band runs to $96,700 and the 15% band to $600,050. Because the gain stacks on top of your other income, one sale can be taxed partly at 0% and partly at 15%.

How are short-term capital gains taxed?

As ordinary income, at your marginal rate — 10% to 37% for 2025. There is no separate short-term rate schedule. The gain stacks on your other income, so a large short-term gain can push part of itself into a higher bracket.

Can capital losses offset my salary?

Up to $3,000 a year ($1,500 if married filing separately), after your losses have first been netted against your capital gains. Anything beyond that carries forward indefinitely to offset gains in later years — it is deferred, not forfeited.

Do short-term losses offset long-term gains?

Only after they have offset short-term gains. Each class nets within itself first, then the net figures offset each other. That order works in your favour: it uses the loss against the gain taxed at your ordinary rate before the one taxed at 15%.

What is the 3.8% net investment income tax?

An extra tax on investment income — including capital gains — for taxpayers with modified AGI over $200,000 single, $250,000 married filing jointly or $125,000 married filing separately. It applies to the lesser of your net investment income and the amount by which your MAGI exceeds the threshold. The thresholds are not indexed to inflation.

Does this calculator handle wash sales?

No. If you sold at a loss and bought the same or a substantially identical security within 30 days before or after, the loss is disallowed and added to the basis of the replacement lot, which changes both the amount and the timing. Exclude those sales here, or adjust the basis yourself.

More tools
FBAR & Form 8938 checkerXIRR calculatorAU capital gainsIndia capital gains