Case study

When switching pays you: the math of tax-loss harvesting

ChurnAlpha · October 12, 2026 · 6 min read

Most of this site is about what switching costs you. This one is about when switching pays you. If a fund in your taxable account is worth less than you paid for it, selling it can put money back in your pocket.

It's called tax-loss harvesting, and it's one of the few free lunches in investing. Well, mostly free. There's a catch, and it's worth seeing it in actual numbers.

The setup

What the loss is worth

A realized capital loss gets used in a specific order:

  1. It first cancels out other capital gains you realized this year. Here, $5,000 of the loss wipes out your $5,000 gain, saving $750 at 15%.
  2. Up to $3,000 a year of what's left can be deducted against ordinary income, like your salary. At 24%, that saves $720 a year.
  3. Anything beyond that carries forward to future years, indefinitely.

So the remaining $15,000 gets used at $3,000 a year for five years. Total tax saved: $4,350, spread over five years, and every dollar of it can be invested.

The catch

When you sell at $100,000 and buy the new fund, your cost basis resets to $100,000. Before, it was $120,000. That lower basis means a bigger taxable gain when you eventually sell the new fund.

In this example, after 20 years the switch path pays $44,662 of tax at the end, versus $40,045 on the keep path. So part of what you saved comes back later.

Why it's still a good deal:

Years heldHarvesting leaves you ahead by
1+$1,573
5+$2,312
10+$4,188
20+$10,509

The 20-year hurdle here is 6.83%, below the 7% the old fund earns. The tax savings are worth enough that the replacement fund could earn about 0.17 points a year less and you'd still break even.

What changes the value

The wash-sale rule

If you buy the same or a "substantially identical" investment within 30 days before or after selling at a loss, the IRS disallows the loss. That includes purchases in your IRA and automatic dividend reinvestments. This is why harvesters swap into a similar fund, such as a different index covering a similar market, rather than buying back the same one. The IRS hasn't precisely defined "substantially identical," so this is a good question for a tax professional.

Try it with your numbers

The free calculator handles the basic case: it applies a realized loss against your final gain. The yearly deductions and offsets shown here come from the full engine, which is launching soon.

Run this example in the calculator

Figures assume flat 15% capital gains and 24% ordinary rates, the $3,000 annual limit, tax savings reinvested in the same fund, identical returns for both funds, and both paths fully sold at the end of the period except in the step-up case. These are illustrations of the arithmetic, not tax advice or a recommendation. Check your own situation with a tax professional.

More case studies →