Finance

Capital Gains Tax Calculator (USA)

Calculate your 2026 federal capital gains tax on stocks, crypto, or real estate. Compare short-term (ordinary rates) vs long-term (0%, 15%, 20%) plus the 3.8% NIIT, with your after-tax gain.

  • Data verified · July 2026
  • Edited by
  • Formula verified by automated tests
  • Private — runs on your device
Suggest an improvement
Calculator Free · Private
Want to change something?Edit any field and calculate again.
Instant resultIt recalculates in your browser, no page reload.
Fast and transparent

How to use this calculator

Follow this tool’s steps, then review its formula, assumptions, and limits below.

Step by step
01
Enter your data
02
Tap the Calculate button
03
Check the result
When you sell a stock, a cryptocurrency, a fund, or investment real estate for more than you paid, the profit is a capital gain — and how much tax you owe depends almost entirely on how long you held it. This calculator shows your 2026 federal capital gains tax and, just as importantly, how much of the gain you actually keep.

Hold an asset for one year or less and the gain is short-term, taxed at your ordinary income rate (the same 10%–37% brackets as your salary). Hold it for more than a year and it becomes long-term, taxed at the preferential 0%, 15%, or 20% rates. Which long-term rate applies depends on where the gain stacks on top of your other taxable income — so the calculator layers the gain across the brackets exactly the way the IRS does.

Enter your filing status, your other taxable income, the purchase and sale prices, and whether the holding was short or long-term. The tool also adds the 3.8% Net Investment Income Tax (NIIT) for higher earners, so the after-tax number is realistic — not just the headline rate.

When to use this calculator

  • Estimate the tax on selling stock you have held more than a year.
  • Compare selling now (short-term) vs waiting past one year (long-term).
  • Calculate crypto capital gains tax on a profitable trade.
  • See whether your long-term gain falls in the 0%, 15%, or 20% band.
  • Estimate the 3.8% Net Investment Income Tax on a large gain.
  • Figure your after-tax proceeds before selling an investment property.
  • Check how a low-income year could let you realize gains at the 0% rate.
  • See how a big gain can push part of itself into the 20% bracket.
  • Understand how a capital loss offsets gains and up to $3,000 of income.
  • Plan tax-loss harvesting by pairing gains and losses in the same year.

2026 long-term capital gains breakpoints (taxable income)

RateSingleMarried filing jointlyHead of householdMarried filing separately
0%$0 – $49,450$0 – $98,900$0 – $66,200$0 – $49,450
15%$49,450 – $545,500$98,900 – $613,700$66,200 – $579,600$49,450 – $306,850
20%above $545,500above $613,700above $579,600above $306,850

Source: IRS Rev. Proc. 2025-32. Add the 3.8% Net Investment Income Tax once modified AGI exceeds $200,000 (single) / $250,000 (married filing jointly). Short-term gains are taxed at ordinary rates instead.

How it works

Short-term vs long-term

Gain = Sale price − Cost basis − commissions/improvements
Short-term (≤ 1 year)  → taxed at your ordinary rate (10%–37%)
Long-term  (> 1 year)  → taxed at 0% / 15% / 20% (stacked on your income)
High earners           → + 3.8% Net Investment Income Tax (NIIT)

The holding period is the single biggest factor. The same $50,000 profit can be taxed at 24% if you sell too early, or 15% if you wait past the one-year mark — a difference of thousands of dollars.

2026 long-term capital gains brackets (taxable income)

RateSingleMarried filing jointlyHead of household
0%up to $49,450up to $98,900up to $66,200
15%$49,450 – $545,500$98,900 – $613,700$66,200 – $579,600
20%above $545,500above $613,700above $579,600

The gain is stacked on top of your ordinary taxable income, so a large gain can straddle two rate bands.

Worked example — sell now vs wait

You have a $30,000 profit and $90,000 of other taxable income (single).

  • Sell before 1 year (short-term): taxed as ordinary income at your 22%–24% marginal rate → about $6,900.

  • Wait past 1 year (long-term): all $30,000 sits in the 15% band → $4,500.

  • Waiting saves roughly $2,400 on the same profit.
  • The 3.8% Net Investment Income Tax

    Filing statusNIIT applies once income exceeds
    Single / Head of household$200,000
    Married filing jointly$250,000
    Married filing separately$125,000

    The NIIT adds 3.8% on the smaller of your net investment income or the amount your income exceeds the threshold — on top of the regular capital gains rate.

    Capital losses

    If you sell for less than your basis, you have a capital loss. Losses first offset capital gains; if losses exceed gains, you can deduct up to $3,000 against ordinary income per year and carry the rest forward to future years.

    What this does not cover

    This calculator estimates federal tax only. It does not model state capital gains tax (many states tax gains as ordinary income), the Section 121 home-sale exclusion ($250,000 single / $500,000 married on a primary residence), depreciation recapture on rental property (taxed up to 25%), collectibles (up to 28%), or qualified small business stock. Your basis should reflect reinvested dividends and adjustments.

    Disclaimer

    Educational estimate of federal capital gains tax, not tax advice. 2026 thresholds are from IRS Rev. Proc. 2025-32. Consult a tax professional and the IRS before making investment or filing decisions.

    Example: $50,000 long-term gain, $40,000 other income, single

    Gain: $60,000 sale − $10,000 basis = $50,000 long-term gain.
    Stacked on $40,000 income: the first $9,450 fills the 0% band (up to $49,450).
    The remaining $40,550 is taxed at 15% = $6,082.50.
    Income is under $200,000, so no NIIT. Total tax ≈ $6,083; you keep $43,918.
    About $6,083 in long-term capital gains tax

    Frequently asked questions

    What is the difference between short-term and long-term capital gains?
    Short-term gains come from assets held one year or less and are taxed at your ordinary income rate (10%–37%). Long-term gains come from assets held more than one year and get the preferential 0%, 15%, or 20% rates. Holding past the one-year mark usually lowers your tax substantially.
    What are the 2026 long-term capital gains rates?
    There are three rates — 0%, 15%, and 20% — based on taxable income. For 2026 the 0% band runs up to $49,450 (single) or $98,900 (married filing jointly), 15% applies up to $545,500 / $613,700, and 20% applies above those amounts.
    How do I calculate my capital gain?
    Subtract your cost basis (what you paid, plus commissions and, for property, improvements) from the sale price. For example, buying at $10,000 and selling at $60,000 with no other costs is a $50,000 gain. Reinvested dividends and stock splits adjust your basis.
    What is the Net Investment Income Tax (NIIT)?
    The NIIT is an extra 3.8% tax on investment income for higher earners — it kicks in once your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). It applies on top of the regular capital gains rate to the smaller of your investment income or the excess over the threshold.
    Can I pay 0% on capital gains?
    Yes. If your total taxable income including the gain stays within the 0% band ($49,450 single / $98,900 married in 2026), your long-term gains are taxed at 0%. This is why realizing gains in a low-income year — early retirement, a gap year, a sabbatical — can be a powerful strategy.
    Are crypto gains taxed the same way?
    Yes. The IRS treats cryptocurrency as property, so selling or trading crypto follows the same short-term vs long-term capital gains rules as stocks. Each disposal — including crypto-to-crypto trades — is a taxable event, and your holding period determines the rate.
    What if I sell my house?
    A primary residence gets a special break: the Section 121 exclusion lets you exclude up to $250,000 of gain (single) or $500,000 (married) if you owned and lived in it 2 of the last 5 years. This calculator does not apply that exclusion, so enter only the taxable portion of a home-sale gain.
    Does this include state taxes?
    No — it estimates federal capital gains tax only. Most states tax capital gains as ordinary income (California, for example, has no preferential rate), while a few have no income tax at all. Check your state's rules to see your total tax on a sale.

    Methodology & trust

    Editorial

    Finance calculator with its formula verified automatically against IRS — Topic no. 409, Capital gains and losses, per our editorial policy and methodology.

    Updates

    Updated: July 2026. Parameters are verified periodically against the cited sources.

    Privacy

    Calculations run 100% in your browser. We do not store or transmit your data.

    Limitations

    Indicative results. For critical decisions, consult a professional.

    📌 How to cite this calculator

    Rodríguez, M. (2026). Capital Gains Tax Calculator (USA). Hacé Cuentas. https://hacecuentas.com/en/capital-gains-tax-calculator-usa

    Content licensed under CC-BY 4.0 — reuse it citing the source with a link to Hacé Cuentas.

    ✉️ Report an error in this calculator