pickuma.
Finance

Tax-Loss Harvesting: What It Does, What It Doesn't, and the Wash-Sale Trap

How tax-loss harvesting works in a taxable brokerage account, why it defers rather than eliminates tax, and the wash-sale rule that quietly cancels the benefit.

O
Owen
Engineer · Investor
Verify profile ↗
6 min read

Tax-loss harvesting is one of those techniques that sounds like free money and turns out to be something more modest and more conditional. The pitch is simple: sell an investment that has dropped, book the loss to reduce your tax bill, and stay invested by buying something similar. The mechanics are real, but two facts get glossed over in the pitch — the benefit is mostly a deferral, not a discount, and a rule called the wash-sale rule can quietly undo the whole thing. This is a structural walkthrough, not tax advice; rules vary by country and change over time.

What Tax-Loss Harvesting Actually Is

In a taxable brokerage account, you owe tax on realized capital gains — gains from positions you actually sold. A position that has fallen in value carries an unrealized loss, which does nothing for you until you sell and realize it.

Tax-loss harvesting is the deliberate act of realizing a loss. Suppose you bought a broad index fund and it is now worth less than you paid. You sell it, realizing a capital loss. That loss first offsets any realized capital gains you have elsewhere. If losses exceed gains, many tax systems let you deduct a limited amount against ordinary income, and carry the remainder forward to future years.

The key move is what you do next. You do not want to leave the market, so you immediately buy a similar but not identical investment — a different index fund tracking a comparable but distinct index. Your money stays invested with roughly the same exposure, and you are holding a realized loss you can apply against taxes.

The Wash-Sale Rule: The Trap That Undoes It

Here is the part the pitch skips. Tax authorities anticipated the obvious abuse: sell at a loss for the tax benefit, then rebuy the identical security a moment later, ending up in exactly the same position but with a “free” deduction. The wash-sale rule exists to block this.

In broad terms, if you sell a security at a loss and buy the same or a substantially identical security within a defined window around the sale, the loss is disallowed for that tax year. In the United States that window is 30 days before and 30 days after the sale — a 61-day span in total. The disallowed loss is not lost forever; it is added to the cost basis of the replacement shares. But the immediate benefit you were harvesting evaporates.

This is why the “buy something similar” step is not optional and not trivial. Buy a fund tracking a meaningfully different index and you are generally fine. Buy the identical fund back the next day and the loss is disallowed. The grey zone — two funds tracking indexes that overlap heavily — is exactly where “substantially identical” gets argued, and the term is not defined with engineering precision.

Tax Deferral Is Not Tax Elimination

The most common misunderstanding is treating the harvested loss as a permanent saving. Usually it is not.

When you sell the original fund and buy the replacement, the replacement carries a lower cost basis — either the new purchase price, or the original basis plus a disallowed loss. A lower basis means a larger taxable gain when you eventually sell the replacement. The tax you avoided today reappears later, when you finally realize the position.

So the honest framing is: tax-loss harvesting mostly defers tax, not eliminates it. Why is a deferral still worth anything? Two reasons. First, money kept invested now rather than paid in tax can compound in the meantime — the time value of money. Second, the tax rate that applies when the deferred gain is finally realized may be lower than today’s — for instance, if it is realized in a lower-income year, or converted from a short-term to a long-term rate, or steps up at inheritance under some tax systems.

There is also a genuine, non-deferral benefit: a loss that offsets a short-term gain taxed at a high ordinary rate, or that offsets up to the annual limit of ordinary income, can convert into a future long-term gain taxed at a lower rate. That rate arbitrage is a real saving rather than a pure deferral. But it is a smaller and more conditional number than “I saved my whole tax bill.”

When It’s Worth the Effort

Harvesting has real costs: transaction friction, the bookkeeping of tracking lots and basis, the risk of a wash-sale mistake, and the constraint it places on your portfolio. It is most likely to be worth it when several conditions line up.

It helps when you actually have gains — or ordinary income within the deductible limit — to offset, since a carried-forward loss with nothing to apply it to is just a deferred IOU. It helps more at higher marginal tax rates, because the loss is worth your rate. It helps when markets are volatile enough to produce real losses to harvest, which tends to mean early in a holding period rather than after years of growth. And it helps when you can find a clean, genuinely non-identical replacement so your market exposure is uninterrupted.

It is usually not worth contorting your portfolio for. Selling a position you would otherwise keep, or buying a worse fund purely to dodge the wash-sale rule, can cost more than the tax it saves.

Treat tax-loss harvesting as a modest, conditional optimization — a few basis points of long-run after-tax return for investors in the right situation — not a strategy that changes the outcome of your investing. The asset allocation and the contribution rate decide the result. Harvesting is a refinement at the edges, and the wash-sale rule means a careless refinement can subtract value instead of adding it. Specific rules, windows, and limits depend entirely on your jurisdiction and your situation, which is exactly when a tax professional earns their fee.

FAQ

Does tax-loss harvesting make sense if I have no capital gains this year? +
It can still help if your tax system allows a limited deduction of net losses against ordinary income, and lets you carry the unused remainder forward. But a carried-forward loss only becomes valuable when there is a future gain or deductible income to apply it against. If you expect neither, the benefit is purely a bet on your future tax situation, and the effort may not be justified.
How do I avoid a wash sale while staying invested? +
Sell the losing fund and buy a replacement that tracks a genuinely different index — different enough that it would not be considered substantially identical. Then pause dividend reinvestment and any automatic purchases of the original security across every account, including retirement accounts, for the full window. After the window closes you can switch back if you want, though each switch is its own taxable event.
Is this the same in every country? +
No. The existence of a wash-sale rule, the length of its window, the deductibility of losses against income, the annual limits, and the treatment of carried-forward losses all vary by jurisdiction and change over time. This article describes the general structure and uses the United States rule as a concrete example. Confirm the specifics for your own country with a qualified tax professional before acting.

Related reading

See all finance articles →

Get the best tools, weekly

One email every Friday. No spam, unsubscribe anytime.

O
Owen
Engineer · Investor
Verify profile ↗