Compound Start learning free

Guides · Tax strategy & estate

Tax-Loss Harvesting: Turning Losses into Tax Savings

A position that's down is worth something before you sell it — but only in a taxable account, only if you don't buy it straight back, and mostly as a loan from the IRS rather than a gift.

Sources last verified 2026-07-21

The rules apply in a fixed order

Selling an investment below what you paid realises a capital loss, and that loss is applied in a sequence you don't get to choose.

First it nets against your realised capital gains, dollar for dollar. Whatever survives that netting can then offset up to $3,000 of ordinary income — salary — in a single year. Anything still left carries forward indefinitely, to be used the same way in future years.

Two conditions are easy to miss. This only works in a taxable brokerage account: inside a 401(k) or IRA there are no capital gains to offset and no deduction to claim, so a loss there is simply a loss. And the loss has to be realised — a position that is merely down does nothing for you until you sell it.

The sequence

Gains first, then up to $3,000 of salary, then carry the rest forward. You don't get to reorder it.

The wash-sale rule and the window nobody counts correctly

If you buy a substantially identical security within 30 days before or 30 days after the sale, the loss is disallowed. Counting the trade date, that's a 61-day window — and the 'before' half surprises people, because a purchase you made three weeks before deciding to harvest can invalidate the whole thing.

The loss isn't destroyed. It's added to the cost basis of the replacement shares and recovered when you eventually sell those, so the effect is a delay rather than a forfeit.

The rule also reaches across your accounts, including your IRA and in practice your spouse's. Selling at a loss in a taxable account while an automatic contribution buys the same fund in your IRA is the classic accidental wash sale, and the IRA version is worse — the disallowed loss can't be recovered through basis there at all.

Mostly a deferral, not a saving

Harvesting a loss lowers your tax this year, and it lowers your cost basis by the same amount. When you eventually sell the replacement holding, the gain is larger by exactly what you harvested.

So the benefit is usually timing rather than magnitude: you keep money now and pay later, which is genuinely worth something because that money compounds in the meantime. Calling it 'free money' overstates it considerably.

It becomes a real saving in two cases. Losses offsetting ordinary income are deducted at your marginal rate but resurface later as capital gains, which are taxed lower — a rate arbitrage. And unused carryforwards die with you, while heirs receive a stepped-up basis, so gains deferred long enough may never be taxed at all.

The takeaway

Realised losses offset realised gains dollar-for-dollar, then up to $3,000 of ordinary income a year, with the rest carrying forward forever. Buying back within 61 days disallows the loss.

Educational content only — not personalized financial advice.

Learn this properly, five minutes a day

This guide is one lesson from Compound's 119-lesson course, with practice questions and a $10,000 paper-trading portfolio.

Start learning free

Sources