Audited 05 Aug 2026·Last updated 28 Oct 2026·5 citations·Tier 1·0 uses

Tax Loss Harvesting Calculator

Value a harvested capital loss: what it saves against this year's gains and up to $3,000 of ordinary income, and how much loss carries forward to next year.

Tax Loss Harvesting Calculator

Character of the harvested loss
$
Net long-term gains realized elsewhere this year, including capital gain distributions from funds (Form 1099-DIV).
$
Net short-term gains realized this year. They are taxed at your ordinary rate, so cancelling them saves more than cancelling long-term gains.
$
0%, 15% or 20%, plus 3.8% if the net investment income tax applies. Short-term gains and the ordinary-income deduction use the ordinary rate below.
%
%
The ordinary-income deduction cannot usefully exceed your taxable income, so a low figure here reduces it and carries the rest forward.
$
Estimated current-year federal tax benefit
2,070.00
Federal tax saved this year, in dollars: long-term gains cancelled times your capital gains rate, plus short-term gains cancelled and the loss deducted against ordinary income times your ordinary rate.
Capital gain offset
9,000.00
Loss deducted against ordinary income
3,000.00
Loss remaining after entered current-year offsets
3,000.00

Background.

A fund you bought for $100,000 is now worth $85,000. Selling it turns a paper loss into a realized $15,000 capital loss, and if you buy a similar but not identical fund with the proceeds, your market exposure barely changes. That is tax-loss harvesting: you keep roughly the same portfolio and collect a loss you can use on this year's return.

The loss is used in a fixed order. It first cancels capital gains you have realized during the year, saving whatever tax those gains would have cost. Any loss left after that can reduce ordinary income such as wages, but only by $3,000 a year, or $1,500 if you are married and file separately. Whatever still remains carries forward to later years, with no time limit.

The calculator prices that sequence. You enter the harvested loss and whether it is long-term or short-term, the long-term and short-term gains it can offset, your taxable income, the annual ordinary-income limit and two tax rates: one for long-term gains and one for ordinary income, which also taxes short-term gains. It returns the federal tax saved this year, the gains offset and the loss left to carry forward. In the default case, a $15,000 loss against $9,000 of long-term gains taxed at 15%, with income in the 24% bracket, saves $2,070 this year and leaves $3,000 for next year.

Harvesting mostly moves tax to a later year. The replacement fund was bought at $85,000, so when you eventually sell it, the gain is measured from that lower figure and the tax you avoided now comes back. The saving becomes permanent only in particular cases: when the loss offsets income taxed at a higher rate than the later gain will be, when the replacement is never sold during your lifetime, or when it is given to charity. The worked example puts numbers on that difference.

What is tax loss harvesting calculator?

Tax-loss harvesting is the deliberate sale of an investment held in a taxable account for less than its cost basis, so that the realized capital loss reduces the tax on other income. Under the rules in IRS Publication 550, capital losses are netted against capital gains first; if losses exceed gains, the excess is deductible against other income up to $3,000 a year ($1,500 married filing separately), and any unused amount carries forward indefinitely, keeping its short-term or long-term character. The technique works only in taxable brokerage accounts, because losses inside an IRA or 401(k) are not deductible. It is bounded by the wash-sale rule, which disallows the loss if you buy substantially identical securities within 30 days before or after the sale, and its value depends on the rates the loss displaces now and the rate the deferred gain will bear later.

How to use this calculator.

  1. In Realized capital loss harvested, enter the loss you have taken or plan to take: proceeds minus cost basis on each lot, as your broker's Form 1099-B or cost-basis screen reports it. Add any capital loss carried over from last year, since a carryover is treated as if incurred this year. A stock or bond that became completely worthless during the year counts too: it is treated as sold on the last day of the tax year, which also fixes whether the loss is short-term or long-term.
  2. In the gains boxes, enter the net long-term gains and the net short-term gains realized elsewhere in the year, including capital gain distributions from mutual funds and ETFs reported on Form 1099-DIV. Leave short-term gains at 0 if you have none.
  3. Leave Applicable annual ordinary-income loss limit at 3,000, or enter 1,500 if you are married filing separately.
  4. For Tax rate on long-term gains, enter 0%, 15% or 20% depending on your income, plus 3.8% if the net investment income tax applies. For the ordinary-income rate, use your marginal bracket; the calculator also uses it for short-term gains. Enter your taxable income before the loss so the deduction against wages is capped at what you can use.
  5. Before you sell, check that you have not bought, and will not buy, the same or substantially identical security within 30 days on either side of the sale, including in an IRA or a spouse's account.

The formula.

a loss meets gains of its own character first, then the other; benefit = long-term offset × gain rate + (short-term offset + ordinary deduction) × ordinary rate; ordinary deduction = min(remaining loss, annual limit, taxable income)

Let L be the harvested loss, G the long-term gains, S the short-term gains, C the annual ordinary-income limit, T your taxable income before the loss, g the tax rate on long-term gains and o the ordinary-income rate. A loss meets gains of its own character first, as Schedule D does: a long-term loss cancels min(L, G) of long-term gains, then min(L − that, S) of short-term gains; a short-term loss does the reverse. Long-term gains cancelled save g per dollar; short-term gains cancelled save o. What is left meets ordinary income, but only up to the least of the remainder, the annual limit C and your taxable income T, saving that amount × o. The current-year benefit is the sum of the savings. The carryforward is whatever remains after the gains and the ordinary-income deduction.

The sequence explains why the same loss can be worth very different amounts. A dollar that cancels a long-term gain in the 15% bracket saves 15 cents; a dollar that cancels a short-term gain taxed as ordinary income, or one of the $3,000 deducted against wages, saves your full marginal rate. Once the gains and the $3,000 are used up, extra loss saves nothing this year and simply waits in the carryforward. A $5,000 loss against the default $9,000 of long-term gains stops at the first term, saving 5,000 × 0.15 = $750 with nothing left over. The same $15,000 loss with no gains at all saves only 3,000 × 0.24 = $720 and carries $12,000 forward, enough to cover four more years of the $3,000 deduction if no gains arrive to absorb it sooner. With only $1,000 of taxable income, the deduction against wages stops at $1,000 and the rest carries forward.

The model takes your loss as a single character, so if your losses are mixed, choose the larger part; Publication 550 nets short-term losses against short-term gains and long-term against long-term before crossing over, and a mixed position can order slightly differently. It ignores state tax, the later tax on the replacement's lower basis and the time value of the deferral.

A worked example.

Example

With the defaults, the $15,000 loss first cancels the $9,000 of long-term gains: 9,000 × 0.15 = $1,350 of tax saved. The remaining 15,000 − 9,000 = $6,000 can reduce ordinary income, but only by the $3,000 limit, saving 3,000 × 0.24 = $720. The current-year benefit is 1,350 + 720 = $2,070, and 15,000 − 9,000 − 3,000 = $3,000 carries forward. With no gains next year, that carryover takes another $3,000 off ordinary income, worth $720 at 24%. Now the bill that comes back. The replacement fund cost $85,000; if it is later sold for $120,000, the gain is 120,000 − 85,000 = $35,000 instead of the $20,000 the original holding would have shown, so an extra $15,000 is taxed, costing $2,250 at 15%. Against the $2,070 now and $720 next year, $2,790 in all, the lasting gain is $540: exactly the $6,000 that went against wages times the 9-point gap between 24% and 15%. The $9,000 that cancelled 15% gains was a pure deferral.

capital Gain Tax Rate Percent15
ordinary Income Loss Limit3,000
realized Capital Loss15,000
ordinary Income Tax Rate Percent24
capital Gains Available9,000
loss CharacterlongTerm
taxable Income Before Loss150,000
short Term Gains Available0

Frequently asked questions.

Does harvesting a loss save tax or only postpone it?
Mostly it postpones. The replacement investment has a lower basis, so its eventual sale produces a bigger gain and returns the tax you avoided. The saving becomes permanent when the loss offsets income taxed at a higher rate than the later gain, when the replacement is held until death and its basis steps up for your heirs, or when you donate it to charity instead of selling. Deferral is still worth something, because the tax you postpone can stay invested meanwhile.
How much of a capital loss can I deduct against my salary?
After losses have cancelled all your capital gains for the year, Publication 550 allows the lesser of $3,000 ($1,500 if married filing separately) or your total net loss against other income. The limit is not indexed for inflation. Anything beyond it carries over to the next year and is treated as if incurred then, for as many years as it takes to use up.
Which capital gains tax rate should I enter?
The rate the cancelled gains would actually bear. Short-term gains, on assets held a year or less, are taxed at your ordinary rate. Long-term gains for 2026 are taxed at 0% up to $49,450 of taxable income for single filers ($98,900 joint), 15% up to $545,500 ($613,700 joint) and 20% above. Add 3.8% if the net investment income tax applies to you, which raises the default case's benefit from $2,070 to $2,412 at 18.8%.
Does it matter whether the harvested loss is short-term or long-term?
It can. Schedule D nets short-term losses against short-term gains and long-term losses against long-term gains before either crosses over, so a short-term loss first absorbs gains taxed at your ordinary rate, while a long-term loss first absorbs gains at 0%, 15% or 20%. Choose the loss character and enter your gains in the matching boxes. If the default case's $9,000 of gains were short-term and taxed at 24%, the same $15,000 long-term loss would save 9,000 × 0.24 + 720 = $2,880 instead of $2,070.
Is harvesting worthwhile if my long-term gains fall in the 0% bracket?
Much less so. Gains taxed at 0% cost nothing, so cancelling them saves nothing while still lowering the basis of the replacement. With a 0% gain rate and a 12% ordinary rate, the default $15,000 loss saves only the $3,000 deducted against income, 3,000 × 0.12 = $360. Some investors in that bracket do the opposite and realize gains deliberately to reset their basis higher at no tax cost.
Can I sell at a loss and buy the same investment straight back?
Not within the wash-sale window. If you buy substantially identical stock or securities within 30 days before or after the sale, including through your spouse, a corporation you control or your own IRA, the loss is disallowed and, except for the IRA case, added to the basis of the new shares instead. A common approach is to hold a fund tracking a different index, or a comparable company's shares, for at least 31 days.
What happens to the loss I carry forward?
It keeps its character. A long-term carryover reduces next year's long-term gains before short-term ones, and a short-term carryover the reverse. When figuring the carryover, the year's $3,000 deduction is charged against short-term losses first. Couples who switch from joint to separate returns can deduct a joint carryover only on the return of the spouse who had the loss, and a loss still unused at death can be claimed only on the final return.
Do capital gain distributions from my funds count as gains to offset?
Yes. Capital gain distributions that mutual funds and ETFs pay out, reported on Form 1099-DIV, are long-term capital gains whatever your holding period and are netted with your other gains on Schedule D. A fund that distributes heavily in December can absorb a loss you harvested in the same year, so include those distributions in the gains field.
When does a sale count for this year's return?
For stocks and funds traded on an exchange, the gain or loss belongs to the year of the trade date, not the settlement date, so a sale executed on the last trading day of December counts for that year. Each sale is reported on Form 8949 and summarized on Schedule D, where the netting and the $3,000 limit are applied.
Can I harvest losses inside an IRA or 401(k)?
No. Gains and losses inside a traditional or Roth IRA or a workplace plan are never reported as capital gains or losses, so a fall in value there produces no deduction. Harvesting applies only to taxable brokerage accounts, and buying the replacement inside your IRA within the wash-sale window would disallow the loss in the taxable account.

How this page was produced

Published by
Quanta Calculator
Primary sources
5 cited below
Method
a loss meets gains of its own character first, then the other; benefit = long-term offset × gain rate + (short-term offset + ordinary deduction) × ordinary rate; ordinary deduction = min(remaining loss, annual limit, taxable income)
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon