Skip to main content
Tax Efficiency for Long-Term Holders

Tax-Loss Harvesting Mechanics

Pomegra Learn

Tax-Loss Harvesting Mechanics

Tax-loss harvesting is one of the most underused tools available to long-term investors in taxable accounts. When a holding falls in value, you can sell it at a loss, use that loss to offset capital gains elsewhere in your portfolio, and then immediately reinvest the proceeds in a similar but not "substantially identical" security. Over decades, this can save tens of thousands of dollars in taxes while keeping your portfolio's economic exposure virtually unchanged.

Quick definition: Tax-loss harvesting is the practice of selling a security at a loss to generate a capital loss that offsets capital gains or ordinary income, thereby reducing your tax liability. The loss is then immediately reinvested in a similar but not identical security, maintaining your desired asset allocation while improving your tax position.

Key Takeaways

  • Tax-loss harvesting captures realized losses to offset realized gains (or up to $3,000 of ordinary income), creating tax deductions worth 20-40% of the loss depending on your bracket.
  • The wash-sale rule requires 30 days before repurchasing the same or substantially identical security; using a similar alternative avoids this penalty.
  • Timing matters: harvest losses before year-end when you have net gains to offset, or preserve losses to carry forward against future gains.
  • The after-tax benefit of harvesting compounds: early harvesting allows the tax savings to remain invested and grow for the remaining decades of your holding period.
  • Systematic harvesting in taxable accounts can improve long-term after-tax returns by 1-2 percentage points annually on large portfolios, or 20-30% of after-tax gains over a lifetime.
  • Documentation is critical: keep records of cost basis, loss amount, and the alternative security purchased to defend the harvest against IRS scrutiny.

The Mechanics of a Loss Harvest

The basic process is straightforward:

  1. Identify a loss. A security you own is trading below your purchase price.
  2. Sell at a loss. Lock in the loss by selling the position.
  3. Realize the loss. This generates a capital loss on your tax return.
  4. Offset gains. Use the loss to reduce any capital gains you realized during the year, or carry it forward to offset future gains.
  5. Reinvest. Immediately buy a similar security (different ticker, different fund, or different sector) to maintain your desired allocation.

Example: You bought VTI (Vanguard Total Stock Market ETF) at $200 per share. It falls to $180. You sell, realizing a $20 loss on each share. You immediately buy SWTSX (Schwab U.S. Total Stock Market Fund) or even a different sector. The loss is captured on your tax return; you maintain stock market exposure.

Over 20 years, if you harvest losses consistently during market downturns, you can accumulate meaningful loss carryforwards that shelter future gains from taxation.

Capital Loss Mechanics and Carryforward

Capital losses first offset capital gains dollar-for-dollar. If you harvested $50,000 of losses during a market decline and realized $30,000 of gains from portfolio rebalancing, your net capital loss is $20,000.

A $20,000 net loss can:

  • Offset $20,000 of ordinary income, reducing your tax bill by $4,000–$8,000 (depending on bracket).
  • Carry forward indefinitely: if you only used $3,000 against ordinary income this year, the remaining $17,000 waits for next year.

The $3,000 annual limit on losses against ordinary income is why the carryforward is powerful. A massive harvest in a crash year creates a loss carryforward that shelters gains in strong years for decades.

Consider a 55-year-old investor who harvests $100,000 of losses during a market crash. If she has only $15,000 of gains that year:

  • She nets a $85,000 loss.
  • Uses $3,000 against ordinary income ($3,000 × 24% bracket = $720 tax savings).
  • Carries forward $82,000 to future years.
  • For the next 27 years until age 82, she harvests gains with tax-free treatment until the carryforward is exhausted.

This is extraordinarily valuable and often overlooked.

The Wash-Sale Rule

The Internal Revenue Service does not allow you to claim a loss and then repurchase the same investment within 30 days. This is called the wash-sale rule, codified in IRC Section 1091.

If you sell VTI at a loss and buy VTI again within 30 days, the IRS disallows the loss and increases your cost basis in the new VTI purchase. The loss is not eliminated—it's deferred until you eventually sell the VTI position without repurchasing it.

The 30-day window: The rule applies 30 days before and 30 days after the sale—61 days total. If you sell on January 15, you cannot rebuy a substantially identical security until February 15 without triggering the wash-sale rule.

What is "substantially identical"? The IRS is intentionally vague. However, broadly accepted practice:

  • Different ETFs or funds tracking the same index are not substantially identical (VTI vs. SWTSX vs. VTSAX).
  • The same security is obviously identical.
  • Different sectors are not substantially identical (US total market vs. US small cap).
  • Calls or puts are not substantially identical to the underlying stock.

To harvest safely:

  • Sell VTI and buy VTSAX (similar but different fund).
  • Sell US large-cap and buy US mid-cap (different economic exposure).
  • Sell a sector ETF and buy a broader index ETF.

Many investors maintain a "waiting list" of securities to buy during downturns. They know that when the market falls 15%, they'll sell XYZ at a loss and immediately buy ABC as a replacement.

Timing and Realizing Gains

The power of harvesting scales with your realized gains. If you have $100,000 of capital gains from selling appreciated positions, you can harvest $100,000 of losses to eliminate all tax on those gains. If you have no gains to offset, harvested losses only shelter $3,000 of ordinary income per year.

This suggests strategic thinking about rebalancing and gains realization:

  1. Harvest losses opportunistically. After a market decline, identify positions with losses and harvest them before the market recovers.
  2. Realize gains strategically. Sell winners before you'd normally rebalance. Harvest losses to offset the gains. Then buy back into the original position (in different form) to maintain the allocation.
  3. Pair gains and losses. Don't harvest losses randomly. Pair them with specific gains you plan to realize.
  4. Manage loss carryforwards. Track your available loss carryforward. If you have $50,000 carried forward, you can afford to realize $50,000 of gains tax-free.

Example: You own a position that's become 15% of your portfolio (should be 8%). To rebalance, you'd sell half, realizing $40,000 of gains. Instead:

  • Sell the entire position: $40,000 gain, but you also harvest losses elsewhere.
  • If you harvested $40,000 of losses earlier, the gain is offset.
  • Reinvest your full proceeds in the same holding (or diversify into several holdings) to achieve your target allocation with zero tax.

This flexibility is enormously powerful over decades.

Documentation and Record-Keeping

The IRS requires clear documentation of cost basis, the loss harvested, and the replacement security. Failure to document can result in denied deductions or penalties.

Maintain records:

  • Original cost basis: Purchase price, date, and quantity of the original position.
  • Sale details: Sale price, date, and the loss realized.
  • Replacement security: The new security purchased, the date, and quantity.
  • Tax return attachment: Keep a copy of Schedule D (capital gains/losses) and any loss carryforward tracking.

Many brokers automatically track cost basis, but you should verify:

  • Did they include reinvested dividends in the original cost basis?
  • Are they correctly identifying which shares were sold (using the "specific identification" method)?
  • Are they respecting the wash-sale rule?

Brokers are required to report wash-sale information to the IRS, so your records must align with what they report. An audit years later will compare your harvesting documentation to broker reports.

The After-Tax Benefit Over Time

The true power of harvesting emerges over decades. Suppose an investor harvests $50,000 of losses during a 2020-style crash and saves $12,000 in taxes (at a 24% marginal rate).

If she invests that $12,000 at 7% annual returns over 30 years until retirement at age 85, that tax savings alone grows to $91,000. This is not just the tax paid this year—it's the compounding benefit of having kept more of her money invested.

This is why early harvesting (age 55 rather than age 75) is so powerful. A 30-year compounding horizon turns a one-time tax savings into a multi-generational wealth boost.

Over a 30-year career, an investor in a high-income situation (high tax bracket, significant gains) can accumulate 2-5 percentage points of additional after-tax return annually through disciplined loss harvesting. On a $1 million portfolio, this equals $20,000–$50,000 of annual additional after-tax growth.

Real-World Examples

Scenario 1: Systematic Harvesting in a Steady Bull Market

A 40-year-old investor buys $100,000 of VTI and $100,000 of VXUS (international) in a taxable account. Over five years:

  • VTI grows to $130,000 (+30%).
  • VXUS declines to $85,000 (−15%).

In Year 5, the investor rebalances. She sells half of VTI ($65,000) to raise cash, realizing $15,000 of gains. She simultaneously sells all of VXUS for $85,000, realizing a $15,000 loss.

Without harvesting: $15,000 gain taxed, cost is $3,600 (at 24% bracket). With harvesting: $15,000 loss offsets the $15,000 gain. Zero tax. Plus, she maintains her allocation: 50% VTI ($65,000), 50% VXUS + other ($85,000).

Savings this year: $3,600. Over 25 years to retirement, that $3,600 at 7% return grows to $27,000.

Scenario 2: Loss Carryforward During a Crash

In 2022, when tech stocks fell sharply, a 50-year-old investor with a $500,000 taxable portfolio saw significant losses:

  • $200,000 in tech ETFs, now worth $150,000: $50,000 loss.
  • $150,000 in small-cap funds, now worth $120,000: $30,000 loss.

She harvests both: $80,000 total loss.

In 2022, she had only $20,000 of gains (bond interest and dividends). She uses $20,000 of losses against gains and $3,000 against ordinary income. She carries forward $57,000.

From 2023-2039, during a strong bull market, she accumulates $300,000 of capital gains from rebalancing sales. All $57,000 of the carryforward offsets these gains, eliminating $57,000 × 24% = $13,680 of taxes.

Over 17 years, that compounding tax savings is worth $40,000+ in additional portfolio value.

Common Mistakes

1. Failing to track the wash-sale window. Selling at a loss on December 28 and buying the same fund on January 5 triggers wash-sale. Wait until January 20 to be safe.

2. Harvesting losses in a low-tax-bracket year. If your income is unusually low this year, ordinary loss deductions are wasted. Carry the loss forward to a higher-income year.

3. Ignoring state capital gains taxes. Some states (California, New York) have no separate capital gains tax; loss harvesting helps reduce federal tax only. Other states apply their own capital gains tax, making harvesting even more valuable.

4. Harvesting without a gain-realization plan. If you harvest losses but never realize gains, the losses go unused. Pair harvesting with strategic gain realization.

5. Replacing with a materially different security. You harvest VTI and buy a single-stock growth position to avoid wash-sale. But now your portfolio is exposed to stock-specific risk instead of diversified market risk. Replace with a similar but non-identical fund.

6. Not documenting the specific identification. If you own VTI across multiple purchase dates with different cost bases, selling "the loss position" without specifying which shares you sold invites IRS questions. Use specific identification to ensure the loss harvest is defensible.

FAQ

Q: If I harvest a loss, do I have to buy a "similar" security, or can I buy anything? A: You can buy anything. The wash-sale rule only prevents repurchasing the same or substantially identical security. You could harvest VTI and buy gold, real estate, or bonds. However, to maintain your portfolio's intended allocation, you'll likely want to replace with something similar.

Q: What if I die with unused loss carryforwards? A: Loss carryforwards expire at death. Your heirs cannot claim them. However, they receive a "stepped-up basis," which resets your holdings' cost basis to their date-of-death value, eliminating all built-in gains on your death. This is often superior to harvesting.

Q: Can I harvest losses in my 401(k) or IRA? A: No. Losses inside retirement accounts are not deductible. The IRS treats retirement accounts as a protected space; you pay tax on contributions or earnings when you withdraw, not based on gains/losses within the account. Focus harvesting on taxable accounts only.

Q: Should I harvest losses at a big loss or wait for partial recovery? A: Harvest when the loss is meaningful and you have gains to offset. A 5% loss is not worth the effort. A 15-20% loss, harvested during a market downturn, is worth significant tax savings. If you're uncertain, harvest sooner: the tax savings can compound for longer.

Q: Does harvesting harm my long-term holding period for long-term capital gains? A: No. When you harvest a loss and reinvest in a different security, the new security's holding period starts fresh. Your original position's holding period is irrelevant to the new purchase. This is why harvesting works: you reset your cost basis but your time horizon is independent.

Q: Can I harvest losses in bond positions? A: Yes. If interest rates rise after you buy bonds, their market value falls. You can harvest the loss and immediately buy a different bond (different maturity, different issuer) to maintain fixed-income exposure while capturing the tax loss.

  • Capital gains: Profit from selling a security at a higher price than cost; long-term gains (held >1 year) are taxed favorably; short-term gains are taxed as ordinary income.
  • Cost basis: The original purchase price of a security, used to calculate gains or losses when sold.
  • Wash-sale rule: IRC Section 1091 rule preventing loss claims if a substantially identical security is repurchased within 30 days before or after the sale.
  • Specific identification: Method of designating which shares are sold (by purchase date/cost basis) to optimize tax outcomes.
  • Loss carryforward: Unused capital losses carried to future tax years to offset future gains.

Summary

Tax-loss harvesting is a systematic tool for turning market downturns into tax advantages. By selling positions at a loss, capturing the loss on your tax return, and reinvesting in similar but non-identical securities, you reduce your annual tax bill while maintaining your portfolio's intended economic exposure.

The compounding benefit is substantial: a tax savings of $5,000–$10,000 captured in your 40s can grow to $30,000–$75,000 by retirement through decades of compound returns. For high-income investors in taxable accounts with diversified holdings, systematic harvesting can improve after-tax returns by 1-2 percentage points annually.

The key to success is discipline, documentation, and strategic pairing of harvested losses with realized gains. Maintain clear records, respect the wash-sale rule, and harvest opportunistically during market declines when losses are available and gains are being realized.

Next

Read the next article: Avoiding the Wash-Sale Rule