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.
Realized losses work in a specific order:
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 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 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:
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.
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.
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.
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.
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.
Long-term gains get their own gentle brackets — including a real 0% rate — but a 3.8% stealth surtax lifts the top to 23.8%. Holding period and timing decide which you pay.