Tax-Loss Harvesting: Turning Red Positions Into Real Savings (Without Tripping the Wash-Sale Rule)
Tax-loss harvesting is the practice of selling an investment that's down to lock in the loss for tax purposes — using it to offset capital gains and even a slice of your ordinary income — while keeping your portfolio essentially intact. Done right, it's one of the few reliable ways to extract value from a down market. Done carelessly, the wash-sale rule quietly cancels the whole benefit. Here's how to capture the savings without tripping the wire.
What a harvested loss is worth
Realized losses work in a specific order:
- They first offset realized capital gains — short-term losses against short-term gains (taxed at high ordinary rates), long-term against long-term.
- If losses exceed gains, up to $3,000 per year offsets your ordinary income (wages, interest) — the most valuable kind to shield.
- Anything left over carries forward indefinitely to future years. Losses never expire while you're alive.
For a high earner offsetting short-term gains or ordinary income, a harvested loss can be worth 35–40+ cents on the dollar in federal tax alone.
The keep-your-exposure trick
The point isn't to leave the market — it's to bank the loss while staying invested. Sell the losing fund and immediately buy a similar but not "substantially identical" one (for example, swap one broad S&P 500 fund for a total-market fund from a different provider). You keep nearly identical market exposure, and you've harvested the loss. After 31 days, you can swap back if you wish.
The wash-sale rule — and why it's sneakier than you think
The catch: if you buy back the same or "substantially identical" security within 30 days before or after the sale (a 61-day window in total), the IRS disallows the loss. Most investors know that much. Here's the Aha — the rule reaches places people forget:
- Across all your accounts: selling in your taxable account and rebuying in your IRA still triggers a wash sale — and there, the loss is lost permanently, with no basis adjustment to recover it.
- Your spouse's accounts count too. A purchase in your spouse's account inside the window can void your loss.
- Automatic reinvestment of dividends, or a recurring 401(k)/auto-invest buy, can accidentally trigger it.
So before harvesting, turn off dividend reinvestment on the position, and make sure no automated purchase of the same security is scheduled across any household account during the window.
A worked harvest
Concrete numbers show the payoff. Dana, in the 35% bracket, sold a startup-stock position earlier in the year for a $40,000 short-term gain — taxable at her full ordinary rate. Her index funds, meanwhile, are down $25,000 on paper after a rough quarter. She sells the losing funds, immediately buys a similar (but not substantially identical) total-market fund to stay invested, and banks the $25,000 loss.
That loss offsets $25,000 of her short-term gain, shrinking the taxable gain to $15,000 and saving roughly $8,750 in federal tax — all while her market exposure never changed. Had she harvested $43,000 of losses instead, she would have wiped out the whole gain, offset an additional $3,000 against her wages, and carried the rest forward to next year. The market handed her a temporary dip; she turned it into a permanent tax saving.
The mirror image: tax-gain harvesting
Harvesting is not only for losses. In a low-income year — early retirement, a sabbatical, a business-loss year — you can do the opposite and deliberately realize long-term gains inside the 0% capital-gains bracket, then immediately rebuy. You pay no tax, yet you reset your cost basis higher, shrinking the taxable gain on a future sale. There is no wash-sale rule on gains, so you can sell and rebuy the same security the same day. Loss harvesting and gain harvesting are two sides of the same idea: control when you recognize, and you control the rate.
Key takeaways
- Harvested losses offset capital gains, then up to $3,000 of ordinary income, then carry forward indefinitely.
- Stay invested by swapping into a similar — but not substantially identical — fund.
- The wash-sale rule spans your IRA and your spouse's accounts; turn off automatic reinvestment before you harvest.
When harvesting is most powerful
- Volatile markets create temporary dips you can harvest even in a year that ends up positive.
- High-income years — the savings scale with your marginal rate.
- Alongside a big gain — harvest deliberately to offset a property sale, RSU sale, or business windfall.
- Be mindful at year-end: trades must settle within the calendar year to count, so don't wait until December 31.
- Don't let the tax tail wag the dog. Never sell a position you would otherwise keep purely to book a loss — harvesting lowers your basis, so it defers tax rather than erasing it unless a future low bracket or a step-up at death finishes the job.
One caution: harvesting lowers your cost basis, so you may pay more gains tax later. The win comes from deferral and rate arbitrage — saving at a high rate now, ideally paying at a lower long-term rate (or never, via a step-up at death) later.
Frequently asked questions
- How much can tax-loss harvesting save me?
- Harvested losses first offset realized capital gains, then up to $3,000 per year of ordinary income, with the remainder carried forward indefinitely. For a high earner offsetting short-term gains or wages, that can be worth 35–40%+ of the loss in federal tax.
- What triggers a wash sale?
- Buying the same or a substantially identical security within 30 days before or after selling it at a loss. The rule spans all of your accounts — including your IRA and your spouse’s accounts — and can be triggered accidentally by dividend reinvestment or automatic purchases.
Put this into action with Dversify
Upload your documents, model scenarios, and get clear, report-driven insights.
Find harvestable losses with Dversify →This content is for general educational purposes only and is not personalized investment, tax, or legal advice. Figures and rules referenced may change; verify against primary sources and consult a qualified professional about your situation.