What Is Tax-Loss Harvesting? A Practical Guide
Tax-loss harvesting sells losing investments to offset capital gains and up to $3,000 of ordinary income each year, then reinvests the proceeds.
Tax-loss harvesting is the practice of selling an investment at a loss on purpose, so that the loss can offset capital gains — and, within limits, ordinary income — on your tax return. The proceeds are then reinvested in a similar (but not “substantially identical”) asset, so the portfolio’s overall exposure barely changes while the tax bill drops.
It sounds like a strange thing to do — deliberately booking a loss. But a loss you were going to hold through anyway is worth more realized than unrealized, because a realized loss is a tax asset you can spend today.
How it works
Every taxable brokerage account accumulates a mix of winners and losers over time. Say you hold shares of a fund that’s down 12% since you bought it, alongside other positions that are up. You can sell the losing position, lock in the loss, and immediately buy something similar — a different ETF tracking a comparable index, for instance — so your money stays invested in roughly the same market exposure.
The realized loss then flows through your tax return:
- It first offsets realized capital gains, dollar for dollar, from other sales that year.
- If losses exceed gains, up to $3,000 of the excess can offset ordinary income (wages, interest, etc.) per year for individual filers.
- Anything left over carries forward indefinitely to future tax years, offsetting future gains or income until it’s used up.
This only applies in taxable brokerage accounts. Retirement accounts like a 401(k) or an IRA — whether traditional or Roth — aren’t taxed on individual trades, so there’s no loss to harvest inside them.
The wash-sale rule
The obvious loophole — sell a losing position, immediately buy it right back, keep the exact same portfolio, and claim the tax loss — is closed by the wash-sale rule. If you sell a security at a loss and buy a “substantially identical” security within 30 days before or after the sale, the loss is disallowed for tax purposes. Instead, it’s added to the cost basis of the replacement shares, deferring the benefit rather than eliminating it.
“Substantially identical” isn’t precisely defined for every case, but the safe practice is straightforward:
- Selling a single stock and buying a different company in the same sector is fine.
- Selling one S&P 500 index fund and buying a different S&P 500 index fund from another provider is a gray area many brokerages and advisors treat as a wash sale, since the underlying holdings are nearly the same.
- Selling a broad-market fund and buying a fund tracking a different (but correlated) index — say, a total-market fund instead of an S&P 500 fund — is the common way to stay invested without tripping the rule.
The wash-sale rule also applies across accounts, including a spouse’s accounts and IRAs, and the 61-day window (30 days each side plus the sale date) is the detail people miss most often.
Short-term vs long-term losses
Losses are categorized the same way gains are, based on how long the position was held before the sale:
| Short-term (held ≤ 1 year) | Long-term (held > 1 year) | |
|---|---|---|
| Offsets first | Short-term gains | Long-term gains |
| Tax rate on unoffset gains | Ordinary income rates | Preferential long-term rates |
| Priority when harvesting | Higher value — offsets the more heavily taxed gains | Still valuable, but lower rate benefit |
Short-term losses offset short-term gains before long-term ones, and vice versa, with any excess in one bucket spilling over to offset the other. Because short-term gains are taxed at ordinary income rates (higher than long-term capital gains rates for most filers), harvesting a short-term loss is generally more valuable per dollar than harvesting a long-term one.
When it makes sense — and when it doesn’t
Tax-loss harvesting is most useful when:
- You have realized gains elsewhere in the same tax year that you want to offset.
- You’re rebalancing anyway and can swap into a similar-but-not-identical holding without changing your strategy.
- You’re in a higher tax bracket, where the value of offsetting ordinary income is larger.
It’s less useful, or actively counterproductive, when:
- Trading costs or bid-ask spreads eat into the benefit — less of a concern with commission-free trading, but still relevant for less liquid holdings.
- You end up drifting from your intended asset allocation chasing a tax-loss trade, or accidentally trigger a wash sale.
- Your investing timeframe is short enough that a lower cost basis on the replacement asset (from a wash sale) or on future harvested positions just defers, rather than eliminates, a larger gain later — harvesting shifts tax timing, it doesn’t make the tax disappear. Losses reduce your cost basis on the replacement, which raises the taxable gain whenever you eventually sell it. The real benefit is the time value of paying less tax now and more, potentially, later — plus fully avoiding tax on losses that offset ordinary income.
This is also why dollar-cost averaging into a position over time tends to create more harvesting opportunities than one lump-sum purchase — each tranche has its own cost basis, so some lots may be underwater even while the position overall is up. Many robo-advisors automate exactly this kind of lot-level harvesting.
The takeaway
Tax-loss harvesting turns a paper loss into an immediate tax benefit by realizing it, offsetting gains and up to $3,000 of ordinary income per year, and carrying the rest forward. The mechanics are simple; the wash-sale rule is where people trip up, so replace a sold position with something correlated but not identical, and wait at least 31 days if you want to buy back the original. It’s a timing tool, not free money — but for anyone holding a taxable portfolio with both winners and losers, it’s a low-cost way to reduce this year’s tax bill.
Tagged
Keep reading
Kurumi · · 4 min read What Is a Credit Rating? How Bond Ratings Work
A credit rating is a letter-grade opinion on how likely a borrower is to repay debt, set by agencies like S&P, Moody's, and Fitch.
Kurumi · · 4 min read What Is Arbitrage? Risk-Free Profit, Explained
Arbitrage is profiting from a price gap for the same asset in different markets, buying low and selling high nearly simultaneously with minimal risk.
Kurumi · · 4 min read What Is a DRIP? Dividend Reinvestment Plans
A DRIP automatically reinvests cash dividends into more shares, often commission-free, compounding returns without a manual trade each time.