How Tax-Loss Harvesting Works

Every investment position in your taxable brokerage account has an unrealised gain or loss — the difference between what you paid (cost basis) and what it's worth today. When you sell a losing position, the unrealised loss becomes a realised loss — a loss you can use to reduce your tax bill.

The harvesting strategy: identify positions with unrealised losses, sell them before year-end to realise the loss, and immediately reinvest in a similar (but not identical) investment to maintain your market exposure. Your portfolio's economic position is roughly unchanged; your tax position has improved.

Example: You have $20,000 in capital gains from selling appreciated stock this year. You also have a $15,000 unrealised loss in an ETF. Selling the ETF harvests $15,000 in losses, reducing your net taxable gain to $5,000. At a 15% long-term capital gains rate, you save $2,250 in taxes. You reinvest the proceeds immediately in a similar-but-different ETF to maintain exposure.

The Wash-Sale Rule

The IRS wash-sale rule prevents "selling for a loss and immediately buying back the same investment." Specifically: if you sell a security at a loss and buy a "substantially identical" security within 30 days before or after the sale (a 61-day window), the loss is disallowed. The disallowed loss is added to the cost basis of the replacement security — it's not permanently lost, just deferred.

What triggers a wash sale: Selling Fund A and buying Fund A back within 30 days. Selling Fund A and buying an identical fund from a different provider (e.g., Vanguard S&P 500 ETF → iShares S&P 500 ETF — these are substantially identical and likely trigger wash-sale rules). Selling in a taxable account and buying the same security in an IRA within 30 days.

What doesn't trigger a wash sale: Selling a specific company's stock and buying a different company's stock. Selling a broad market ETF (e.g., VTI — Total Market) and buying a different-index ETF (e.g., VEU — International) — these track different indices and are not substantially identical. Selling a S&P 500 ETF and buying a total stock market ETF — debated but generally considered safe.

How Losses Offset Gains

Capital losses offset gains in a specific order:

  1. Long-term capital losses offset long-term capital gains first
  2. Short-term capital losses offset short-term capital gains first
  3. Excess of either type can offset the other type
  4. Net capital losses (after all offsets) can offset up to $3,000 of ordinary income per year
  5. Any remaining loss carries forward to future tax years indefinitely

Carrying forward losses is not wasted — the loss remains available to offset future gains or income in subsequent years. A large harvesting event in a down market year can create a loss carryforward that provides tax savings for years.

Advertisement

Step-by-Step Example

Scenario: December, you review your taxable brokerage account. You've realised $18,000 in long-term capital gains from sales earlier in the year. You also have two positions with unrealised losses:

  • International stock fund: down $12,000 from your cost basis
  • Small-cap fund: down $6,000 from your cost basis

Action: Sell both losing positions, realising $18,000 in losses. Immediately reinvest proceeds in similar funds tracking different indices.

Result: $18,000 of losses offset $18,000 of gains. Net capital gain: $0. Tax saving vs not harvesting: $18,000 × 15% (long-term rate) = $2,700. Your portfolio's market exposure is maintained through the replacement funds.

When It Makes Sense (And When It Doesn't)

Makes sense when: You have significant realised gains to offset; you're in the 15% or 20% long-term capital gains bracket; you have meaningful unrealised losses; and you can find suitable replacement investments without substantially disrupting your strategy.

Doesn't make sense when: Your investments are primarily in tax-advantaged accounts (401k, IRA) — gains there aren't taxed annually anyway; you're in the 0% capital gains bracket (taxable income under $48,350 single / $96,700 married) — no tax to save; the transaction costs exceed the tax savings; or you'd have to violate the wash-sale rule to reinvest in your preferred fund.

Robo-advisors: Many robo-advisors (Betterment, Wealthfront) offer automated tax-loss harvesting — monitoring your portfolio daily for harvesting opportunities. Useful for those who don't want to manage this manually.

Tax-Loss Harvesting Globally

UK: UK investors can use a similar strategy called "Bed and ISA" or "Bed and SIPP" — sell assets in a taxable general investment account and rebuy inside an ISA or pension (where future gains are sheltered). The CGT annual allowance is £3,000 (2026/27) — realising gains up to this amount each year tax-free is a standard optimisation. Losses can be offset against gains in the same year and carried forward. HMRC at gov.uk/capital-gains-tax.

India: Tax-loss harvesting applies to Indian equity investments — short-term capital losses (held under 12 months) can offset short-term gains; long-term losses (on listed equities above ₹1 lakh) can offset long-term gains. Losses carry forward for 8 years. The LTCG exemption of ₹1 lakh/year on listed equity means optimising gains below this threshold each year is standard tax planning. Income Tax India at incometaxindia.gov.in.

Canada: Canada has no wash-sale rule equivalent — you can immediately repurchase the same security after harvesting a loss. This makes tax-loss harvesting operationally simpler. Capital losses offset capital gains (only 50% inclusion rate). Unused losses carry back 3 years or forward indefinitely. Superficial loss rules (similar to wash-sale) apply to affiliated persons — be aware if a spouse or corporation buys the same security within 30 days. CRA at canada.ca.