Skip to content
2026 limits401(k) $24,500IRA $7,500HSA self / family $4,400 / $8,750Standard deduction single / joint $16,100 / $32,200All limits and rates
CalcTortoise

Information and historical data only. We do not guarantee any returns from any scheme or product. Read the disclaimer

Capital Gains Tax Calculator

Enter your income and your gains to see the tax, and how much selling a losing position would save.

Written by the CalcTortoise editorial team · How we work

Filing status

Assumed: 5% state tax on gains, harvested loss is long-term. Change

A flat rate. Some states tax gains at special rates, and about nine states have no income tax.

The harvested loss is

With and without the harvested loss

ItemWithout harvestingWith harvesting
Federal income tax$4,100$2,900
Net investment income tax$0$0
State tax$1,250$850
Total tax on gains$5,350$3,750

Used CalcTortoise? Your review helps us a lot, good or bad. Review us on Trustpilot

Worked example: tax-loss harvesting

A single filer with $85,000 of wages sells for $5,000 of short-term and $20,000 of long-term gains, and sells losing positions for a $8,000 long-term loss. The tax on the gains is $3,750 instead of $5,350, so harvesting saves $1,600.

Short-term gain after netting
$5,000
Long-term gain after netting
$12,000
State tax at 5%
$850
Tax on the gains, with and without the harvested loss
ItemWithout harvestingWith harvesting
Federal income tax$4,100$2,900
Net investment income tax$0$0
State tax$1,250$850
Total$5,350$3,750

How to use this calculator

  1. Enter your other taxable income and your filing status.
  2. Add the gains you have realized this year, short-term and long-term separately.
  3. Add the loss you have sold, or plan to sell, and open the assumed fold to set your state rate and whether the loss is short-term or long-term.

Tax-loss harvesting and the wash-sale rule

Tax-loss harvesting means selling an investment that is worth less than you paid, so the loss offsets gains you would otherwise be taxed on. The calculator runs your year twice, with and without the loss, and shows the difference. Be careful with the wash-sale rule: buying the same or a substantially identical security within 30 days before or after the sale disallows the loss for now. The calculator does not check for it.

What this estimate leaves out

Your other income is taken as fully taxable wages and the standard deduction is used. The entered gains are net amounts for the year in each category, and a loss carried over from a previous year is not included. Qualified dividends, interest, collectibles, real estate depreciation recapture and small business stock are not modelled, and the state tax is a flat rate on the net gain. Alternative minimum tax is not included. This is an estimate, not tax advice.

Frequently asked questions

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

0%, 15% or 20%, depending on your taxable income. For a single filer the 0% rate applies up to $49,450 of taxable income and the 15% rate up to $545,500. For married couples filing jointly the limits are $98,900 and $613,700. Short-term gains are taxed at your ordinary income rate instead.

What is the 3.8% net investment income tax?

A surtax of 3.8% on the smaller of your net investment income or the amount your modified adjusted gross income is above $200,000 (single), $250,000 (married filing jointly) or $125,000 (married filing separately). These amounts are not adjusted for inflation. In the example, with $250,000 of wages and no harvesting, the tax is $950; with $85,000 of wages it is $0.

How much does tax-loss harvesting save?

In the example, selling positions at a $8,000 long-term loss cuts the total tax on the gains from $5,350 to $3,750, a saving of $1,600. The saving is roughly the loss times your tax rate on the gains it offsets, plus state tax. It is a deferral as much as a saving, because the lower cost basis of what you buy back raises your gain later.

How are capital gains and losses netted?

Short-term gains and losses are netted against each other, and so are long-term ones. If one side ends up as a loss it then reduces the other side. If the year still ends in a net loss, up to $3,000 ($1,500 if married filing separately) reduces your other income, and the rest carries forward. In a test year with $2,000 of gains and a $10,000 loss, $3,000 reduces income and $5,000 carries forward.

Can I pay no tax on long-term gains?

Yes, if your taxable income, with the gains on top, stays within the 0% band. A single filer with $30,000 of wages and $20,000 of long-term gains owes $0 of federal tax on them.

What is the wash-sale rule?

If you buy the same or a substantially identical security within 30 days before or after selling it at a loss, the loss is disallowed for now and added to the cost of the new shares. This calculator does not check for it, so keep it in mind before counting on a harvested loss.

Sources and method

Tax is worked out bracket by bracket from the published tables, then deductions and credits are applied in the order the rules give.

Rules and rates last verified . How we calculate · Editorial policy · Corrections and change log

Last updated October 30, 2026. For information only — not financial advice. Check the final figures with your lender or bank.