Tax-Loss Harvesting Calculator
A losing position isn't a total loss — it's a tax asset. Sell it, and the loss offsets your gains dollar-for-dollar, then up to $3,000 of ordinary income a year, with the rest carried forward. See exactly what yours is worth.
Your inputs
The ordering rules, plainly
Harvested losses are spent in a fixed order. First, they cancel your capital gains dollar-for-dollar — the most valuable use, since gains would otherwise be taxed. Second, up to $3,000 per year ($1,500 if married filing separately) offsets ordinary income like your salary. Third, anything left carries forward to future tax years, indefinitely. A big loss in a bad year can shelter gains for years to come.
The wash-sale rule, plainly
The IRS won't let you "sell" a loss while effectively keeping the position. Buy back the same or a substantially identical security within 30 days on either side of the sale and the loss is disallowed (it's added to the new shares' cost basis instead — deferred, not destroyed, but the harvest fails). The trap most people miss: automatic dividend reinvestment and purchases inside an IRA or 401(k) count as repurchases too.
Income offset = min(max(loss − gains, 0), $3,000)
Carryforward = max(loss − gains − $3,000, 0)
Tax saved = gain offset × gains rate + income offset × income rate
Worked example
Harvest a $10,000 loss with $8,000 of gains, a 15% gains rate, and a 24% income bracket. The loss first wipes out all $8,000 of gains (saving $1,200), then $2,000 offsets ordinary income (saving $480). Total saved this year: $1,680, with nothing left to carry forward. Harvest $20,000 against only $5,000 of gains instead and you'd save $1,470 this year ($750 + $720) while $12,000 carries forward to shelter future gains.
Caveats worth knowing
- Short-term vs long-term netting. Short-term losses offset short-term gains first, long-term against long-term, then the pools net. Harvesting short-term losses is the most valuable kind — those gains face ordinary rates.
- State taxes ignored. This calculator models federal tax only; states like California tax gains as ordinary income, which changes the math.
- Don't harvest in retirement accounts. There's no taxable gain to offset inside an IRA or 401(k) — and a repurchase there can still trigger the wash-sale rule against your taxable account.
- Not tax advice. Tax law is intricate and personal. Run harvests past a tax professional before executing.