Tax calculator · 2026 tax year

Capital Gains Tax Calculator 2026

Federal tax on a stock sale: short- vs long-term rates and the 3.8% NIIT, side by side.

Estimates only; not tax advice. Doesn't include state or local taxes, credits or AMT.

About this calculator

Gains on investments held more than one year are long-term and taxed at 0%, 15% or 20%, depending on your taxable income. Gains on investments held one year or less are short-term and taxed as ordinary income, at the same rates as wages. The calculator adds the gain on top of your other income, as the IRS worksheet does, and shows how much tax the sale itself adds — for both holding periods.

Worked example

A single filer with $75,000 of other income has $58,900 of taxable income after the $16,100 standard deduction. Selling 500 shares bought at $50 for $80 produces a $15,000 gain. Held more than a year, the whole gain is taxed at 15% because taxable income is already above the $49,450 top of the 0% bracket: $2,250 of tax. Sold within a year, the gain is taxed like wages, in the 22% bracket: $3,300. No net investment income tax applies, because income stays under $200,000.

How the gain is taxed

Long-term gains stack on top of your ordinary taxable income. The part of the gain below the 0% threshold ($49,450 of taxable income for single filers in 2026) is tax-free, the part up to the 15% threshold ($545,500) is taxed at 15%, and anything above that at 20%. If that would ever cost more than taxing the gain at ordinary rates, the lower figure applies, as on the IRS worksheet. Short-term gains are simply added to your ordinary income.

Net investment income tax

An extra 3.8% applies to the smaller of your net investment income or the amount by which your modified AGI exceeds $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). These thresholds are set by law and aren't adjusted for inflation. The calculator counts only this sale as investment income.

Selling at a loss

A net capital loss offsets up to $3,000 of other income a year ($1,500 if married filing separately); the rest carries forward to future years. Losses first offset any other capital gains you have.

What it leaves out

State and local taxes, credits and the AMT; the 28% rate on collectibles and the 25% rate on unrecaptured real estate depreciation; and netting against other gains and losses, wash sales or loss carryovers. Commissions count toward your cost basis, so fold them into the purchase and sale prices.

2026 long-term capital gains tax brackets (taxable income)

RateSingleMarried filing jointlyMarried filing separatelyHead of household
0%$0 – $49,450$0 – $98,900$0 – $49,450$0 – $66,200
15%$49,451 – $545,500$98,901 – $613,700$49,451 – $306,850$66,201 – $579,600
20%Over $545,500Over $613,700Over $306,850Over $579,600

Source: IRS Rev. Proc. 2025-32, sec. 4.03

Net investment income tax (NIIT) thresholds

Filing status3.8% tax applies above MAGI of
Single$200,000
Married filing jointly$250,000
Married filing separately$125,000
Head of household$200,000

Source: IRS: Net investment income tax (IRC sec. 1411; not indexed for inflation)

Sources: IRS Rev. Proc. 2025-32; IRS: Net investment income tax; IRS Topic 409: Capital gains and losses; IRS Publication 550.

Estimates only; not tax advice. Doesn't include state or local taxes, credits or AMT.

Frequently asked questions

What are the 2026 long-term capital gains tax rates?

0%, 15% or 20%, depending on taxable income. For 2026 the 0% rate applies up to $49,450 of taxable income for single filers ($98,900 married filing jointly, $66,200 head of household, $49,450 married filing separately), and 15% applies up to $545,500 ($613,700 joint, $579,600 head of household, $306,850 separate). Above that, the rate is 20%.

How long do I need to hold a stock for long-term rates?

More than one year. The holding period starts the day after you buy (the trade date) and includes the day you sell, so a stock bought on March 10 qualifies as long-term if you sell it on March 11 of the following year or later.

Do I owe the 3.8% net investment income tax on stock gains?

Only if your modified adjusted gross income is above $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). It applies to the smaller of your net investment income or the amount over the threshold, and it covers both short- and long-term gains.

How are short-term capital gains taxed?

As ordinary income, at your regular 10% to 37% bracket rates — usually more than the long-term rate. The comparison table shows how much waiting past the one-year mark would save.

More calculators