Tax-Loss Harvesting Calculator
Estimates the tax saved this year by realizing capital losses against short- and long-term gains and up to $3,000 of ordinary income, the carryforward left over, and the value of the savings if reinvested.
1. Capital Losses & Gains (Schedule D)
Current Tax Year2. Income & Tax Filing Status
Marginal Rates3. Reinvestment Compounding Horizon
8.0% Assumed Return$3,540.00
$6,000
@ 30.0% Combined$4,000
@ 21.0% Combined$3,000
IRS § 1211(b) Max$2,000
Future Tax YearsAssumes an 8.0% annual return with no tax on the growth; an assumption, not a forecast
Compounded Wealth Trajectory of Harvested Tax Savings
8.0% Assumed Annual ReturnWash-Sale Rule: Which Replacement Purchases Count
A loss is disallowed if substantially identical stock or securities are bought within 30 days before or after the sale (IRC § 1091, IRS Publication 550). The calculator assumes no wash sale; this table shows where the rule is clear and where the IRS has not ruled.
| Purchase within 30 days before or after the loss sale | Status | Basis in IRS guidance |
|---|---|---|
| The same stock or the same fund | Wash sale | Pub 550: buying substantially identical stock or securities |
| An option or contract to buy the same security | Wash sale | Pub 550: acquiring a contract or option to buy substantially identical stock or securities |
| Your spouse, or a corporation you control, buys it | Wash sale | Pub 550 |
| Your IRA or Roth IRA buys it | Wash sale; loss is not added to any basis | Rev. Rul. 2008-5; Pub 550 |
| Stock of a different company | Ordinarily not substantially identical | Pub 550, which notes exceptions such as a predecessor and successor in a reorganization |
| A different fund that tracks the same index | IRS has not ruled | Pub 550: decided on all the facts and circumstances; it gives no example involving funds |
| A fund that tracks a different index of a similar market | IRS has not ruled | Same facts-and-circumstances test; no published IRS example |
What This Calculator Does
The calculator estimates how much federal and state income tax is saved this year by selling investments at a loss when you already have realized capital gains. You enter the loss you could realize, your short-term and long-term gains for the year, your taxable ordinary income, filing status and a state rate. It shows how much of the loss offsets each type of gain, how much is deducted against ordinary income, how much carries forward to later years, and the tax saved on each piece. A final panel grows the tax saved at an assumed 8% annual return for the number of years on the slider.
It covers one tax year and assumes the sale is not a wash sale. It does not model the lower cost basis in whatever you buy with the proceeds, which is covered in the section on deferral below, and it does not model state-specific capital loss rules.
How the Math Works
The harvested loss is applied first against short-term gains, then against long-term gains, and any remainder against ordinary income up to $3,000 ($1,500 if married filing separately), the limit in IRS Publication 550 and the Schedule D instructions. What is left is the carryforward. On a real return, short-term losses first offset short-term gains and long-term losses first offset long-term gains, and only the net amounts are combined; the calculator's order matches that when the harvested loss is short-term. If the loss comes from positions held more than a year, it would offset long-term gains first, and the tax saved would be lower whenever the short-term rate is higher.
Each piece is valued at a rate. Short-term gains are taxed as ordinary income, so they are valued at your federal marginal bracket plus the 3.8% net investment income tax when income is above the threshold, plus the state rate. Long-term gains are valued at the 0%, 15% or 20% rate for your income and filing status, plus the NIIT where it applies, plus the state rate. The ordinary income deduction is valued at the federal marginal bracket plus the state rate. Brackets and capital gains bands are the 2026 figures in Rev. Proc. 2025-32; NIIT thresholds are from IRS Tax Topic 559.
These are marginal-rate estimates. The calculator uses the rate at the income you enter and does not recompute the tax when gains or the deduction would move you into a different bracket, and it applies the NIIT to the full offset rather than to the lesser of net investment income and the income above the threshold.
Worked Example
A single filer has $185,000 of taxable ordinary income, which is in the 24% federal bracket for 2026, and pays a 6% state rate. That income is below the $200,000 NIIT threshold and inside the 15% long-term band, which runs from $49,450 to $545,500 for single filers. They have $6,000 of short-term gains and $4,000 of long-term gains and harvest a $15,000 loss.
The loss offsets the $6,000 short-term gain, saving $1,800 at 30%, and the $4,000 long-term gain, saving $840 at 21%. Of the remaining $5,000, $3,000 is deducted from ordinary income, saving $900 at 30%, and $2,000 carries forward. The tax saved this year is $3,540. At the assumed 8% return, $3,540 reinvested for 20 years grows to $16,499.79. The same inputs as married filing jointly save $3,360, because $185,000 is in the 22% bracket for joint filers; as married filing separately they save $3,470, since the NIIT threshold is $125,000 and the ordinary income deduction is limited to $1,500.
2026 Thresholds the Calculator Uses
| Filing status | 0% long-term rate up to | 15% long-term rate up to | NIIT threshold | Loss deductible against ordinary income |
|---|---|---|---|---|
| Single | $49,450 | $545,500 | $200,000 | $3,000 |
| Married filing jointly | $98,900 | $613,700 | $250,000 | $3,000 |
| Head of household | $66,200 | $579,600 | $200,000 | $3,000 |
| Married filing separately | $49,450 | $306,850 | $125,000 | $1,500 |
Capital gains bands are from Rev. Proc. 2025-32, NIIT thresholds from IRS Tax Topic 559, and the deduction limit from Publication 550. The IRS questions and answers on the NIIT note that its thresholds are not indexed for inflation, so while the brackets and capital gains bands rise each year, the NIIT reaches further down the income range over time.
How the Tax Saved Changes With the Size of the Loss
With the worked-example inputs held constant, each row below is the page's own calculation for a different harvested loss.
| Harvested loss | Against short-term gains | Against long-term gains | Against ordinary income | Carryforward | Tax saved this year |
|---|---|---|---|---|---|
| $2,500 | $2,500 | $0 | $0 | $0 | $750 |
| $5,000 | $5,000 | $0 | $0 | $0 | $1,500 |
| $10,000 | $6,000 | $4,000 | $0 | $0 | $2,640 |
| $15,000 | $6,000 | $4,000 | $3,000 | $2,000 | $3,540 |
| $25,000 | $6,000 | $4,000 | $3,000 | $12,000 | $3,540 |
| $50,000 | $6,000 | $4,000 | $3,000 | $37,000 | $3,540 |
Once the gains and the $3,000 deduction are used up, extra loss adds nothing this year and goes entirely to the carryforward. Under Publication 550 a carryover keeps its character: a long-term carryover reduces next year's long-term gains before short-term gains, and it can be carried until it is used up. So the benefit of a large harvest depends on realizing gains or taking the $3,000 deduction in later years.
Deferral, Not Forgiveness
Harvesting a loss usually postpones tax rather than removing it. If you sell at a loss and buy a similar investment, the new position's cost basis is the lower price you paid, so a later sale produces a larger gain. Suppose shares bought for $1,000 are sold for $750, and a different fund is bought for $750. The $250 loss is used this year. If the new fund is later sold for $1,000, the $250 comes back as a gain. If the replacement is substantially identical and the sale is a wash sale, Publication 550 adds the $250 disallowed loss to the new basis instead; in its example, shares bought for $800 get a basis of $1,050, and the holding period of the old shares carries over.
The lasting benefit comes from three differences: the rate at which the loss is used against the rate at which the later gain is taxed (a loss used against short-term gains at 30% that returns as a long-term gain taxed at 21%, after the replacement is held more than a year, is worth the gap), the years in which the tax saved is invested, and whether the later gain is ever realized. The 8% panel counts the second of these but not the tax due when the lower-basis position is eventually sold, so it overstates the net result for anyone who later sells.
Frequently Asked Questions
How does tax-loss harvesting reduce taxes?
A realized capital loss offsets realized capital gains. If losses exceed gains, up to $3,000 ($1,500 if married filing separately) of the net loss is deducted from other income, and the rest carries over to later years until used, keeping its short-term or long-term character, per IRS Publication 550.
What is the wash-sale rule?
Under IRC section 1091, a loss is not deductible if you buy substantially identical stock or securities, or an option to buy them, within 30 days before or after the sale, a 61-day window. Purchases by your spouse or your IRA count. The disallowed loss is added to the basis of the new shares, except for IRA purchases, and the holding period carries over.
Can I sell one index fund and buy a similar one without a wash sale?
The IRS has not ruled on when two funds are substantially identical. Publication 550 says the question depends on all the facts and circumstances and that stock of one corporation is ordinarily not substantially identical to stock of another, but it gives no example involving funds. Two funds tracking the same index are the closest case; funds tracking different indexes are further apart, but neither case has a published IRS answer.
What happens if my IRA buys the shares I sold at a loss?
Rev. Rul. 2008-5 holds that if you sell stock or securities at a loss and cause your IRA or Roth IRA to buy substantially identical stock or securities within 30 days before or after the sale, the loss is disallowed and your basis in the IRA is not increased. Unlike an ordinary wash sale, the loss is not deferred to a later sale.
Does the NIIT change the value of a harvested loss?
Yes, above the thresholds. The 3.8% net investment income tax applies to the lesser of net investment income and modified AGI above $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately), per IRS Tax Topic 559. The IRS NIIT questions and answers list capital gains as investment income, so a loss that offsets them can also reduce NIIT. With the high-earner preset, short-term gains are valued at 48.1%: the 35% bracket, 3.8% NIIT and a 9.3% state rate.
Sources
- IRS Publication 550 (2025), capital losses, carryovers and wash sales
- Instructions for Schedule D (Form 1040) (2025)
- Rev. Proc. 2025-32, 2026 tax brackets and capital gains rate amounts
- IRS Tax Topic 559, net investment income tax
- IRS questions and answers on the net investment income tax
- Rev. Rul. 2008-5, Internal Revenue Bulletin 2008-3 (wash sales and IRAs)
- 26 U.S.C. § 1091, loss from wash sales of stock or securities
Related Tools
Disclaimer: This tool is for educational and scenario-analysis purposes only. It does not constitute tax, legal, or investment advice. Always consult a licensed CPA or tax advisor for your specific situation. Figures reflect 2026 federal limits and may change.
Built and verified by The Breakeven Math — last reviewed September 18, 2026. Federal brackets and capital gains bands per IRS Rev. Proc. 2025-32.