1. Home
  2. Calculators
  3. Capital gains tax calculator
Selling something? · 2026

Capital gains tax calculator

Sold shares, crypto or a property? See the federal tax on the profit, and how much holding past one year would change it.

Estimated federal tax on the gain
–
–Capital gain
–Effective rate on gain
–Profit after tax

Source: IRS, tax year 2026, estimates only, not tax advice. Federal figures from IRS Rev. Proc. 2025-32 and the 2026 Social Security wage base. State and local taxes are not included. Last checked 2026-11-24.

How to use the capital gains tax calculator

  1. Choose your filing status and enter your other income for the year, such as wages. The calculator subtracts the 2026 standard deduction for you.
  2. Enter what you paid, including buying fees (your cost basis).
  3. Enter what you sold for, minus selling fees or commissions.
  4. Pick how long you held it. More than one year counts as long-term.
  5. Read the tax, the effective rate on your gain, and what the other holding period would have cost.

Short-term vs. long-term capital gains

The holding period decides which set of rates you pay. Own an asset for one year or less and the profit is a short-term gain, taxed at your ordinary income rates (10% up to 37%). Hold it for more than one year and it's a long-term gain, taxed at 0%, 15% or 20%.

Which long-term rate you pay depends on your total taxable income, with the gain stacked on top of your other income. For 2026:

RateSingleMarried jointlyHead of household
0%Up to $49,450Up to $98,900Up to $66,200
15%$49,451 to $545,500$98,901 to $613,700$66,201 to $579,600
20%Over $545,500Over $613,700Over $579,600

Worked example

A single filer earns $70,000 in wages and sells shares bought for $20,000 at $35,000, a $15,000 gain held for three years.

  • Ordinary taxable income: $70,000 − $16,100 = $53,900. That's already past the $49,450 top of the 0% band.
  • So the whole $15,000 gain lands in the 15% band: $2,250 of tax.

Had the shares been sold after eight months, the gain would sit on top of the $53,900 in the 22% bracket, costing $3,300. Waiting past the one-year mark saved about $1,050.

Things that change the bill

  • Cost basis. Add purchase fees and, for property, the cost of improvements. A higher basis means a smaller gain.
  • Losses. Losses from other sales offset gains in the same year.
  • Net investment income tax. An extra 3.8% applies to investment income for people with modified AGI above $200,000 (single) or $250,000 (married filing jointly). These thresholds aren't adjusted for inflation, so more people cross them each year.
  • Selling your home. Some or all of the gain on a main home can be excluded if you meet the ownership and use rules. This calculator doesn't apply that exclusion.
  • Collectibles and real estate depreciation have their own rates and aren't modeled here.
  • State tax. Most states tax capital gains as regular income. Not included.

See all the bands side by side on the 2026 tax brackets page, or estimate your whole year with the income tax calculator.

Frequently asked questions

How is capital gains tax calculated?

Subtract your cost basis from the sale price to get the gain. Short-term gains are taxed as ordinary income; long-term gains get 0%, 15% or 20% depending on your total taxable income.

What is the capital gains tax rate for 2026?

Long-term rates are 0%, 15% and 20%. For single filers the 0% rate applies up to $49,450 of taxable income and 20% starts above $545,500.

How long do I need to hold to pay long-term capital gains tax?

More than one year from the day after you bought it to the day you sell.

Does this work as a crypto capital gains tax calculator?

Yes. The IRS treats crypto as property, so the same short-term and long-term rules apply. Enter your cost basis and sale proceeds.

Can I use it for selling a house?

You can, but it doesn't apply the home sale exclusion that many owners qualify for, so it may overstate the tax on a main home.

Do I pay capital gains tax if I reinvest?

Generally yes, in a regular taxable account. Selling triggers the tax even if you buy something else with the money. Retirement accounts work differently.

What is the 3.8% tax on capital gains?

The net investment income tax. It applies on top of capital gains rates when modified AGI is above $200,000 for single filers or $250,000 for married couples filing jointly.

Related guides

Related tools

See everything in Calculators →

More free calculators, same plain working

Every DoesWhat calculator shows how it got the answer, runs in your browser and never asks for an email.

Browse all calculators