Tax-loss harvesting (TLH) is, at its core, this idea:

When the market gives you a loss on a position, you can realize that loss by selling — converting paper red ink into a real tax deduction — without giving up your investment thesis, by buying a similar-but-not-identical replacement. The portfolio looks roughly the same; your tax bill goes down.

That's it. Everything else is mechanics, rules, and edge cases.

The basic mechanic

Imagine you own 100 shares of VOO at $400. The market dips. VOO is now $360. You're down $4,000 on paper.

If you do nothing, that loss is invisible to the IRS — you only get tax credit for losses you realize by selling. You're also still bullish on the S&P 500. So:

  1. You sell 100 VOO for $36,000.
  2. You immediately buy 100 SPY (or IVV) for $36,000.
  3. You now have a $4,000 realized capital loss to use on your taxes, and your portfolio is still 100% S&P 500.

If you're in the 32% federal bracket, that $4,000 loss is worth roughly $1,280 of real tax savings this year. Or, if your losses exceed your gains, you can deduct up to $3,000 against ordinary income annually — and carry the rest forward indefinitely.

The wash-sale rule

The IRS wrote a rule called §1091 to prevent the obvious abuse: sell at a loss, buy back the same security a minute later, claim the loss. They call this a "wash sale" and disallow the loss when:

  • You sell a security at a loss, AND
  • Within 30 days before or after the sale, you buy a "substantially identical" security.

That's why our example used VOOSPY instead of VOOVOO. Two different tickers tracking the same index typically aren't "substantially identical" by IRS definition. (There's nuance — see the upcoming wash-sale-rule deep dive — but as a working rule of thumb, swapping to a different fund family with the same exposure works.)

Where direct indexing changes the game

Owning one S&P 500 ETF gives you exactly one position to harvest. When the index is up, you get nothing — even though half the underlying stocks are probably down. Direct indexing means owning the underlying 60–80 stocks of an index directly. Your overall return tracks the index closely, but now you have 60 to 80 individual positions to harvest from.

In a typical year:

  • The S&P 500 might be up 10%.
  • But within it, ~30% of stocks are down at least 5% at some point during the year.
  • And ~15% are down at least 15%.

So even in a green year for the index, direct indexing lets you harvest losses on the names that happened to be down. That's the core mechanical advantage. Compounded over years, the captured tax savings are real money.

Try the math yourself

Here's an interactive simulator. Drag the sliders to set portfolio size, expected annual return, intra-year volatility (how spread out the individual-stock movements are), and your marginal tax bracket. The chart shows how much TLH benefit accumulates over 20 years versus a no-TLH baseline.

Year-1 tax savings
$0
10-year cumulative
$0
20-year cumulative
$0

Educational simulation. Realized losses assume an annual harvest rate that scales with volatility (≈ vol × 1.5 of portfolio per year, capped at 30%). Actual results vary widely — wash-sale frictions, fund-availability, and tax-rate changes all matter. This isn't projecting your returns.

Carryforwards: the long-tail benefit

One thing worth understanding: TLH benefits aren't just "pay less tax this year." Capital losses that exceed your gains can be carried forward indefinitely. So even in a year where you didn't sell anything for a gain, those harvested losses sit in the bank, waiting to offset future gains — for example, the eventual sale of a winning position 10 years from now, or the rebalance out of a concentrated stock position when you finally diversify.

That's why the simulator above shows compounding cumulative savings even in years where the market is up: your carryforward bucket keeps absorbing losses and deploying them strategically over time.

What can go wrong

  • Wash sales. Naive harvest-and-rebuy in the same ticker disallows the loss. Software that doesn't track this will quietly cost you the tax savings AND adjust your basis in the replacement, which can hurt later. (Our software tracks it; see the upcoming wash-sale-rule deep dive.)
  • Trading costs. Frequent harvesting in a 60–80 stock portfolio creates a lot of trades. With commission-free brokers (E*TRADE, Schwab, Fidelity, IBKR all offer this for stocks) this is mostly fine — the friction is bid-ask spreads on smaller names, which we account for in trade timing.
  • Tax-rate changes. If your bracket goes UP in retirement (unusual but possible), realized losses today are deducting against a lower rate than they could have. For most people this is a feature — losses now, gains later — but worth modeling.

How HarvestEngine does it

The whole point of HarvestEngine is doing this automatically and correctly:

  • Designs your direct-index portfolio (60–80 names tracking your chosen index).
  • Scans daily for harvest opportunities below a threshold you set ($100, $500, $1,000 — your call).
  • Picks a wash-sale-safe replacement security from the same sector with similar factor exposure.
  • Shows you the proposed sells + buys with tax math attached. You approve.
  • Tracks every cooldown, every realized gain, every carryforward — exports to your CPA.

You stay in control. We stay software. Both of those matter.

Try it on a paper portfolio