Capital gains tax calculator: what will I pay?

Free calculator for one sale. No sign-up, federal tax only, and nothing you type leaves your browser.

What did you sell?
What did you sell?
Dates
The sale
Your income

Before deductions. On the 2025 Form 1040 that is line 11a, adjusted gross income, without this sale's gain.

Your federal capital gains tax estimate

Your estimate shows here

Fill in the sale and your income. The gain is stacked on top of your other taxable income and split at the year's 0%, 15% and 20% lines.

How the capital gains tax calculator works

You want one number: what this sale adds to your federal tax bill. The rates and lines behind it come from the IRS revenue procedure for the year of your sale, and the stacking follows the IRS's own Qualified Dividends and Capital Gain Tax Worksheet. Nothing is guessed. Here's what happens to your numbers, in order.

  1. How long you held it. The count starts the day after you bought and runs through the day you sold, by trade date. Hold it more than one year and it's long-term. Bought on the last day of a month? Then it turns long-term on the first day of the thirteenth month after. Inherited property counts as long-term however briefly you held it.
  2. The gain. Sale price, minus what it cost to sell, minus what you paid. If you don't know what you paid, the calculator stops there rather than guess. A blank isn't zero, because zero would tax the whole sale price.
  3. Your taxable income, before and after. The 0%, 15% and 20% lines apply to taxable income, not to your salary. So your deductions come off first, on a line you can see.
  4. Where the gain lands. A long-term gain sits on top of your other taxable income, and each slice of it is taxed by where it falls against the year's two lines. A short-term gain goes through the ordinary brackets instead, slice by slice.
  5. The 3.8% test. Higher incomes can owe Net Investment Income Tax on the gain as well. It runs its own income test against its own threshold, so it gets its own line, even when the answer is no.
  6. The lower of two figures. The law says the capital gains method can never cost more than ordinary rates would. A small gain just above the 0% line sometimes comes out cheaper at ordinary rates. When it does, the calculator uses that figure and tells you why.

Worked example

Say you're single, you earn $58,000 this year, and in September 2026 you sell shares for $30,000 that you bought in March 2024 for $18,000. Take off the $16,100 standard deduction and you have $41,900 of taxable income before the gain comes in. The $12,000 gain then runs from $41,900 up to $53,900, and the 2026 0% line for a single filer sits at $49,450.

So $7,550 of the gain lands at 0% and only $4,450 at 15%, which comes to $667.50. That's 5.6% of the gain, not the 15% you may have braced for. Had you bought the shares just eleven months before the sale, the whole gain would run through the 12% and 22% brackets instead, and the bill would be $1,790.

Income with the gain comes to $70,000, well under the $200,000 threshold, so the 3.8% tax doesn't apply. Press "Try the example sale" in the calculator and you'll see this same sale, line by line.

  • Other taxable income: $41,900
  • Gain taxed at 0%: $7,550, tax $0.00
  • Gain taxed at 15%: $4,450, tax $667.50
  • The 0% line for a single filer in 2026: $49,450
  • The 15% line, $545,500, is off the scale
A $12,000 gain stacked on $41,900 of other taxable income: federal tax $667.50.

Who this is for

  • You've sold shares, a fund, crypto or land, or you're about to, and you want the federal tax on that one sale.
  • You've sold your main home and want to know whether the $250,000 or $500,000 exclusion covers the gain.
  • You're close to the one-year mark and want to see the same sale taxed both ways, short-term and long-term.
  • A Form 1099-B or a closing statement just arrived, and you want to check one line before you file or sit down with your preparer.

It handles one sale at a time, and federal tax only. It won't fill in Form 8949 or Schedule D, net this sale against your others, or work out state tax, the alternative minimum tax or a partial home exclusion. Estates, trusts, minors and nonresidents follow other rules.

Investor and home seller questions about capital gains tax

How is capital gains tax calculated?

Start with the gain: what the sale brought in, minus selling costs, minus what you paid. A short-term gain is taxed like wages, at your ordinary rates. A long-term gain sits on top of your other taxable income, and each slice is taxed by where it lands: 0%, 15% or 20%, with the lines set by your filing status and the tax year. Higher incomes can owe another 3.8% on top.

How long do you have to hold stock to get long-term capital gains?

More than one year. The IRS counts from the day after you bought up to and including the day you sell, by trade date. Bought on March 14, 2024? A sale on March 14, 2025 is still short-term. March 15, 2025 is the first long-term day. Shares bought on the last day of a month turn long-term on the first day of the thirteenth month after.

Is capital gains tax on top of income tax?

It's part of the same federal income tax, just worked out a different way. Your long-term gain is stacked on top of your other taxable income and taxed at its own rates. Adding it doesn't raise the rate on your wages. It can push part of the gain past the 0% line into 15%, though, which is why one sale can land in two bands.

Does capital gains count as income for your tax bracket?

Yes. A gain is part of your taxable income, though the two kinds behave differently. A short-term gain stacks onto your wages and is taxed at your ordinary bracket rates. A long-term gain counts too, but it's taxed at 0%, 15% or 20% instead of the bracket rate. Either kind also counts toward other income tests, like the 3.8% Net Investment Income Tax threshold.

Do I pay capital gains tax when I sell my house?

Often not. For a main home you owned and lived in for 2 of the last 5 years, the limit is $250,000. A joint return can exclude $500,000 if at least one spouse meets ownership and both meet the use test. Neither can have used the exclusion in the previous 2 years. Depreciation, earlier rental use, a recent 1031 exchange or expatriate tax can change the answer. Choose My main home to check the tests.

What is the 3.8% net investment income tax?

It's a separate federal tax on investment income, capital gains included, and it only reaches higher incomes. It applies to the smaller of two amounts: your net investment income, or how far your modified adjusted gross income is over $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). Those thresholds are written into the law. They don't rise with inflation.

How do capital losses offset gains?

Losses cancel gains from the same year first. If your losses are bigger, up to $3,000 of the net loss ($1,500 if married filing separately) comes off your other income each year, and the rest carries forward. A loss on your home or car doesn't count, since personal-use losses aren't deductible. And a loss on shares can be disallowed if you buy the same shares within 30 days before or after the sale.

When do you pay capital gains tax?

With the return for the year you sold, going by the trade date. A December 31 trade counts in that year even if the money arrives in January. If the gain is large and nothing was withheld, an estimated tax payment may be due before you file. IRS Publication 505 explains when.

Do I pay capital gains tax on inherited property?

Usually only on the gain since you inherited it. Your basis is generally the property's fair market value on the date of death, not what the original owner paid. The sale also counts as long-term, however briefly you held it. So selling soon after inheriting often shows little gain. Publication 551 covers the exceptions.

Does my state tax capital gains too?

It may. Each state sets its own rules for gains, and the calculator above works out the federal tax only. Your state's revenue department publishes its rules, and a tax preparer who works in your state can tell you how the gain is treated there.

Long-term capital gains tax rates for 2025 and 2026

These lines are amounts of taxable income, after deductions, and your gain is stacked on top of the rest of yours. So "the 15% bracket" really means the slice of your gain that lands between the two lines. The IRS sets each year's lines in a revenue procedure: Rev. Proc. 2024-40 for 2025 and Rev. Proc. 2025-32 for 2026.

2026 (Rev. Proc. 2025-32)

Filing status0% up to15% up to20% aboveStandard deduction3.8% NIIT over
Single$49,450$545,500$545,500$16,100$200,000
Married filing jointly$98,900$613,700$613,700$32,200$250,000
Married filing separately$49,450$306,850$306,850$16,100$125,000
Head of household$66,200$579,600$579,600$24,150$200,000

2025 (Rev. Proc. 2024-40; standard deduction per Rev. Proc. 2025-32)

Filing status0% up to15% up to20% aboveStandard deduction3.8% NIIT over
Single$48,350$533,400$533,400$15,750$200,000
Married filing jointly$96,700$600,050$600,050$31,500$250,000
Married filing separately$48,350$300,000$300,000$15,750$125,000
Head of household$64,750$566,700$566,700$23,625$200,000

Qualifying surviving spouses use the married filing jointly row. Short-term gains have no separate rates: they go through the ordinary brackets for the year.

Sources and last checked

Last checked October 7, 2026 (dataset version 2026-10-07).

The month-end rule comes from Rev. Rul. 66-7. As of October 8, 2026 it had been read only in a republished copy, because the IRS's original 1966 bulletin couldn't be opened, and it changes the answer in one case only: a purchase on February 28 in the year before a leap year. Separately, the IRS hadn't published 2027 figures as of October 8, 2026, so a sale dated in 2027 is estimated on the 2026 figures and marked provisional.

More tools

Worth a bookmark for when your Form 1099-B arrives, or the next time a sale sits close to the one-year mark.

Want someone to check what this estimate leaves out? Find a tax preparer or a CPA firm in our directory.

Back To Top