Skip to content
Tax & DeductionsFree · No signup · 49.5K/month · $5.10 CPC

Capital Gains Tax Calculator — ST vs LT + NIIT + State (2026)

Drop cost basis, sale price, holding period, AGI, filing status, and optional state rate — get federal capital-gains tax (short-term at ordinary brackets, long-term at 0/15/20%), NIIT 3.8% if applicable, and the held-vs-sold counterfactual showing what you'd save if you held to 12 months.

  • Instant result
  • Private — nothing saved
  • Works on any device
  • AI insight included
Reviewed by CalcBold Editorial · Sources: IRS Schedule D + Form 8949 + IRS Pub 550 + Form 8960 (NIIT) + IRC §121 + IRC §1014Last verified Methodology

Capital Gains Tax Calculator

What you paid (including any commissions/fees). For inherited assets, use stepped-up basis at date of death.

Gross proceeds from sale minus brokerage/transaction fees. The difference between this and cost basis is your gain (or loss).

How long you held the asset. ≥12 months = long-term (preferential rates). <12 months = short-term (ordinary income rates).

Your 2026 federal filing status. LT-CG bracket thresholds and NIIT triggers all vary by status.

Your taxable income (wages + interest + dividends) BEFORE adding this gain. Used to stack the gain on top of brackets for short-term rate AND for NIIT trigger.

Most states tax capital gains as ordinary income. 9 no-tax states: AK FL NV NH SD TN TX WA WY → enter 0. CA tops out at 13.3%, NY at 10.9%.

Embed builderDrop the Capital Gains on your site →Free widget · 3 sizes · custom theme · auto-resizes · no signupGet embed code

Frequently Asked Questions

The most common questions we get about this calculator — each answer is kept under 60 words so you can scan.

  • What's the difference between short-term and long-term capital gains?
    Holding period is the dividing line. ≥1 year (≥12 months) = long-term, taxed at preferential rates (0/15/20%). <1 year = short-term, taxed at ordinary income rates (up to 37% federal). The single most important holding-period decision is whether to push to the 12-month mark — going from a 24% ordinary bracket to a 15% LT bracket on a $30K gain saves $2,700.
  • What are the 2026 long-term capital-gains brackets?
    Approximate 2026 projections (2024 inflation-indexed). Single: 0% up to $48,350 taxable, 15% up to $533,400, 20% above. Married Filing Jointly: 0% up to $96,700, 15% up to $600,050, 20% above. Head of Household: 0% up to $64,750, 15% up to $566,700, 20% above. The 0% bracket is a powerful planning tool for retirees with low taxable income.
  • What is NIIT (Net Investment Income Tax)?
    NIIT is a 3.8% federal surtax on net investment income (capital gains, dividends, interest, rental income) when your MAGI exceeds the threshold. Thresholds (statutory, NOT inflation-adjusted): single $200K, MFJ $250K, MFS $125K, HoH $200K. NIIT applies to the LESSER of (a) net investment income or (b) MAGI minus threshold. Realized capital gains push you into NIIT range fast — it's a separate calculation from regular cap-gains tax.
  • Are capital losses deductible?
    Yes — up to $3,000/year deductible against ordinary income (MFS halves this to $1,500). Excess losses carry forward indefinitely. Loss harvesting strategy: realize losses in down years to offset realized gains, then carry remaining losses forward to offset future gains. Be aware of the 30-day wash-sale rule — selling for a loss and buying back the same security within 30 days disallows the loss.
  • How is the gain calculated on inherited assets?
    Inherited assets get a STEPPED-UP BASIS at the decedent's date of death (IRC §1014). If your parent bought stock for $10 and it's worth $100 when they died, your basis is $100 — selling at $105 means you have a $5 gain, not $95. This is one of the most valuable tax breaks in the code, and is why holding appreciated assets to death (rather than selling pre-death) is the optimal strategy for estate planning when income is sufficient.
  • What about wash-sale rules?
    IRS wash-sale rule (IRC §1091) disallows a capital LOSS if you buy the same or 'substantially identical' security within 30 days before OR after the sale. The loss isn't lost — it's added to the basis of the replacement security. Wash-sale rules apply to losses only, not gains. They apply within retirement accounts (IRAs) for trades involving the same person.
  • Do real estate sales trigger capital gains tax?
    Yes, with a HUGE exception for primary residences. IRC §121 lets single filers exclude up to $250K of gain on primary-residence sales ($500K joint), provided you owned and used the home as primary residence for 2 of the last 5 years. Investment properties and second homes don't qualify — those gains are fully taxable (LT or ST per holding period). 1031 exchange for investment property can defer gains by rolling into a like-kind property.
  • Does my state tax capital gains?
    Most states tax capital gains as ordinary income at state rates (CA 13.3% top, NY 10.9%, NJ 10.75%). Nine states have NO state income tax and therefore no state cap-gains tax: AK, FL, NV, NH, SD, TN, TX, WA, WY. Washington added a new 7% tax on long-term gains above $250K starting 2022 (only on LT, not ST). New Hampshire taxes only interest + dividends. Tennessee phased out its investment tax in 2021.
  • What if I have both gains and losses in the same year?
    Aggregate by holding-period bucket. Step 1: Net short-term gains and short-term losses → net short-term result. Step 2: Same for long-term → net long-term result. Step 3: If both are positive, ST taxed at ordinary rates + LT at preferential rates. Step 4: If one is negative, it offsets the other; net negative carries forward (capped at $3K/yr against ordinary income).
  • Can I avoid capital-gains tax by gifting appreciated stock?
    Yes — partly. Gifting appreciated stock to charity gets you a deduction at the asset's FAIR MARKET VALUE without realizing the gain. The charity sells tax-free (it's a charity). This is a 2-for-1 tax win: avoid cap-gains + get a charitable deduction. Gifting to family transfers your basis to them (no step-up); they pay the gain when they sell. Only death triggers the step-up.
  • What about cryptocurrency capital gains?
    Treated as property for federal tax purposes (IRS Notice 2014-21). Each crypto sale or trade is a taxable event — short-term or long-term based on holding period from acquisition. Selling at a loss for tax purposes is allowed but be aware of wash-sale rules (currently NOT applied to crypto by IRS, but proposed for future legislation). Track basis carefully — crypto-to-crypto trades create gains; the IRS now requires Form 1099-DA from exchanges starting 2025.
  • When are capital gains taxes due?
    Capital gains are realized and taxed in the year of sale. Federal tax owed is due April 15 of the following year (Q4 estimated payments due Jan 15 if you owe enough to trigger underpayment). For large gains (>$10K), file Q4 estimated to avoid the IRS underpayment penalty — the safe harbor is paying either 100%/110% of prior-year liability or 90% of current-year liability. Check IRS Pub 505 for thresholds.