Home › Tax-Loss Harvesting Calculator › How Tax-Loss Harvesting Works
How Tax-Loss Harvesting Works
Sell a loser, cancel a gain, deduct $3,000 more against ordinary income. Losses net against gains first, then $3,000 a year, and the rest carries forward forever.
Filed November 19, 2026 · figures checked against 2026 sources
The short answer
Tax-loss harvesting is selling an investment that has fallen in value, so the realized loss cancels out capital gains you made elsewhere. The losses first offset gains of the same kind, then gains of the other kind, and then up to $3,000 of what is left can be deducted against ordinary income each year. Whatever is still left carries forward to future years, with no expiry date. The strategy only works in a taxable brokerage account, and only if the sale happens on or before Dec 31 of the tax year. A holding that is down on paper saves nothing until you sell it.
This article works the mechanics in order: what counts as a loss, how the netting works, what the $3,000 limit really does, what carries forward, and what the saving is worth at each tax rate.
What counts as a loss
A capital loss is the difference between what you paid for a security and what you sold it for, minus commissions and fees. The cost basis is usually what you paid, including commissions, and it is adjusted by events like stock splits, return-of-capital distributions, and reinvested dividends that raise the basis. Your brokerage reports the sale on Form 1099-B, and you report it on Form 8949 and Schedule D. The loss is real only when the sale closes. A stock that fell from $10,000 to $6,000 has produced no loss for tax purposes while you still hold it, and the day you sell it, the $4,000 loss is realized and available to use.
The holding period decides the kind of loss. A security held one year or less produces a short-term loss when sold. A security held more than one year produces a long-term loss. The line is exact: buy on Jan 1, 2026, and sell on Jan 1, 2027, and the gain or loss is short-term, because the holding period is one year, not more than one year. Sell on Jan 2, 2027, and it is long-term. The distinction matters because short-term and long-term losses are worth different amounts, and the netting rules treat them in a fixed order.
The loss must be in a taxable account. Selling at a loss inside an IRA, a 401(k), or any other retirement account produces no deductible loss, because those accounts pay no tax on gains in the first place. The same is true of a loss inside a health savings account. Only a taxable brokerage account, a trust, or a sole proprietorship account can harvest. This is the first mistake people make with the strategy, and it is also the most expensive one to discover after the fact, because the sale cannot be undone.
The netting order
The IRS nets losses and gains in a fixed order, and the order is what makes the strategy valuable. Short-term losses first offset short-term gains. Long-term losses first offset long-term gains. Then the excess of one side offsets the other side. Only after all gains are gone does the remaining net loss touch ordinary income, and then only up to $3,000 a year, or $1,500 if you are married filing separately.
Work it on the defaults on this site's calculator. You harvest $8,000 of short-term losses and $4,000 of long-term losses. You have $5,000 of short-term gains and $6,000 of long-term gains. The short-term side nets to a $3,000 excess loss. The long-term side nets to a $2,000 remaining gain. The $3,000 excess short-term loss offsets the $2,000 long-term gain, and $1,000 of net loss is left. That $1,000 is deducted against ordinary income. Every gain is wiped out, and the total tax saving is $2,220: $2,000 on the gains, and $220 on the ordinary deduction at a 22 percent rate.
| Step | Amount |
|---|---|
| Short-term losses harvested | $8,000 |
| Long-term losses harvested | $4,000 |
| Short-term gains | $5,000 |
| Long-term gains | $6,000 |
| Short-term net after netting | -$3,000 |
| Long-term net after netting | $2,000 |
| Cross-offset: excess short-term loss wipes long-term gain | -$2,000 |
| Net loss left over | $1,000 |
| Ordinary-income deduction (cap $3,000) | $1,000 |
| Carried forward to 2027 | $0 |
| Tax saved on the gains | $2,000 |
| Tax saved on the ordinary deduction at 22% | $220 |
| Total federal tax saved | $2,220 |
The order matters because a short-term loss is worth more than a long-term loss when it offsets a short-term gain. A short-term gain is taxed as ordinary income, at 22 percent for the filer in the example, while a long-term gain is taxed at 15 percent. A $10,000 short-term loss that offsets a $10,000 short-term gain at 22 percent saves $2,200. The same $10,000 long-term loss offsetting a $10,000 long-term gain at 15 percent saves $1,500. The $700 difference is the reason the netting order exists, and it is also the reason a short-term loss is the most valuable kind of loss to harvest.
The cross-offset has a quirk worth knowing. When a short-term loss offsets a long-term gain, the saving is priced at the long-term rate, not the short-term rate. In the example, the $2,000 of long-term gain that the excess short-term loss wiped out was taxed at 15 percent, so it saved $300, not $440. The loss does not carry its own rate across the netting. It takes the rate of the gain it offsets. That is why the total saving on the defaults is $2,000, not $2,640: the short-term losses that offset short-term gains saved 22 percent, and the short-term losses that crossed over to long-term gains saved 15 percent.
The $3,000 limit, and what it really does
After losses have offset every gain, up to $3,000 of the remaining net loss can be deducted against ordinary income each year: wages, interest, dividends, and other ordinary income. The limit is $1,500 if you are married filing separately. The limit has not changed in decades, and it is not indexed for inflation, which is why it feels small next to modern portfolios. A $50,000 net loss with no gains to offset deducts $3,000 this year and carries $47,000 forward, and at a 37 percent rate the deduction saves $1,110 this year. The rest waits.
The $3,000 limit is often misunderstood as a cap on harvesting. It is not. There is no cap on how much loss you can harvest, and no cap on how much loss can offset gains. The cap applies only to the part of the loss that is left after every gain is gone. If you have $11,000 of gains and $12,000 of losses, all $11,000 of gains is shielded, and only the last $1,000 hits the cap. The cap bites only when losses exceed gains by a wide margin, and then the carryforward softens it.
The carryforward is indefinite. An unused loss carries into the next year, and the next, until it is used up, and it keeps its short-term or long-term character when it carries. A short-term loss carried into 2027 is still a short-term loss in 2027, and it nets against 2027 short-term gains first. There is no expiry, and no paperwork beyond Schedule D, which tracks the carryforward year to year. A loss harvested in a year with no gains is not wasted. It is banked.
What the saving is worth at each rate
The saving is the loss times the rate of the income it offsets, and the rates are far apart. A $10,000 loss offsetting a short-term gain at 37 percent saves $3,700. The same loss offsetting a long-term gain at 15 percent saves $1,500. The same loss deducted against ordinary income at 24 percent saves $720 on the $3,000 annual slice. The value of a harvest depends entirely on what it offsets, which is why the first question to ask is not how big the loss is, but what gains it will cancel.
| $10,000 of loss offsets | Rate | Federal tax saved |
|---|---|---|
| Short-term gain, 37% bracket | 37% | $3,700 |
| Short-term gain, 22% bracket | 22% | $2,200 |
| Long-term gain, 20% bracket | 20% | $2,000 |
| Long-term gain, 15% bracket | 15% | $1,500 |
| Long-term gain, 0% bracket | 0% | $0 |
| Ordinary income, 24% bracket ($3,000 slice) | 24% | $720 |
The zero row is the trap. If your taxable income is under $49,450 as a single filer in 2026, your long-term gains are taxed at 0 percent, and harvesting a long-term loss against them saves nothing in federal tax. The gain was free, so shielding it is worthless. The loss still banks as a carryforward, but the 2026 saving is zero. Check your long-term rate before you sell, because a harvest that saves nothing this year is only worth doing if you expect gains in a future year that the carryforward can shield.
What harvesting is not
Harvesting does not make a bad investment good. Selling a losing position to save tax only makes sense if you were willing to sell the position anyway, or if you can replace it with a similar but not substantially identical investment and keep the same exposure. Selling a stock you believe in, paying a spread and a commission, and sitting in cash for 31 days to dodge the wash-sale rule can cost more than the tax saving. The classic version of the strategy is the swap: sell the S and P 500 fund that is down, buy a different broad-market fund the same day, and keep the market exposure while banking the loss. The swap only works if the replacement is not substantially identical, which is a judgment call the IRS has never fully defined for funds.
Harvesting also does not eliminate tax. It defers it. The replacement security has a lower cost basis than the one you sold, because you bought it at the depressed price, so a future sale of the replacement produces a larger gain. The saving is real, because the tax you do not pay today can compound in the meantime, and because the future gain may be taxed at a lower long-term rate, or offset by a future loss, or never realized at all if the holding passes to an heir with a stepped-up basis. But it is a deferral, not a cancellation, and a harvest that is sold as free money is oversold.
Who it helps most
Harvesting helps most when three things are true at once. First, you have gains to offset, because a loss that only deducts $3,000 a year against ordinary income is a slow prize. Second, your marginal rate is high, because the saving is the loss times the rate, and a 37 percent filer saves more than twice as much as a 15 percent filer on the same loss. Third, you can replace the sold position without changing your portfolio, because the strategy is a tax maneuver, not an investment decision, and it should not change what you own. When those three are true, the December harvest is one of the few tax moves that is entirely within your control, and the deadline is the only hard part: the trade must happen on or before Dec 31.
The netting order is the whole strategy, and the $3,000 cap is not the story. On the defaults here, $12,000 of losses saves $2,220, and $2,000 of that comes from shielding gains, not from the $3,000 ordinary deduction. The deduction contributes $220. A harvest with no gains to shield is a slow drip of $660 a year at 22 percent, and it takes four years to use a $12,000 loss that way. A harvest with gains to shield uses the whole loss at once. Check what gains you have before you check what losses you have, because the gains decide whether the harvest is worth $2,220 or $660.
Sources: IRS Publication 550, Investment Income and Expenses (netting, $3,000 limit, carryforward, trade date); IRS Topic 409, Capital Gains and Losses (holding periods, $3,000 limit); IRS Revenue Procedure 2025-32, section 4.03 (2026 long-term thresholds $49,450 single / $98,900 joint, 15% to $545,500 / $613,700); IRS Revenue Procedure 2025-32, section 4.01 (2026 ordinary brackets). The scenario figures are this site’s Tax-Loss Harvesting Calculator unless stated otherwise.
How Tax-Loss Harvesting Works questions
- How does tax-loss harvesting work?
- You sell an investment at a loss in a taxable account. The realized loss first offsets capital gains of the same kind, then gains of the other kind, then up to $3,000 of ordinary income a year. The rest carries forward indefinitely.
- How much can I deduct in capital losses per year?
- After losses offset gains, up to $3,000 of the remaining net loss can be deducted against ordinary income each year, or $1,500 if married filing separately. There is no cap on losses used to offset gains.
- Is tax-loss harvesting worth it?
- It depends on what the losses offset. A $10,000 loss saves $2,200 against a short-term gain at 22 percent, $1,500 against a long-term gain at 15 percent, and $720 on a $3,000 ordinary deduction at 24 percent. With no gains to offset, it is a slow $3,000-a-year drip.
Keep reading
- The Wash Sale Rule, ExplainedThirty days on each side, and your IRA counts.
- Tax-Loss Harvesting Deadline 2026The trade date decides the year, not the settlement.
- Short-Term vs Long-Term Capital GainsOne year is the line, and the rates are far apart.
- Tax-Loss Harvesting Mistakes to AvoidFive ways a good harvest turns into a wasted sale.
- Tax-Loss Harvesting CalculatorEnter your losses and gains: the slip nets them, applies the wash-sale rule, and prices the saving.