Skip to main content

Capital gains tax calculator

Estimate the federal and state tax on this year's investment gains, with long-term gains stacked on your income across the 0%, 15% and 20% brackets.

This year's income and gains

Gains are the sale price minus what you paid, including commissions.

Wages, business income, interest, pensions

Leave 0 for the standard deduction

Held more than one year

Held one year or less

2026 long-term rates for your status

Thresholds apply to total taxable income, with gains stacked on top of everything else.

RateTaxable income fromTo
0%$0$98,900
15%$98,900$613,700
20%$613,700and up

Net investment income tax adds 3.8% once modified adjusted gross income passes $250,000.

How the stack works

Your numbers, from the bottom of the stack to the top.

  1. 1.Ordinary income of $125,000, including short-term gains, less the deduction leaves $92,800 taxed at regular rates.
  2. 2.Long-term gains and qualified dividends of $43,000 sit on top, taking total taxable income to $135,800.
  3. 3.Each slice of that stack is taxed at the long-term rate for its position: $6,100 at 0%, $36,900 at 15%.
  4. 4.Income stays under the net investment income tax threshold, so no 3.8% applies.

Warren provides educational information, not individualized financial, tax or legal advice. Read our disclaimers.

Gains planning rules of thumb

  • Harvest the 0% bracket

    In a year with low income, sell appreciated shares up to the top of the 0% bracket and buy them back. There is no wash-sale rule on gains, and the basis resets higher.

  • Harvest losses too

    Losses offset gains dollar for dollar, then up to $3,000 of ordinary income, and the rest carries forward. Wait 31 days before repurchasing the same security.

  • Watch the stacking order

    Short-term gains and ordinary income fill the lower brackets first, pushing long-term gains into higher ones. Timing a bonus or a Roth conversion changes the gains tax too.

  • State tax is extra

    Most states tax gains as ordinary income at rates from 3% to 13%. A few, such as Florida, Texas and Washington (below $270,000), do not.

Frequently asked questions

What is the difference between short-term and long-term gains?
An asset held for one year or less produces a short-term gain, taxed as ordinary income at your regular bracket. Held for more than a year it produces a long-term gain, taxed at 0%, 15% or 20% depending on your total taxable income. Qualified dividends get the same preferential rates.
How do the 0%, 15% and 20% brackets work?
Long-term gains sit on top of your other taxable income. For 2026 a single filer pays 0% on gains that keep total taxable income under $49,450, 15% up to $545,500 and 20% above that. For a married couple filing jointly the thresholds are $98,900 and $613,700. A gain can straddle two brackets, so part is taxed at one rate and part at the next.
What is the net investment income tax?
An extra 3.8% on investment income (gains, dividends, interest, rent) to the extent your modified adjusted gross income is above $200,000 for single filers, $250,000 married filing jointly or $125,000 married filing separately. The thresholds are not adjusted for inflation, so more people cross them every year.
How can I pay less tax on gains?
Hold winners past the one-year mark, realise gains in low-income years to use the 0% bracket, offset gains with losses (and deduct up to $3,000 of net losses against other income), donate appreciated shares instead of cash, and leave highly appreciated assets to heirs who get a stepped-up basis. The zero-rate room figure shows how much you could sell this year without federal tax.
Does this cover home sales or collectibles?
Not in full. Up to $250,000 of gain on your main home ($500,000 for a couple) is excluded if you lived there two of the last five years; enter only the gain above the exclusion. Collectibles are taxed at up to 28% and depreciation recapture on rental property at up to 25%, which this calculator does not model.

Know the tax before you sell

Warren AI reads your brokerage statements, tracks cost basis and tells you how much you can realise this year at 0% or how to pair sales with losses.