Skip to main content
When to Sell

Selling for Tax-Loss Harvesting

Pomegra Learn

Selling for Tax-Loss Harvesting

Tax-loss harvesting is one of the rare opportunities to sell a losing position and feel good about it. By recognizing losses in your taxable brokerage account, you generate capital losses that offset capital gains (or up to $3,000 of ordinary income annually in the U.S.). The math is straightforward: a $10,000 loss harvested at a 20% long-term capital gains rate saves you $2,000 in taxes. Over decades, these savings compound into meaningful wealth preservation.

Quick definition: Tax-loss harvesting is the deliberate sale of securities at a loss to generate tax deductions that offset gains or income, with the intent to repurchase similar (but not identical) securities to maintain your portfolio exposure.

Key takeaways

  • Tax-loss harvesting is one of the few sell reasons that creates value rather than removing it
  • You generate a capital loss by selling a losing position, then reinvest immediately in a similar (not identical) security
  • Long-term capital losses offset long-term capital gains dollar-for-dollar; excess losses offset ordinary income up to $3,000 per year
  • Unused losses carry forward indefinitely, creating a multi-year tax benefit
  • The wash-sale rule prohibits buying the same security within 30 days of selling at a loss
  • Harvesting works best in taxable accounts; tax-advantaged accounts (401k, IRA) don't need it

The mechanics of tax-loss harvesting

Suppose you bought 100 shares of a mid-cap value fund at $50, now trading at $30. You have a $2,000 loss on the books. In a tax-loss harvesting trade, you sell those 100 shares, realizing the $2,000 loss. Immediately, you buy 100 shares of a similar (but not identical) mid-cap value fund to maintain your exposure. You've locked in a $2,000 tax loss while keeping the same market exposure.

The IRS calls the non-identical replacement the "substantially identical" test. If you sell Vanguard's mid-cap value ETF (VBR), you can't immediately buy VBR again. But you can buy iShares' mid-cap value ETF (IJH), which tracks a different index and has slightly different holdings. That substitution qualifies, and your loss stands.

When to harvest losses

Tax-loss harvesting makes sense when:

  1. You have realized capital gains. The most obvious scenario: you sold a winner earlier in the year and owe taxes on the gain. Harvesting losses offsets the gain dollar-for-dollar.

  2. You have ordinary income above $3,000. Even without gains, you can deduct up to $3,000 of losses against ordinary income each year. A $5,000 loss deducts $3,000 this year and carries forward $2,000 to next year.

  3. You hold a losing position that you were considering selling anyway. If a stock no longer meets your thesis and is underwater, harvesting the loss as you exit is "free" tax benefit.

  4. You expect higher tax rates in the future. If you believe tax rates will rise, harvesting losses now (when rates are lower) preserves optionality.

  5. You're in early retirement with low income. Years with lower income are ideal for harvesting because losses offset a larger percentage of income.

The wash-sale rule

The IRS disallows losses if you buy "substantially identical" securities within 30 days before or after the sale. This means:

  • You sell ABC stock at a loss on December 15
  • You cannot buy ABC stock between November 15 and January 15
  • But you can buy a similar company's stock (or a sector ETF) immediately and fulfill the same portfolio role

Advisors sometimes construct "swap pairs": if you own Tesla and it's underwater, you sell Tesla at a loss and immediately buy Lucid or another EV maker to maintain your tech exposure without violating the wash-sale rule. The replacement doesn't need to be identical; it just needs to be sufficiently different to pass IRS scrutiny.

Harvesting with index funds and ETFs

For broad index investors, harvesting is straightforward. Own $50k in Vanguard S&P 500 ETF (VOO) at a loss? Sell it, immediately buy iShares Core S&P 500 ETF (IVV). Both track the same index, but they're different securities, so the wash-sale rule doesn't apply. You maintain full equity exposure while locking in a loss.

If you own individual stocks, harvesting is trickier because there's no perfect substitute. Selling Apple at a loss and buying Microsoft captures the loss but changes your specific company bets.

Tax-gain harvesting: The inverse strategy

In unusually low-income years (sabbatical, early retirement, year of major charitable giving), you might deliberately realize gains and harvest the associated taxes at favorable rates. This "tax-gain harvesting" is the inverse of loss harvesting: you sell winners in a low-income year to fill your 0% tax bracket or transition from the 20% to 24% bracket, then reinvest. It's less common but valuable when executed correctly.

The long-term impact

Over a 30-year period, a taxable investor who harvests losses consistently saves approximately 0.5–1% annually compared to a buy-and-hold-without-harvesting investor. This assumes an average portfolio return of 7% and normal market volatility (where losses occur regularly). For a $500,000 portfolio, 0.5% annually is $2,500 per year, or $75,000 over 30 years (not accounting for compounding of the tax savings themselves).

Real-world scenarios

Scenario 1: Market downturn. It's March 2020. Your $200,000 tech ETF holding is down to $140,000. You harvest the $60,000 loss immediately, offsetting a $60,000 gain from a real estate fund you sold earlier. You instantly owe $0 in capital gains tax, and you own the same tech ETF (via a different share class or similar fund). By June, the tech ETF rebounds to $180,000. You've locked in the loss permanently and kept the rebound.

Scenario 2: Rebalancing with losses. Your 70/30 portfolio has stocks up and bonds down over two years. To rebalance, you'd normally sell winners and buy losers. But this year, your bond holdings are underwater. Harvest the bond loss by selling and immediately rebalancing into a similar bond fund. You get the rebalancing and a tax loss in one trade.

Scenario 3: Accumulated losses in early retirement. You retired at 50 with $1.2M in taxable brokerage accounts. For the next 15 years, your tax bracket is low (25% federal). Each year, you harvest losses aggressively, offsetting any capital gains from dividends or rebalancing. By age 65, when you start Social Security and Medicare (higher income), you've harvested most losses and dried up future tax liability.

Common mistakes in tax-loss harvesting

Mistake 1: Violating the wash-sale rule accidentally. You sell ABC stock at a loss on November 20 and forget the 30-day window. You buy ABC again on December 10. The IRS disallows the loss, and you owe taxes on the gain you thought you'd deferred.

Mistake 2: Harvesting losses indiscriminately. Some losses aren't worth harvesting. If you harvest a $500 loss but incur $100 in trading fees and $50 in bid-ask spreads, the net benefit is minimal. Focus on material losses.

Mistake 3: Not tracking wash sales. If you harvest Apple at a loss in December and then automatically reinvest a dividend in Apple in January, you've triggered the wash-sale rule. Brokers track this, but it's easy to overlook if you use multiple accounts.

Mistake 4: Harvesting without a plan to maintain exposure. If you harvest a loss and leave the proceeds in cash, you've changed your allocation. Always swap into a similar security immediately.

Mistake 5: Harvesting late in the year without a strategy. December harvesting is common, but it's not automatic. Only harvest if the loss can offset gains or income from that tax year.

FAQ

Q: Do I need a separate "harvesting" fund, or can I harvest within my regular portfolio?
A: You harvest within your regular portfolio. Sell the losing position and reinvest the proceeds in a similar one. No separate account needed.

Q: What if my broker doesn't identify wash sales automatically?
A: Many brokers now flag wash sales at tax time, but not all. Track them yourself in a spreadsheet, or use tax software like TurboTax that cross-references sales and purchases.

Q: Can I harvest losses in my Roth IRA?
A: No. Tax-advantaged accounts (401k, Traditional IRA, Roth IRA, HSA) don't generate taxable gains or losses, so harvesting is irrelevant. You can rebalance tax-free without harvesting.

Q: If I harvest a $10,000 loss and only offset $5,000 of gains, what happens to the other $5,000?
A: You can deduct up to $3,000 against ordinary income. The remaining $2,000 carries forward to next year indefinitely.

Q: Can I harvest a loss on a stock I believe will recover?
A: Yes. That's the entire point. You harvest the loss to reduce taxes while maintaining exposure by buying a similar stock. You get the tax benefit and keep your market bet intact.

Q: Is tax-loss harvesting worth the effort for small accounts ($50k–$100k)?
A: Yes, if you do it simply. Use sector ETFs as swap pairs to avoid wash-sale complexity. A $5,000 loss saved at 20% tax rate is $1,000, which is meaningful regardless of account size.

Q: If I have decades of losses to carry forward, is there a risk I'll never use them?
A: Only if you never realize gains again and live in a state with low income. For most long-term investors, future gains will consume losses. But in high-income early retirement years, you might harvest gains to "use up" old losses before they expire at death.

  • Capital gains tax: The tax on the profit from selling an investment. Losses offset gains.
  • Tax-advantaged accounts: Accounts like IRAs and 401ks where tax-loss harvesting is unnecessary because gains aren't taxed.
  • Wash-sale rule: The rule preventing losses if you buy the same security within 30 days.
  • Ordinary income: Income from salary, interest, and dividends. Capital losses offset up to $3,000 of ordinary income annually.
  • Tax drag: The reduction in returns caused by taxes. Tax-loss harvesting reduces drag.

Summary

Tax-loss harvesting is one of the few sell reasons that unambiguously creates value. You sell a losing position, realize the tax loss, and immediately maintain your portfolio exposure by buying a similar security. Over decades, these harvested losses compound into tens of thousands of dollars in deferred taxes. The key is discipline: track wash-sale windows, harvest material losses (not tiny ones), and always reinvest immediately to maintain allocation. For taxable investors, this is not optional. It's the difference between an 8% pre-tax return and a 7% after-tax return over 30 years—a gap of nearly $1 million on a $500k portfolio.

Next

The Danger of "Taking Profits" Too Early