Tax-Loss Harvesting Explained: How It Works, the Wash-Sale Rule, and the Real Math
Tax-loss harvesting (TLH) is the strategy of selling an investment that's down to bank the loss as a tax deduction, then immediately buying a similar — but not identical — investment to stay in the market. Done correctly, it converts a paper loss into real tax savings of $1,000-$3,000+ per year on a typical taxable portfolio. Done incorrectly, the IRS's wash-sale rule disallows the deduction. Here's the full mechanics and the math.
- What Tax-Loss Harvesting Actually Does
- A Concrete Example: $10,000 Loss, $2,400 Saved
- The Wash-Sale Rule (the Big Trap)
- What "Substantially Identical" Means in Practice
- The $3,000 Ordinary Income Offset and Carryforward
- When TLH Is Worth Doing — and When It Is Not
- Robo-Advisor TLH vs Manual
- Step-by-Step: How to Harvest a Loss
1. What Tax-Loss Harvesting Actually Does
Three things happen mechanically when you harvest a loss:
- You sell a security that's currently below your purchase price, realizing the capital loss.
- You buy a similar but not substantially identical security with the proceeds, maintaining your market exposure.
- The realized loss reduces your taxable income — first offsetting capital gains, then up to $3,000 of ordinary income, with the remainder carrying forward to future tax years.
The strategy is only available in taxable brokerage accounts. Inside 401(k)s, IRAs, Roth IRAs, and HSAs, the tax wrapper makes individual gains and losses irrelevant.
2. A Concrete Example: $10,000 Loss, $2,400 Saved
You hold $100,000 of VTI (Vanguard Total Stock Market ETF) in a taxable brokerage account, bought at $250/share. The market drops 10% — VTI is now $225, and your position is worth $90,000. You have an unrealized loss of $10,000.
Without TLH: you do nothing. The loss exists on paper but provides no tax benefit. When VTI eventually recovers to $260, you'll have an unrealized gain of $4,000 — and someday a tax bill on it.
With TLH:
- Sell all VTI for $90,000, realizing a $10,000 long-term capital loss.
- Immediately buy $90,000 of ITOT (iShares Core S&P Total US Stock — different index, different provider). Your market exposure is essentially the same.
- At year-end, your $10,000 loss offsets $10,000 of capital gains (or up to $3,000 of ordinary income).
Tax saving at a 24% marginal bracket: $10,000 × 24% = $2,400. That's real money returned to you — even though your investment thesis didn't change.
3. The Wash-Sale Rule (the Big Trap)
IRS Section 1091: if you buy a "substantially identical" security within 30 days before or 30 days after a sale at a loss, the IRS disallows the loss. The 61-day window catches most beginners.
What gets disallowed:
- Sell VTI on November 1, buy VTI on November 25 → loss disallowed.
- Sell VTI on November 1, your spouse buys VTI on November 15 → loss disallowed.
- Sell VTI in your taxable account, buy VTI in your IRA same day → loss disallowed AND no basis adjustment to recover later. This is the worst-case scenario — you lose the deduction and the basis is permanently gone.
- Sell VTI on October 5, dividend reinvestment plan (DRIP) automatically buys VTI on October 15 → wash sale on the small DRIP amount.
The rule applies across accounts, including spouse's accounts and IRAs. Turn off automatic dividend reinvestment in the security you're harvesting, or you'll trigger small wash sales on subsequent dividends.
When wash-sale is triggered: the disallowed loss is added to the cost basis of the replacement shares. So you don't lose the deduction permanently — it's just deferred until you sell those replacement shares (and those replacement shares haven't triggered another wash sale).
4. What "Substantially Identical" Means in Practice
The IRS has never published a formal test. The consensus from tax professionals:
| Sell | Replacement | Risk |
|---|---|---|
| VTI | VOO | Safe — different index |
| VTI | ITOT | Safe — different provider, different methodology |
| VOO | IVV | Risky — both track S&P 500 |
| VTI | VXUS | Safe — totally different exposure |
| VOO | SCHX | Generally considered safe — different index |
| Apple stock | Apple bonds | Safe — different security types |
| VTSAX | VTI | Generally safe — share classes of the same fund (debated) |
The safest TLH pairs swap between different indexes (S&P 500 ↔ Total Market). Swapping between two ETFs that track the exact same index (VOO ↔ IVV) is in a gray zone the IRS has never explicitly tested but most advisors avoid.
5. The $3,000 Ordinary Income Offset and Carryforward
Capital losses are processed in this order:
- Same-type netting: short-term losses offset short-term gains; long-term losses offset long-term gains.
- Cross-type netting: any remaining loss offsets the opposite-type gain.
- Ordinary income: up to $3,000 of remaining loss reduces ordinary income (W-2 wages, freelance income).
- Carryforward: anything beyond $3,000 carries forward indefinitely to future tax years.
Example: you harvest $25,000 of long-term losses in 2026. You have $5,000 of long-term gains and $4,000 of short-term gains.
- $5,000 of LT loss offsets $5,000 of LT gains → net zero
- $4,000 of LT loss offsets $4,000 of ST gains (cross-type) → net zero
- $3,000 reduces ordinary income
- $13,000 carries forward to 2027 and beyond
The carryforward never expires. A $50,000 loss bank from a 2026 bear market can offset gains in 2030, 2035, or any future year — until your spouse passes away (filing status changes the carryforward rules).
6. When TLH Is Worth Doing — and When It Is Not
TLH is worth doing when:
- You have a taxable brokerage account. The strategy doesn't apply to retirement accounts.
- You hold appreciable losses — at least a few thousand dollars worth. Harvesting $200 isn't worth the trade friction.
- You're in a high tax bracket today and might be in a lower one later. The deferral is most valuable when today's rate is higher than the future rate.
- You have realized gains to offset. Recently sold property, stock options vesting, RSUs.
TLH is NOT worth doing when:
- You're in the 0% long-term capital gains bracket (single income under ~$48,000, married under ~$96,000). You owe no tax on long-term gains anyway, so deferring loses you nothing — and reduces your future basis.
- The position is small — bid-ask spread and trading friction outweigh the deduction.
- You're close to selling for a major life event (down payment, retirement). Harvesting reduces basis, increasing the eventual gain.
7. Robo-Advisor TLH vs Manual
Wealthfront, Betterment, and Schwab Intelligent Portfolios offer automated daily tax-loss harvesting. The robo monitors all your holdings every day, harvesting losses whenever it finds them and swapping into pre-defined replacement securities to avoid wash sales.
| Approach | Frequency | Cost | Best for |
|---|---|---|---|
| Manual | 1-2x/year | $0 | Smaller portfolios, simple holdings |
| Robo (Wealthfront, Betterment) | Daily | 0.25% AUM | Larger portfolios ($250k+) with capacity to use larger losses |
| Hybrid (own at Vanguard, harvest manually) | When markets drop 5%+ | $0 | Most DIY investors |
Wealthfront publishes data showing their TLH adds 1-2% in after-tax returns annually for high-bracket clients. The fee is 0.25% — so net benefit is 0.75-1.75% per year. On portfolios under $100,000, manual harvesting captures most of the benefit at zero cost. Above $250,000 in a high tax bracket, robo TLH can pay for itself many times over.
8. Step-by-Step: How to Harvest a Loss
For a typical DIY investor at Vanguard, Fidelity, or Schwab:
- Identify a losing position in your taxable account — current value below cost basis.
- Confirm no wash-sale risk: you haven't bought the same security in the past 30 days, and won't in the next 30. Turn off DRIP if it's on for that security.
- Pick a replacement security. Different index, different provider. Sample swaps: VTI ↔ ITOT, VOO ↔ SCHX, VXUS ↔ IXUS, BND ↔ AGG.
- Sell the losing position. Specify lots if your brokerage allows it — harvest the highest-cost-basis lots first to maximize the loss.
- Immediately buy the replacement with the proceeds. Same dollar amount; same trading day if possible to minimize market drift.
- Document the basis adjustment. The new replacement shares have basis equal to your purchase price (not the original basis from the harvested position).
- Wait at least 31 days before swapping back — or just hold the replacement permanently.
Most major brokerages now have "tax-loss harvest" tools that surface eligible positions automatically and prevent wash-sale violations. Worth using even if you're harvesting manually.
Frequently Asked Questions
What is tax-loss harvesting in plain English?
Tax-loss harvesting is selling an investment that has dropped below your purchase price, banking the loss as a tax deduction, and then buying a similar (but not "substantially identical") investment to maintain your market exposure. The realized loss can offset realized capital gains in the same year, and up to $3,000 of ordinary income (like wages). Any remaining loss carries forward to future tax years indefinitely. The strategy converts a paper loss into a real tax saving without permanently exiting the market.
How does tax-loss harvesting actually save me money?
It defers tax. By harvesting a $10,000 loss this year, you reduce your current taxable income by $10,000 (subject to the $3,000 ordinary-income cap and offsetting against gains). At a 24% federal bracket, that's ~$2,400 in current-year tax savings. The catch: you reduce the cost basis of the replacement investment, so when you eventually sell it, you owe capital gains tax on the lower basis. The benefit is the time value of that deferred tax — and possibly arbitrage between today's ordinary-income rate and tomorrow's long-term capital gains rate.
What is the wash-sale rule?
The wash-sale rule disallows a tax loss if you buy a "substantially identical" security within 30 days before or after the sale (a 61-day window total). If you sell VTI on November 1 and buy VTI again on November 25, the IRS denies the loss — it adds the disallowed loss to the basis of the replacement shares. The rule applies across accounts, including your spouse's and IRAs. Buying VOO (S&P 500) instead of VTI (total US market) is generally considered different enough to pass.
What does "substantially identical" mean?
The IRS has never published a formal definition, but the consensus from tax professionals is: same fund (sold and re-bought) is identical; different ETFs tracking the same exact index might be considered identical (untested in court); different funds tracking different indexes are clearly not identical. Safe practice: VTI and VOO (different indexes — total market vs S&P 500), VTI and ITOT (similar but different methodology and provider), VXUS and IXUS (different providers, similar exposure). Avoid swapping VOO for IVV — both track the S&P 500.
What is the $3,000 deduction limit?
In any tax year, capital losses first offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income (wages, salary, freelance). Anything beyond $3,000 carries forward to future tax years and offsets future gains/income with no expiration. So a $20,000 harvested loss with $5,000 of capital gains: $5,000 offsets the gains, $3,000 reduces ordinary income, $12,000 carries forward.
Should I do tax-loss harvesting myself or use a robo-advisor?
For most investors with simple portfolios, manual TLH is straightforward — you do it once or twice a year when the market drops. Robo-advisors like Wealthfront and Betterment offer automated daily TLH, which catches more loss opportunities but charges a 0.25%+ management fee. The math: if you have $100,000 in a taxable account and the robo harvests $5,000 more losses per year than you would manually, the tax saving (~$1,200) might exceed the fee ($250). Above $250,000 the math usually favors the robo; below that, manual TLH is fine.
Does tax-loss harvesting matter in retirement accounts?
No. TLH only applies to taxable brokerage accounts. Inside a 401(k), IRA, or Roth IRA, all gains and losses are wrapped in the tax-deferred or tax-free shell — losses are not deductible and gains are not taxed (or are taxed only on withdrawal). Don't bother trying to harvest losses inside retirement accounts; the mechanism does nothing.
Free tool · 30 seconds · No signup
Spot every taxable transaction in seconds
Upload a year of statements to see capital gains, dividend income, and brokerage transactions categorized for tax season — no spreadsheets.

