Capital Gains Tax Calculator (2026)

Estimate the 2026 federal tax on a capital gain, with the 0%, 15% and 20% long-term brackets, short-term rates, the 3.8% net investment income tax and losses.

How long you held it
What you paid, including commissions and reinvested dividends.
Your other income is
Wages, interest and other income, not counting this sale. “Before deductions” subtracts the 2026 standard deduction for you.
Interest, dividends and rents already included above — used only for the 3.8% NIIT.
Most states tax capital gains as ordinary income; some have no income tax.
Capital gain
$15,000.00long-term
Federal capital gains tax
$2,250.00$15,000.00 at 15%
Effective rate on the gain
15%
Gain after tax
$12,750.00
If held 1 year or less
$3,300.00short-term would cost $1,050.00 more
Estimated tax on this gain$2,250.00Single · 2026 rates
  • Covers stocks, funds and most other capital assets. Collectibles (up to 28%), unrecaptured real estate depreciation (up to 25%), home-sale exclusions and other gains or losses in the same year are not modeled. Estimate only — not tax advice.

Show the work

  1. Gain = $35,000.00 − $20,000.00 = $15,000.00
  2. Other taxable income = $85,000.00 − $16,100.00 standard deduction = $68,900.00
  3. Stack the gain on top: taxable income runs $68,900.00 → $83,900.00. 0% up to $49,450.00, 15% up to $545,500.00, 20% above → $0.00 × 0% + $15,000.00 × 15% + $0.00 × 20% = $2,250.00
  4. NIIT = 3.8% × lesser of investment income ($15,000.00) and MAGI over the threshold ($0.00) = $0.00

Where the gain goes

You keep: $12,750.00 (85%)Federal tax: $2,250.00 (15%)
  • You keep
  • Federal tax
2026 long-term capital gains brackets (taxable income)
RateSingleMarried jointlyHead of householdMarried separately
0%up to $49,450.00up to $98,900.00up to $66,200.00up to $49,450.00
15%to $545,500.00to $613,700.00to $579,600.00to $306,850.00
20%over $545,500.00over $613,700.00over $579,600.00over $306,850.00

When you sell an investment for more than you paid, the profit is a capital gain — and how much tax you owe on it depends on how long you held the asset, your other income and your filing status. This calculator applies the 2026 federal rules published by the IRS in Revenue Procedure 2025-32, adds the 3.8% net investment income tax where it applies, and lets you include a flat state rate.

How to use the capital gains tax calculator

  1. Choose your filing status and whether you held the asset more than one year (long-term) or one year or less (short-term).
  2. Enter the purchase price (your cost basis), the sale price and any selling costs such as commissions.
  3. Enter your other income for 2026. Pick Before deductions to let the calculator subtract the 2026 standard deduction, or Taxable income if you already know that figure.
  4. Optionally add other investment income (for the NIIT) and a state tax rate.

How capital gains tax is calculated

Capital gain = Sale price − Selling costs − Cost basis

Long-term gains are stacked on top of ordinary taxable income and taxed by the band they fall into:

Tax = (Gain in 0% band × 0) + (Gain in 15% band × 15%) + (Gain above the 15% band × 20%)

Short-term gains are taxed as ordinary income: the tax on (other income + gain) minus the tax on other income alone.

NIIT = 3.8% × min(Net investment income, MAGI − Threshold)

2026 long-term capital gains brackets

Rate Single Married filing jointly Head of household Married filing separately
0% up to $49,450 up to $98,900 up to $66,200 up to $49,450
15% $49,451 – $545,500 $98,901 – $613,700 $66,201 – $579,600 $49,451 – $306,850
20% over $545,500 over $613,700 over $579,600 over $306,850

Thresholds are taxable income, including the gain. Source: IRS Rev. Proc. 2025-32, §4.03.

Worked example

A single filer earns $60,000 in wages and sells shares held for three years, bought for $20,000 and sold for $35,000.

Gain = 35,000 − 20,000 = $15,000

Other taxable income = 60,000 − 16,100 standard deduction = $43,900

The 0% band ends at $49,450, so $5,550 of the gain is taxed at 0% and the remaining $9,450 at 15%

Tax = 9,450 × 15% = $1,417.50 — an effective 9.45% on the gain

Had the shares been held less than a year, the same $15,000 would be taxed at 12% and 22% ordinary rates — $2,650, or $1,232.50 more.

At the other end, a married couple with $700,000 of other income realizing a $200,000 long-term gain pays 20% ($40,000) plus the 3.8% NIIT ($7,600), a combined 23.8%.

Ways to reduce capital gains tax

  • Wait for the one-year mark. A gain becomes long-term only if you held the asset more than one year.
  • Harvest losses. Selling losers in the same year offsets gains, and up to $3,000 of excess loss offsets other income. Avoid buying the same security within 30 days, or the wash-sale rule disallows the loss.
  • Use the 0% band. In a low-income year — a sabbatical, early retirement — long-term gains up to the 0% threshold can be realized tax-free.
  • Hold in tax-advantaged accounts. Gains inside a 401(k) or IRA are not taxed when realized.
  • Give appreciated shares. Donating stock held over a year to charity can avoid the gain entirely.

Track the trade itself with the stock profit calculator, combine multiple purchases with the average cost calculator, and see your full tax picture with the federal income tax calculator.

This is an estimate for planning based on 2026 IRS figures, not tax advice. It does not model collectibles (28% maximum rate), unrecaptured Section 1250 gain, the home-sale exclusion, the alternative minimum tax or how this gain interacts with other credits and deductions.

Frequently asked questions

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

Per IRS Rev. Proc. 2025-32, the 0% rate applies to taxable income up to $49,450 for single filers, $98,900 for married couples filing jointly and $66,200 for heads of household. The 15% rate runs up to $545,500 (single), $613,700 (joint) and $579,600 (head of household). Above those, the rate is 20%.

How are short-term capital gains taxed?

Gains on assets held one year or less are added to your ordinary income and taxed at your regular bracket rates, from 10% to 37% in 2026. The same gain held just over a year can be taxed at 0%, 15% or 20% instead.

What is the net investment income tax?

It is an extra 3.8% federal tax on the smaller of your net investment income or the amount by which 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 statute and are not adjusted for inflation.

How much of a capital loss can I deduct?

Capital losses first offset capital gains. If losses exceed gains, up to $3,000 a year ($1,500 if married filing separately) can offset other income, and any remainder carries forward to future years indefinitely.

Why does my gain not all get taxed at the same rate?

Long-term gains are stacked on top of your ordinary taxable income. If your ordinary income sits below a bracket threshold, the first part of the gain fills the 0% or 15% band and only the rest is taxed at the next rate.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.