Free US Capital Gains Tax Calculator

Amir Shahzad is the founder of MixKhazana. He writes the site's free finance and tax calculators, researching every figure from official sources so the numbers stay trustworthy.

The New York Stock Exchange building on Wall Street
Photo: Arild Vågen / Wikimedia Commons, CC BY-SA 4.0 — the New York Stock Exchange on Wall Street

Published: 22 November 2026  ·  Updated: 22 November 2026

A single filer with $40,000 of other taxable income who sells stock for a $30,000 long-term gain pays about $3,082.50 in federal tax in 2026 — but the same gain held one year or less would cost about $5,560. Enter your own sale below and see the difference before you sell.

MixKhazana · Quick answer

Long-term gains are taxed at 0%, 15% or 20% — short-term gains at your ordinary rate. The rate depends on your total taxable income, not just the size of the gain: a single filer pays 0% up to $49,450 of taxable income and 15% up to $545,500 in 2026. Holding an asset past one year is the biggest legal tax cut available on a sale.

Researched by MixKhazana Team · Last updated 22 November 2026 · Data: IRS Revenue Procedure 2025-32 (tax year 2026)

What you paid, including fees — your cost basis.
What you sold it for, before tax.
Your other taxable income for 2026, after deductions — it sets your bracket.
Example: With the defaults — bought for $50,000, sold for $80,000 (a $30,000 gain), single filer with $40,000 of other taxable income — the long-term tax is $3,082.50 ($9,450 of the gain at 0% and $20,550 at 15%), leaving $26,917.50 after tax. The same gain as short-term would cost $5,560. Full walkthrough below.
Estimate only — not tax advice. Federal tax only, for tax year 2026. Long-term rates 0% / 15% / 20% from IRS Revenue Procedure 2025-32 §4.03; short-term gains taxed at the 2026 ordinary brackets (§4.01). NIIT of 3.8% is added when modified AGI passes $200,000 (single / head of household), $250,000 (joint) or $125,000 (separately). State tax, the $250,000 / $500,000 home-sale exclusion, collectibles (28%) and depreciation recapture are not modelled. Verify with a tax professional before selling.

How to use

  1. Enter your purchase price (cost basis) and sale price.
  2. Enter your other taxable income for 2026 and pick your filing status.
  3. Choose long-term or short-term holding period.
  4. Click Calculate My Capital Gains Tax — then flip the holding period to see what one more year of holding saves.

How it works

Capital gains tax is not a flat rate on the gain — it is a stack. Step one: the gain. Gain = sale price minus cost basis. Step two: the stack. Long-term gains sit on top of your other taxable income, so the part of the gain below the 0% ceiling is taxed at 0%, the part below the 15% ceiling at 15%, and only the part above it at 20%. For 2026 the ceilings are $49,450 / $545,500 for single filers, $98,900 / $613,700 for married filing jointly, $66,200 / $579,600 for head of household and $49,450 / $306,850 for married filing separately. Step three: short-term. A gain on an asset held one year or less is taxed as ordinary income at 10% to 37% using the 2026 brackets — for a single filer, 12% to $50,400, then 22% to $105,700. Step four: NIIT. If your modified AGI passes $200,000 (single) or $250,000 (joint), a further 3.8% net investment income tax applies to the investment income. If you want the full federal picture for your wages too, run the same income through our US federal income tax calculator — the two pages use the same IRS 2026 tables.

One statistic worth knowing: for 2026 the 0% long-term rate covers taxable income up to $49,450 for a single filer and $98,900 for a married couple filing jointly, per IRS Revenue Procedure 2025-32 — which means a retired couple with modest income can sell a large gain and owe 0% federal tax on part or all of it. The thresholds rise with inflation every year, so last year's calculator gives last year's answer.

Worked example

Sarah, single filer, sells shares in 2026: bought for $50,000, sold for $80,000, with $40,000 of other taxable income:

  • Gain: $80,000 − $50,000 = $30,000; total taxable income = $70,000
  • Long-term: the first $9,450 of the gain (up to the $49,450 ceiling) is taxed at 0% = $0
  • The remaining $20,550 is taxed at 15% = $3,082.50; NIIT does not apply (income under $200,000)
  • Long-term tax: $3,082.50 — she keeps $26,917.50 of the gain
  • Short-term instead: the $30,000 slice is taxed as ordinary income — $10,400 at 12% ($1,248) plus $19,600 at 22% ($4,312) = $5,560
  • Holding past one year saves $2,477.50 on this sale alone

At $250,000 of other income the picture changes again: the 3.8% NIIT switches on and part of the gain crosses into the 20% band. Try it in the widget.

Figures used here

Figure2026 value
Long-term rates0% / 15% / 20%
0% ceiling — single$49,450
0% ceiling — married filing jointly$98,900
0% ceiling — head of household$66,200
15% ceiling — single / joint / HoH$545,500 / $613,700 / $579,600
Short-term ratesOrdinary 10% – 37%
NIIT rate + thresholds3.8% over $200k / $250k / $125k
Long-term holding testMore than 1 year

Frequently asked questions

How much tax do I pay on $30,000 of long-term capital gains in 2026?

It depends on your other income. A single filer with $40,000 of other taxable income pays about $3,082.50 on a $30,000 long-term gain: $9,450 of the gain falls in the 0% bracket and $20,550 is taxed at 15%. The same gain held one year or less would cost about $5,560 as ordinary income. Enter your own figures in the calculator above.

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

For 2026 the long-term rates are 0%, 15% and 20%, set by taxable income: single filers pay 0% up to $49,450 and 15% up to $545,500; married filing jointly 0% up to $98,900 and 15% up to $613,700; head of household 0% up to $66,200 and 15% up to $579,600. Above those ceilings the rate is 20%. Source: IRS Revenue Procedure 2025-32, section 4.03.

What is the difference between short-term and long-term capital gains?

An asset held more than one year produces a long-term gain, taxed at 0%, 15% or 20%. An asset held one year or less produces a short-term gain, taxed as ordinary income at your marginal rate of 10% to 37%. Holding past the one-year mark is the single biggest legal way to cut the tax on a gain.

What is the 3.8% net investment income tax (NIIT)?

The NIIT adds 3.8% on investment income when modified adjusted gross income passes $200,000 for single and head-of-household filers, $250,000 for married filing jointly, or $125,000 for married filing separately. The thresholds are fixed by law and are not indexed for inflation. This calculator adds it automatically when your income crosses the line.

Do I pay state tax on capital gains too?

In most states, yes — capital gains are usually taxed as ordinary income at the state level, on top of the federal tax shown here. A handful of states have no state income tax at all. This calculator covers federal tax only; check your state's rules before you sell.

How can I lower my capital gains tax?

Hold assets longer than one year to reach the 0%, 15% or 20% long-term rates; sell losing investments to offset gains (tax-loss harvesting, up to $3,000 of net losses a year against ordinary income); keep taxable income inside the 0% bracket where possible; and hold investments inside retirement accounts such as a 401(k) or IRA, where gains are not taxed year to year.

What official sources are the 2026 capital gains figures based on?

The 0%, 15% and 20% thresholds come from IRS Revenue Procedure 2025-32, section 4.03, and the ordinary-income brackets from section 4.01 of the same procedure. The 3.8% NIIT and its thresholds come from 26 U.S.C. section 1411, and the long-term versus short-term rules from IRS Topic 409. This page is an estimate, not tax advice.

Related tools

🇺🇸

Free US Federal Income Tax Calculator

Your wages through the same 2026 IRS tables.

Calculate →
📈

Free Roth IRA Calculator

See your retirement savings grow tax-free.

Calculate →
💼

Free 401(k) Growth Calculator

Project your workplace retirement pot.

Calculate →
💵

Free Dividend Calculator

Reinvested dividends, compounded.

Calculate →
📊

Free Compound Interest Calculator

What your money becomes over time.

Calculate →
⚖️

Free Net Worth Calculator

Assets minus debts, in one place.

Calculate →

Your next step

Now plan the after-tax money: see what it becomes in the Roth IRA calculator, check your whole federal bill with the US federal income tax calculator, or watch it compound in the compound interest calculator.

Share:
Note: Projection only — not financial advice. Results are estimates; actual rates, taxes and fees vary.
Disclaimer: The information and estimates on this page are for general guidance only and are not professional financial, legal or medical advice — always verify with official sources before acting. Photos on this page are copyright-free originals, credited to the photographer and source with the licence noted.