Capital Gains Tax Calculator

Tax on a stock, crypto or property sale, with short vs long-term rates.

$
$
$
26
%
Capital gain
—

Adjust any input above — results update instantly and stay on your device.

Total tax owed
—
Effective tax rate on the gain
—
Federal rate applied
—
Net cash you keep
—
Net investment income tax
—
Short-term tax
—
Long-term tax
—

How to use this capital gains tax calculator

Capital gains tax is where a lot of people make avoidable mistakes, and the mistakes are expensive. The good news is that most of the fix is about timing.

The one-year line

Hold an asset more than one year and the gain is taxed at preferential rates of 0%, 15% or 20%. Hold it one day less and the entire gain is taxed at your ordinary rate, up to 37%.

For a $20,000 gain on an asset with a 24% ordinary rate and a 15% long-term rate, that difference is $1,800. For a larger portfolio with multiple positions, the sum of those differences is the largest tax lever most people have.

How the long-term brackets work

Long-term capital gains have their own brackets that stack on top of your ordinary income brackets. For a single filer in 2025, roughly the first $47,000 of long-term gains is taxed at 0% — entirely tax-free — gains up to about $533,400 are taxed at 15%, and anything above that at 20%. Married filers get roughly double the thresholds.

Because these thresholds sit on top of ordinary income, the amount of tax-free gains you get shrinks as your salary rises. A $47,000 gain is entirely tax-free for someone with no other income and entirely taxed at 20% for someone with a large salary.

The 3.8% surtax

Above $200,000 of modified AGI for single filers ($250,000 married jointly), an additional 3.8% applies to net investment income. It applies to long-term gains, dividends, interest and other investment income. The threshold is not indexed for inflation and has not changed since 2013, which means it captures progressively more people as nominal incomes rise.

Harvesting losses

Realised losses can offset gains. The mechanics have sharp edges:

  • Short-term losses offset short-term gains; long-term losses offset long-term gains
  • Up to $3,000 of net loss offsets ordinary income each year; the rest carries forward indefinitely
  • Losses do not offset the 0% bracket — so if you have $50,000 of long-term gains and harvest $5,000 of losses, you still pay tax on $45,000 of gains, but now at the 0% rate instead of 15%

That last point catches people. Harvesting losses makes sense when your gains are in the 15% or 20% bracket, and it is counterproductive when your gains are already at 0%.

Where the money actually goes

Capital gains are taxed on the difference between what you sold for and what you paid, minus selling expenses. For a stock position, the basis is what you paid in commissions. For property, it is the purchase price plus buying costs, plus any improvements you made. For crypto, it is what you paid for the coins.

If you have been trading for years, your broker reports your realised gains and losses annually on Form 1099-B. That is the number the IRS uses, and it will not match your mental accounting. Review it before you file.

Frequently asked questions

What is the difference between short-term and long-term capital gains tax?

Short-term gains — held one year or less — are taxed at your ordinary income rate, up to 37%. Long-term gains — held more than a year — get preferential rates of 0%, 15% or 20% depending on taxable income. Holding a position one day past the one-year mark is the single most effective tax move available.

What is the capital gains tax-free threshold?

For single filers in 2025, long-term gains up to roughly $47,000 are taxed at 0%, up to about $533,400 at 15%, and above that at 20%. Married filing jointly roughly doubles both thresholds. These adjust annually for inflation.

What is the net investment income tax?

A 3.8% surtax on net investment income for taxpayers whose modified adjusted gross income exceeds $200,000 single or $250,000 married filing jointly. It applies to long-term gains, interest, dividends and other investment income. A capital loss offsets gains first, which can reduce or eliminate it.

How do capital losses work?

Short-term losses offset short-term gains and long-term losses offset long-term gains. Net losses up to $3,000 per year offset ordinary income; beyond that the loss is carried forward indefinitely. Losses do not offset the 0% bracket on long-term gains, so harvesting a loss can actually increase your tax on other gains.

More free calculators

Every tool on Jisua Tools runs entirely in your browser. No sign-up, no data collected, results are instant.

Browse all tools