Capital Gains Tax Calculator

Estimate tax on a sale and compare short-term and long-term capital gains with 2026 US federal brackets or your own rates.

Updated · Free · Runs in your browser

US$
US$
US$
Held for
US$

After deductions, excluding this gain.

%
Total tax —
Capital gain —
Federal tax —
Net investment income tax —
State tax —
Profit after tax —
Effective tax rate on gain —
Tax if held the other term —
Short vs long term —
    Was this calculator helpful?

    The formula

    Gain = sale price − purchase price − selling fees
    
    Short-term (held 1 year or less): taxed at ordinary income rates, stacked on top of your other taxable income
    Long-term (held more than 1 year): 0%, 15% or 20%, by where income + gain falls in the brackets
    NIIT = 3.8% × the lesser of the gain and (income + gain − $200,000 single / $250,000 joint)
    
    Total tax = federal + NIIT + state
    Effective rate = total tax ÷ gain

    Worked example

    1. You bought shares for $10,000 and sell them for $25,000: a $15,000 gain.
    2. You're single with $85,000 of other taxable income, so the gain sits between $85,000 and $100,000.
    3. Held more than a year: that's all in the 15% long-term band (above $49,450), so federal tax is $2,250. State tax at 5% is $750, for a total of $3,000.
    4. Held a year or less: it's taxed at 22% ordinary rates (the band from $50,400 to $105,700), so $3,300 + $750 = $4,050.
    5. Holding for more than a year saves $1,050. NIIT doesn't apply, because income plus gain is below $200,000.

    Short-term vs long-term gains

    In the US, a capital gain is short-term if you held the asset for one year or less, and long-term if you held it for more than a year. Short-term gains are taxed as ordinary income, at rates from 10% to 37%. Long-term gains get lower rates of 0%, 15% or 20%, depending on your taxable income. Waiting a few extra days to pass the one-year mark can cut the tax substantially, as the comparison in the calculator shows.

    2026 federal brackets used

    For 2026, long-term gains are taxed at 0% for taxable income up to $49,450 (single) or $98,900 (married filing jointly), 15% up to $545,500 (single) or $613,700 (joint), and 20% above that. Ordinary brackets run from 10% up to $12,400 (single) or $24,800 (joint), through 12%, 22%, 24%, 32% and 35%, to 37% above $640,600 (single) or $768,700 (joint). The gain is stacked on top of your other taxable income, which is why the same gain can fall into more than one band.

    Net investment income tax

    Higher earners also pay the 3.8% net investment income tax (NIIT) on investment income, including capital gains, above $200,000 of modified adjusted gross income (single) or $250,000 (joint). These thresholds aren't indexed for inflation. The calculator uses taxable income plus the gain as an approximation of MAGI. Because MAGI is before deductions, the real figure is usually higher, so NIIT can apply at lower taxable incomes than shown.

    State taxes and other countries

    Most US states tax capital gains as ordinary income, at rates from 0% to over 13%. Enter yours in the state rate field. For other countries, choose Custom rates. As examples: in the UK, capital gains tax is 18% for basic-rate and 24% for higher-rate taxpayers from 2025/26, above a £3,000 annual exempt amount. In India, listed equity gains are taxed at 20% if short-term and 12.5% if long-term, above ₹1.25 lakh a year. In Canada, half of a capital gain is included in taxable income. Australia gives a 50% discount on assets held over a year.

    Ways to reduce capital gains tax

    • Hold for more than a year to qualify for long-term rates.
    • Harvest losses: sell losing investments to offset gains. In the US, net losses offset up to $3,000 of ordinary income a year, and the rest carries forward. Watch the 30-day wash-sale rule.
    • Use tax-advantaged accounts such as 401(k)s, IRAs, ISAs and TFSAs, where gains aren't taxed annually.
    • Time sales for years when your income is lower, perhaps filling the 0% long-term band.
    • Give appreciated shares to charity instead of cash.

    Cost basis matters

    Your gain depends on your cost basis: what you paid, including commissions, adjusted for things like reinvested dividends and stock splits. If you bought at several prices, which shares you sell matters too. See the average cost calculator. For real estate, add capital improvements and subtract depreciation, and consider the home sale exclusion or a 1031 exchange. Crypto is taxed as property in the US, so each sale or swap can be a taxable event.

    An estimate, not tax advice

    This calculator gives a planning estimate of federal and state tax on a single sale. Your actual bill depends on your full return, including other gains and losses, collectibles (taxed at up to 28%), the alternative minimum tax and state-specific rules. Check current figures with the IRS or your tax authority, or ask a tax professional before a large sale.

    Frequently asked questions

    How much is capital gains tax in 2026?
    In the US, long-term gains are taxed at 0%, 15% or 20% depending on taxable income; short-term gains at ordinary rates from 10% to 37%. High earners may also pay the 3.8% NIIT, plus state tax.
    How long do I need to hold a stock to pay long-term capital gains tax?
    More than one year from the day after you bought it. Holding it for exactly one year or less makes the gain short-term.
    Do capital gains push me into a higher tax bracket?
    Long-term gains are stacked on top of ordinary income to set their rate, but they don't change the rate on your ordinary income. Short-term gains are ordinary income and can move you into a higher bracket.
    How can I avoid capital gains tax legally?
    Hold investments for over a year, use tax-advantaged accounts, harvest losses to offset gains, sell in low-income years, or donate appreciated assets.
    Is crypto subject to capital gains tax?
    In the US and many other countries, yes. Selling, swapping or spending crypto can trigger a capital gain or loss, and staking rewards are usually taxed as income.

    ↑↓ to navigate · Enter to open