AI agents for SMEs - now running in production. See how the pilot works →

Tax-Loss Harvesting Calculator

Tax saved this year by harvesting losses — netting against short- and long-term gains, the $3,000 ordinary-income deduction, carry-forward, the deferred tax from a lower basis, the net benefit over your holding period and the wash-sale window dates.

✅ Figures verified. The $3,000 annual net-capital-loss deduction against ordinary income ($1,500 married filing separately), unlimited carry-forward, netting rules and the 30-day wash-sale rule (IRC §1211, §1212, §1091) are statutory; the 2026 brackets and capital gains thresholds are confirmed IRS figures. Checked 9 October 2026.
$0
Tax on this year’s gains without harvesting—
Netting: losses applied to gains—
Loss used against ordinary income—
Tax this year after harvesting—
Tax saved this year—
Loss carried forward—
Years to use the carry-forward at $3,000 a year (if no future gains)—
The catch: lower basis means more tax later—
Net benefit of deferral (tax saved now, invested)—
Wash-sale window—

In short

Harvested losses offset capital gains (short-term against short-term first, then long-term, then across), then up to $3,000 of ordinary income a year, with the remainder carried forward indefinitely. The saving is mainly tax deferral — the replacement position has a lower basis — plus a rate arbitrage when short-term losses offset ordinary income. The wash-sale rule disallows the loss if you buy the same or a substantially identical security within 30 days before or after, in any account.

Who this is for: US investors with taxable brokerage accounts deciding whether to realise losses before year end.

Not tax or legal advice. Simplified: state tax, the 28% collectibles rate, Section 1256 contracts and multi-year carry-forward interaction with future gains are not modelled.
Ad space — insert AdSense unit here after approval

How tax-loss harvesting works

  • Netting order: short-term losses offset short-term gains (taxed at ordinary rates up to 37%); long-term losses offset long-term gains (0/15/20%); then any remaining loss offsets the other kind, then up to $3,000 of ordinary income; the rest carries forward indefinitely.
  • Most valuable when short-term losses wipe out short-term gains or ordinary income (37% value) — least valuable when long-term losses merely offset 15% gains.
  • It is mostly deferral: your replacement shares have a lower basis, so the gain reappears when you sell. The win is the time value of the tax saved, a possible drop in rates by then, and the chance the gain is never taxed (step-up at death, donation).
  • Wash-sale rule: no buying the same or substantially identical security 30 days before or after the sale, in any account (including IRAs and a spouse's). Swap S&P 500 for total-market, or one bond fund for a similar one.
  • Automate it: robo-advisers and direct-indexing accounts harvest continuously; the biggest gains come in volatile years like 2020 and 2022.

See also: AMT Calculator 2026.

Sources: IRS Topic 409 — Capital gains and losses; IRS Publication 550; IRC §1091, §1211, §1212. Checked 9 October 2026.

Assumptions

  • Netting: same-character first, then cross; up to $3,000 ($1,500 MFS) of net loss against ordinary income; remainder carried forward.
  • Tax before and after from the 2026 brackets, long-term rates stacked on ordinary income, NIIT above the threshold.
  • Deferred tax = long-term tax on the harvested amount at today's rates; net benefit = saving compounded at the return minus deferred tax.

Worked example

Single, $110,000 of other taxable income, $4,000 short-term and $12,000 long-term gains, $25,000 of long-term losses to harvest, 7% return, 10 years

Without harvesting the gains cost about $2,760 ($960 on the short-term gain at 24% and $1,800 on the long-term gain at 15%). The $25,000 loss wipes out the $12,000 long-term gain, then the $4,000 short-term gain, then $3,000 of salary, leaving $6,000 to carry forward. Tax saved this year about $3,480. When the replacement position recovers, about $3,750 of long-term tax is due on the $25,000 — but the $3,480 saved today grows to about $6,850 in ten years, a net gain of roughly $3,100 from deferral plus the rate arbitrage.

Frequently asked questions

How much capital loss can I deduct in 2026?

Unlimited against capital gains, then $3,000 a year ($1,500 married filing separately) against other income; the remainder carries forward indefinitely.

What is the wash-sale rule?

If you buy the same or a substantially identical security within 30 days before or after selling at a loss, the loss is disallowed and added to the basis of the new shares.

Is tax-loss harvesting worth it?

Usually yes when you have gains to offset or short-term losses, because of deferral and rate arbitrage — less so for long-term losses offsetting 15% gains when you plan to sell soon anyway.

Can I harvest losses in an IRA or 401(k)?

No — losses inside tax-advantaged accounts are not deductible, and buying the same security in an IRA can trigger a wash sale on a taxable-account loss.

Does the wash-sale rule apply to crypto?

Not currently — the rule covers stocks and securities, so crypto losses can be harvested and repurchased immediately, though Congress has proposed closing this.

Can I harvest losses in December and buy back in January?

Only if 31 days have passed since the sale; buying back on 2 January after a 15 December sale is a wash sale.

Ad space — insert AdSense unit here after approval

Related calculators

See all United States calculators → · All free online calculators

Written by the Swift IT Sols editorial team · SWIFT SOLSRules sourced from the official authorities named on this page and last checked How we source and check calculators

Found an error? Report it — tell us the inputs, the result you got, what you expected and the rule or source. Confirmed corrections are published within a week.

Start here

Ready to build your next digital solution?

Send the brief and you get a scoped response with approach, milestones and a fixed price range. Not a sales call.

1

A 30-minute call with the engineer who would run your project

Within 2 business days
2

A written scope: approach, module breakdown, milestones, fixed price range

Within 5 business days
3

You decide. No retainer, no obligation, and the scope document is yours to keep either way

Your timeline

Send your brief

Three fields to start. Add project details if you have them.

A real person replies, usually within one business day. Your details are stored on this site only and are never sold or shared.

Book a consultation