Tax loss harvesting means deliberately selling an investment that has dropped in value to "realize" the loss, then using that loss to lower your tax bill—offsetting investment gains and up to $3,000 of ordinary income each year—while staying invested by buying something similar. With tax loss harvesting explained clearly, you'll see how a paper loss becomes a real tax benefit, the one rule (the wash-sale rule) that can wipe out the benefit if you ignore it, and when the strategy is genuinely worth the effort versus when it's overhyped. It's a useful optimization, not free money—and knowing the difference matters.
This article is educational and not personalized financial or tax advice; tax rules change and depend on your situation, so verify current rules and consider a tax professional.
What tax loss harvesting is
When an investment you own falls below what you paid for it, you have an unrealized loss—a loss on paper that has no tax effect at all. It only becomes a realized loss, one you can actually use, when you sell. Tax loss harvesting is the practice of intentionally selling those losing positions to lock in the loss, then putting that loss to work cutting your taxes.
The clever part is that you don't have to abandon your investment strategy to do it. After selling the loser, you buy a similar (but not identical—more on that below) investment, so your portfolio stays roughly where you wanted it while you bank the tax benefit. You've essentially converted a market dip into a tax asset.
One critical limit: this only works in a taxable brokerage account. Tax-advantaged retirement accounts like those covered in retirement accounts explained (401k vs Roth IRA) are already shielded from annual taxes, so there are no gains to offset and nothing to harvest inside them. Tax loss harvesting is purely a taxable-account strategy.
How it works: offsetting gains and income
The tax benefit follows a specific order set by the IRS. Realized capital losses first offset capital gains—the profits from selling winning investments. Short-term losses (on assets held a year or less) offset short-term gains first, and long-term losses offset long-term gains first, then they cross over. This matters because short-term gains are taxed at your higher ordinary-income rate while long-term gains get lower rates, so offsetting short-term gains is especially valuable.
If your losses exceed your gains, the leftover loss can offset up to $3,000 of ordinary income (like your salary) per year—$1,500 if you're married filing separately. And if you still have losses beyond that, they don't vanish: you carry them forward indefinitely to use in future tax years.
Here's a worked example. Suppose during the year you have:
- $5,000 in realized capital gains from selling a winning fund.
- An investment that's currently down $8,000.
You sell the loser, realizing an $8,000 loss. That loss first wipes out your $5,000 gain—reducing the tax on it to zero. The remaining $3,000 of loss then offsets $3,000 of your ordinary income, lowering your taxable salary. If you're in, say, the 24% bracket, that $3,000 offset alone saves roughly $720, on top of eliminating the tax on $5,000 of gains.
Now suppose your loss had been $12,000 instead. You'd offset the $5,000 gain, offset $3,000 of ordinary income, and carry forward the remaining $4,000 to use next year. Nothing is wasted.
The wash-sale rule
This is the rule that trips people up, and breaking it erases the entire benefit. The wash-sale rule says you cannot claim a loss if you buy the same—or a "substantially identical"—security within 30 days before or after the sale. That's a 61-day window centered on your sale date. Violate it and the IRS disallows the loss (it gets added to the cost basis of your replacement shares instead, deferring rather than denying it, but defeating your immediate purpose).
So how do you stay invested without triggering it? You buy something similar but not substantially identical. A common approach is swapping one broad fund for a comparable one tracking a different index or from a different provider—selling one total-market fund and buying a different S&P 500 fund, for instance. This keeps your market exposure nearly the same while staying clear of the rule. (The IRS hasn't drawn precise bright lines on "substantially identical," so cautious investors avoid obviously equivalent swaps.)
A few wash-sale traps to know: the rule applies across all your accounts, including your IRA and even your spouse's accounts, so you can't sidestep it by rebuying in a different account. Automatically reinvested dividends can accidentally trigger it, since they're purchases. And note a current gray area: cryptocurrency has historically been treated as property rather than a security, so the wash-sale rule arguably hasn't applied to it—but this has been a repeated target for legislative change, so confirm the current rules before relying on it.
When tax loss harvesting is worth it (and when it isn't)
The most important thing to understand: tax loss harvesting is tax deferral, not tax elimination. When you sell at a loss and rebuy, your new shares have a lower cost basis, which means a larger taxable gain when you eventually sell them. You're mostly pushing the tax bill into the future, not erasing it.
So where's the real value? It comes from a few places: the time value of deferring taxes (a dollar saved now is worth more than a dollar paid later), offsetting high-taxed short-term gains or ordinary income today, and the possibility that you never pay the deferred tax at all—if your heirs inherit the investments with a stepped-up basis, or you sell later in a lower tax bracket.
Harvesting is most worth it when you have a sizable taxable account, realized gains or high ordinary income to offset, a high tax bracket, and volatile or down markets that create losses to harvest. It's why those building large taxable portfolios on the path to financial independence and early retirement (FIRE) often automate it, and many robo-advisors do it for you. It's one of several levers for managing an investment tax bill, alongside the broader planning relevant in tax strategies for freelancers and other high-income situations.
It's not worth it, or even counterproductive, in several cases. For small portfolios, the benefit is trivial and not worth the hassle. If you're in the 0% long-term capital gains bracket, harvesting losses is wasteful—you'd pay no tax on those gains anyway, and you'd be better off doing the opposite (tax-gain harvesting). And chasing tiny losses with constant trading creates complexity and risk for little reward.
Common mistakes to avoid
Accidentally triggering a wash sale. The biggest error—rebuying the same security within 30 days, often through auto-reinvested dividends or a purchase in another account or your IRA. Turn off automatic reinvestment around a harvest and check all your accounts.
Harvesting inside a retirement account. Pointless—401(k)s and IRAs are already tax-sheltered, so there's nothing to harvest. Only taxable accounts qualify.
Forgetting it lowers your basis. Because harvesting is deferral, your future gain grows. Don't treat the immediate tax savings as pure profit; it's partly borrowed from later.
Harvesting in the 0% capital gains bracket. If you owe no tax on your gains, harvesting losses wastes them. Know your bracket first.
Selling and missing the rebound. If you sell a loser and don't immediately buy a similar replacement, you risk being out of the market when it recovers. The point is to harvest the loss while staying invested.
Letting the tax tail wag the dog. Never make a bad investment decision just to capture a tax break. The investment strategy comes first; tax harvesting is an optimization layered on top, not a reason to trade.
Frequently asked questions
How much can tax loss harvesting save me? It depends on your gains, income, and tax bracket. Losses first offset capital gains (eliminating tax on them), then up to $3,000 of ordinary income per year, with the rest carried forward. Offsetting $3,000 of income in a 24% bracket saves about $720, plus whatever tax you avoid on offset gains—but remember it's largely deferral, since your future gain increases.
What is the wash-sale rule? It's an IRS rule that disallows a loss if you buy the same or a "substantially identical" security within 30 days before or after selling at a loss. To harvest a loss and stay invested, you buy a similar but not identical investment instead. The rule applies across all your accounts, including IRAs and a spouse's accounts.
Can I do tax loss harvesting in my 401(k) or IRA? No. Tax loss harvesting only works in taxable brokerage accounts. Retirement accounts like 401(k)s and IRAs are already tax-advantaged, so there are no taxable gains to offset and no benefit to harvesting losses inside them.
Is tax loss harvesting worth it for a small portfolio? Usually not. The benefit scales with the size of your gains and income and your tax bracket, so for small accounts the savings are trivial relative to the effort and complexity. It's most valuable for larger taxable portfolios, higher earners, and volatile markets that generate meaningful losses.
Does tax loss harvesting eliminate my taxes or just delay them? Mostly delay. Selling at a loss and rebuying lowers your cost basis, so you'll owe more when you eventually sell the replacement. The value comes from deferring the tax, offsetting high-taxed income now, and the chance you never pay it—through a stepped-up basis at death or a lower future bracket.
The takeaway
Tax loss harvesting explained simply: you sell investments that are down to turn paper losses into real tax savings—offsetting gains and up to $3,000 of income a year—while buying something similar to stay invested and avoid the wash-sale rule. Just remember it's deferral, not free money, and it only helps in taxable accounts. Your next step is to check whether you hold any positions at a loss in a taxable brokerage account and whether you have gains or income to offset this year; if so, harvesting—carefully, outside that 30-day window—can trim your tax bill without changing your long-term plan.