Skip to main content

Tax-Loss Harvesting: Turning Investment Losses Into Tax Savings

Tax-loss harvesting is a strategic tax optimization technique where investors intentionally sell investments trading below their purchase price to realize capital losses. These losses can then be used to offset capital gains from other investments or reduce ordinary income, lowering your overall tax bill. While the concept sounds simple, tax-loss harvesting involves several rules and nuances—especially the "wash-sale rule"—that investors must navigate carefully. For high-income earners with significant taxable investment accounts, tax-loss harvesting can save thousands of dollars annually in taxes.

Quick definition: Tax-loss harvesting is the practice of selling losing investments to realize capital losses, which you use to offset capital gains or ordinary income, reducing your tax liability. The wash-sale rule prevents repurchasing the same or substantially identical investment within 30 days before or after the sale.

How Capital Gains and Losses Work

Capital Gains

A capital gain occurs when you sell an investment for more than you paid. Capital gains are taxed at preferential rates if they're "long-term" (held more than one year):

2024 Long-Term Capital Gains Tax Rates:

  • 0% rate: Single filers with taxable income up to $47,025; married filing jointly up to $94,050
  • 15% rate: Single filers $47,026-$518,900; married filing jointly $94,051-$583,750
  • 20% rate: Single filers over $518,900; married filing jointly over $583,750

Short-term capital gains (held ≤1 year) are taxed as ordinary income at your marginal bracket, up to 37%.

Capital Losses

A capital loss occurs when you sell an investment for less than you paid. Capital losses can offset capital gains dollar-for-dollar. If losses exceed gains, you can deduct up to $3,000 of net capital losses against ordinary income in a single year. Excess losses carry forward indefinitely to future years.

Example:

  • Capital gains: $8,000 (long-term, taxed at 15%)
  • Capital losses: $5,000
  • Net capital gain: $3,000
  • Tax on $3,000 at 15%: $450

If you harvest $2,000 more in losses (total $7,000 losses):

  • Net capital loss: -$1,000 (more losses than gains)
  • Deduct against ordinary income: $1,000 at your ordinary rate (e.g., 22%)
  • Tax savings: $220

This mechanism is the foundation of tax-loss harvesting.

The Wash-Sale Rule

What Is the Wash-Sale Rule?

The wash-sale rule prevents investors from realizing losses for tax purposes while maintaining essentially the same investment. If you sell a security at a loss but repurchase the same or "substantially identical" security within a specific window, the IRS disallows the loss. The rule applies 30 days before the sale, the sale date, and 30 days after the sale (a 61-day window).

Timeline:

  • Day -30 through Day +30 (61-day window around the sale)
  • Can't repurchase the same security within this window without triggering the wash-sale rule

Example: Marcus sells Stock A at a $2,000 loss on June 15. He wants to maintain exposure to the tech sector, so he:

  • Buys a different tech stock (Stock B) on June 18
  • The loss from Stock A is preserved (not substantially identical)
  • Wash-sale rule avoided

However, if Marcus:

  • Sells Stock A on June 15
  • Buys the same Stock A again on June 20
  • The wash-sale rule applies; the $2,000 loss is disallowed
  • Cost basis of the repurchased shares increases by $2,000 to preserve the tax benefit for future sale

"Substantially Identical" Definition

The IRS doesn't provide a bright-line definition of "substantially identical." Generally:

  • Same stock or ETF: Triggers wash-sale rule if repurchased within 30 days
  • Different companies in same sector: Usually safe (e.g., selling Apple and buying Microsoft)
  • Different share classes of same company: Risky; might be considered substantially identical
  • Mutual fund and ETF tracking same index: Risky; might be substantially identical depending on holdings
  • Stock and call option on same stock: Problematic; triggering wash-sale rules

Conservative tax advisors recommend waiting 31 days or purchasing a materially different security (different company, different sector, different fund family).

Tax-Loss Harvesting Mechanics

Step-by-Step Process

1. Identify Losing Positions Review your taxable brokerage account to identify investments trading below cost basis. Use your brokerage's tax tools or spreadsheets to track.

2. Calculate Potential Tax Savings For each loss, calculate tax savings:

  • If offsetting short-term gains: Use your ordinary income rate (22%-37%)
  • If offsetting long-term gains: Use the long-term rate (0%, 15%, or 20%)
  • If deducting against ordinary income: Use your ordinary rate, capped at $3,000 per year (excess carries forward)

3. Prioritize Losses Harvest the most significant losses first. However, also consider:

  • Losses expiring (those set to expire soon if you're nearing year-end)
  • Losses offsetting largest gains (most efficient use)
  • Losses against ordinary income only if you can't use them for gains

4. Execute the Sale Sell the losing position in your taxable account.

5. Rebalance Buy a different (non-substantially-identical) security to maintain desired allocation, or hold cash temporarily.

6. Document Record the sale, loss amount, and any replacement security purchase date. Track holding periods to ensure no wash-sale violations occur.

7. Report on Schedule D On your tax return (Schedule D), report the capital loss. If offset by gains, you're reducing taxable gains. If deducting against ordinary income, you're reducing overall income.

Real-World Example: Tax-Loss Harvesting in Action

Jessica's Taxable Investment Account (December 2024):

Holdings:

  • Tech Stock A: Cost basis $10,000, current value $12,000 (gain of $2,000, held 18 months)
  • Growth Fund B: Cost basis $20,000, current value $17,500 (loss of $2,500, held 8 months)
  • Dividend Stock C: Cost basis $15,000, current value $14,200 (loss of $800, held 2 years)

Year's Capital Gains:

  • Already realized gains from earlier stock sales: $3,500

Tax Situation:

  • Tax bracket: 22% (ordinary income)
  • Long-term capital gains rate: 15%
  • Unrealized loss total: $3,300

Tax-Loss Harvesting Plan:

Jessica can't harvest Stock A because it's a gain. She can harvest losses from Stocks B and C.

Option 1: Harvest Both Losses

  • Sell Growth Fund B: Realize $2,500 loss
  • Sell Dividend Stock C: Realize $800 loss
  • Total losses harvested: $3,300

Tax Calculation:

  • Realized gains from earlier sales: $3,500
  • Less: Capital losses from harvesting: $3,300
  • Net capital gain: $200
  • Tax on $200 at 15% (long-term rate): $30
  • Plus remaining $1,000 loss (can't use):* Actually, let me recalculate. Losses: $3,300. Gains: $3,500. The $3,300 loss offsets $3,300 of the gains. Remaining gain: $200. No $1,000 loss remaining.

Tax Savings:

  • Without harvesting: $3,500 × 15% = $525 tax
  • With harvesting: $200 × 15% = $30 tax
  • Tax savings: $495

Replacement Strategy: Jessica wants to maintain a diversified portfolio, so:

  • Growth Fund B → Sell, then buy different growth-oriented fund or stock (wait 31 days to avoid wash-sale)
  • Dividend Stock C → Sell, then buy a similar dividend-paying stock from different company

Jessica rebalances into different securities, maintaining similar overall allocation while harvesting losses.

Benefits of Tax-Loss Harvesting

Direct Tax Savings

The primary benefit is reducing your tax bill in the current year or future years. In Jessica's example, a $3,300 loss saved $495 in taxes.

Cumulative Impact: For investors with $500,000 in taxable accounts realizing $5,000 in losses annually via harvesting:

  • Annual tax savings at 22% ordinary rate: $1,100
  • Or at 15% long-term gains rate: $750
  • Over 20 years: $15,000-$22,000 in cumulative tax savings
  • If invested, these savings compound further

Maintaining Desired Asset Allocation

By replacing harvested positions with non-identical alternatives, you maintain portfolio diversification and asset allocation without disrupting your strategy. This prevents the trap of "letting losers ride" due to tax inertia.

Improving After-Tax Returns

Higher after-tax returns matter more than pre-tax returns. A 7% after-tax return beats an 8% pre-tax return in a taxable account. Tax-loss harvesting improves after-tax returns by reducing tax drag.

Limitations and Constraints

The Wash-Sale Rule's Impact

The wash-sale rule is the primary constraint. Investors must either wait 31 days or buy materially different securities. This creates timing complexity and potential tracking headaches.

$3,000 Annual Limitation on Ordinary Income Deduction

You can deduct maximum $3,000 in net capital losses against ordinary income annually. Excess losses carry forward indefinitely, but this defers the benefit.

Example: Total capital losses in a year: $8,000 Capital gains to offset: $3,000 Remaining losses: $5,000

  • Use $3,000 against ordinary income (current year deduction)
  • Carry forward $2,000 to next year

Tax-Loss Harvesting Works Only in Taxable Accounts

Tax-loss harvesting has zero value in retirement accounts (401ks, IRAs, Roth IRAs). Within retirement accounts, gains and losses aren't taxable anyway, so harvesting doesn't help. Focus harvesting efforts on taxable accounts only.

Market Movements Can Eliminate Benefits

If you harvest a loss but the replacement security rises significantly, your overall return improves, offsetting tax savings. Conversely, if the original losing security rises after you sell it, you lose the upside. Tax-loss harvesting is not a guaranteed benefit; it improves after-tax returns in normal circumstances but can underperform if market dynamics shift.

Complexity in Multi-Account Scenarios

If you have multiple accounts (multiple taxable accounts, spouse's accounts), the wash-sale rule applies across all accounts in your household. Selling at a loss in one account while buying in another triggers the rule. Spousal coordination is essential.

Advanced Tax-Loss Harvesting Strategies

Pair Trading

Purchase the replacement security before selling the losing position (not within 30 days before), maintaining exposure while planning the harvest. Once 31 days pass after the sale of the original, you can repurchase if desired.

Example:

  • Day 1: Buy Stock B (different from losing Stock A)
  • Day 2: Sell Stock A at loss
  • Day 33: Can repurchase Stock A if desired (31 days after sale)

Opportunistic Harvesting

Wait for market downturns to harvest losses. During bear markets, many positions are underwater, providing opportunities for larger loss harvests.

Harvesting Losses to Offset Gains from Other Events

If you're considering selling appreciated real estate, collectibles, or a business stake (generating large capital gains), harvest investment losses to offset those gains.

Example: You plan to sell a rental property (generating $100,000 gain). Harvest $50,000 in investment losses to reduce taxable gain to $50,000, saving approximately $7,500-$10,000 in taxes (depending on rate).

Key Takeaways

  • Tax-loss harvesting realizes investment losses to offset capital gains or ordinary income, reducing taxes
  • The wash-sale rule prevents repurchasing the same or substantially identical security within 30 days before or after a loss sale
  • Long-term capital losses are valuable because they offset long-term gains at preferential rates (0%, 15%, 20%)
  • Short-term capital losses are versatile because they offset short-term gains and can deduct against ordinary income
  • Tax-loss harvesting only works in taxable accounts; retirement accounts render it useless
  • $3,000 annual limit on deducting capital losses against ordinary income; excess carries forward
  • Pair trading and opportunistic harvesting are advanced strategies to maximize benefits
  • After-tax returns matter more than pre-tax; tax-loss harvesting improves after-tax performance

Common Mistakes to Avoid

Mistake 1: Triggering the wash-sale rule by repurchasing too soon The most common error. You harvest a loss and immediately repurchase the same security to maintain exposure, disallowing the loss. Solution: Wait 31 days or buy a genuinely different security. Set calendar reminders if harvesting frequently.

Mistake 2: Harvesting losses in retirement accounts Losses in 401ks and IRAs generate no tax benefit because gains are tax-deferred anyway. Don't waste energy harvesting in retirement accounts; focus on taxable accounts. Only move to retirement accounts once you've optimized taxable accounts.

Mistake 3: Forgetting to offset losses against the highest-rate gains first If you have both short-term gains (taxed at ordinary rates up to 37%) and long-term gains (taxed at 0%, 15%, or 20%), prioritize offsetting short-term gains first with harvested losses. This generates the highest tax savings.

Mistake 4: Harvesting small losses with high transaction costs If trading costs $10 and the loss is $30, netting only a $20 tax benefit (assuming a 22% bracket), after transaction costs the net benefit is minimal. Focus on larger positions where trading costs are a small percentage of the benefit.

Mistake 5: Not documenting the harvesting activity for your records If the IRS audits, you need to demonstrate that you tracked the wash-sale rule properly. Maintain detailed records: sale dates, loss amounts, replacement security purchases, and gap confirmations (31+ days).

Mistake 6: Failing to track losses across multiple accounts The wash-sale rule applies across all your accounts. If your spouse has a similar security and buys it within the wash-sale window, your loss is disallowed. Coordinate across joint accounts.

Mistake 7: Harvesting losses but forgetting they carry forward Unused losses (beyond the $3,000 annual limit) carry forward indefinitely. In low-gain years, you might have excess losses available. Remember to utilize them or you waste the benefit. Maintain a running total of carried-forward losses.

Real-World Examples from 2024

Example 1: Aggressive Tech Investor

Aaron has a $200,000 taxable brokerage account heavily weighted to tech stocks. During the 2024 market correction, many positions declined:

Positions:

  • Tech Stock X: Bought $50,000, now $38,000 (loss: $12,000)
  • Tech Stock Y: Bought $30,000, now $24,000 (loss: $6,000)
  • Cloud Fund Z: Bought $45,000, now $40,000 (loss: $5,000)
  • Earlier realized gains from 2024 stock sales: $15,000

Tax-Loss Harvesting Plan:

  • Sell Tech Stock X at $12,000 loss
  • Sell Cloud Fund Z at $5,000 loss
  • Total losses: $17,000

Tax Calculation:

  • Realized gains: $15,000
  • Less losses: $15,000
  • Net gain: $0
  • Remaining losses available: $2,000 (deduct against ordinary income at 24% bracket = $480 tax savings)
  • Total tax savings: approximately $480

Aaron then:

  • Replaces Stock X with a different tech company (e.g., buys Nvidia instead of Tesla) after 31 days
  • Replaces Fund Z with a different cloud-sector fund from a different provider
  • Maintains diversified tech exposure while harvesting losses

Example 2: Retiree Optimizing Taxable Accounts

Maria, age 70, is retired with $500,000 in taxable accounts. She takes withdrawals for living expenses and wants to minimize taxes. Market volatility in 2024 created several loss opportunities:

Positions:

  • Dividend stock portfolio: Several positions underwater totaling $18,000 in unrealized losses
  • Bond fund: Underwater by $8,000
  • Dividend stocks: Realized $12,000 in gains (from dividend reinvestment and some appreciated stocks sold)

Tax-Loss Harvesting Strategy:

  • Harvest $12,000 in losses to offset the $12,000 in gains (tax-free offset)
  • Harvest additional $14,000 in losses
  • Deduct $3,000 against ordinary income (saves $600 assuming 20% effective rate)
  • Carry forward remaining $11,000 loss to future years

Implementation:

  • Replace harvested dividend stocks with similar-sector stocks (avoid substantially identical)
  • Replace bond fund with similar-maturity bonds from different issuer
  • Maintain desired allocation

Impact:

  • Tax savings current year: $600 (from ordinary income deduction)
  • Preserved gain offset: $12,000 (no tax on gains)
  • Deferred benefit from carried-forward losses: $11,000 × 20% (future years) = $2,200

Example 3: Business Owner with Concentrated Stock

Raj holds 60,000 shares of his former employer's stock worth $300,000 (cost basis: $120,000, unrealized gain: $180,000). He also has a separate taxable investment account with:

  • Diversified portfolio: $200,000
  • Unrealized losses: $25,000

Plan: Raj anticipates selling the concentrated stock next year for proceeds. He wants to harvest losses in 2024 to offset the large expected gain.

Strategy:

  • Harvest the $25,000 in losses from his diversified account in 2024
  • Sell the concentrated stock in 2025, realizing $180,000 gain
  • File 2025 return with $180,000 gain offset by $25,000 loss (carried from 2024)
  • Net capital gain: $155,000
  • Tax savings: $25,000 × 20% long-term rate = $5,000

Important: Raj must wait until 2025 to harvest maximum benefit because offsetting a $180,000 gain with $25,000 loss doesn't fully eliminate the tax. However, harvesting is still worthwhile for the $5,000 savings.

FAQ

Q: Can I harvest losses in January to offset 2024 gains, then harvest gains in December 2024? A: The timing is flexible. Capital gains and losses are netted on your return for the year incurred. If you harvest a $5,000 loss on January 2, 2024, and realize $3,000 in gains on December 28, 2024, they offset on your 2024 return. The loss doesn't need to precede the gain; they're netted annually.

Q: If I have a carried-forward loss from 2023, when does it expire? A: Capital losses never expire. If you have $5,000 in carried-forward losses from 2023, you can use them in 2024, 2025, or any future year (subject to the $3,000 annual limit if deducting against ordinary income).

Q: Does tax-loss harvesting affect my cost basis for future sales? A: Only if the wash-sale rule applies. When you trigger a wash-sale, the disallowed loss increases the cost basis of the repurchased security, preserving the tax benefit for eventual sale. Otherwise, cost basis is simply your original purchase price (adjusted for stock splits, dividends, etc.).

Q: Should I harvest losses before or after year-end? A: Both work, but timing considerations matter. A loss must be realized (the sale must settle) before year-end to count on that year's return. In the US, trades settle T+1 (one business day after trade), so selling by December 30 ensures settlement by year-end. Harvesting after year-end (January 2 onwards) counts on the following year's return.

Q: If I sell at a loss but the replacement security gains significantly, did tax-loss harvesting help? A: Yes, because you still deferred taxes on the original loss and generated current-year tax savings. If the replacement security gains, that's an additional benefit. Your total return (original loss + replacement gain) is better than if you'd held the original position and paid taxes.

Q: Can my spouse harvest losses in their account if I have gains in mine? A: Only if you file jointly and allow loss offset. If you file jointly, losses and gains are netted across both spouses' returns. If filing separately, you each have separate loss carryforwards. Couples almost always file jointly to maximize loss offset.

Q: What if I harvest a loss but the IRS later determines the security wasn't substantially identical to my replacement? A: The wash-sale rule wouldn't apply, and your loss is allowed (favorable outcome). However, if the IRS determines they ARE substantially identical and disallows the loss, you'd owe back taxes plus penalty and interest. Err on the side of caution: wait 31 days or purchase genuinely different securities.

Q: Is tax-loss harvesting considered a "wash trade" or market manipulation? A: No. Tax-loss harvesting is legitimate tax planning encouraged by CPAs and financial advisors. It's explicitly contemplated in tax law (the wash-sale rule exists precisely because loss harvesting is expected). Wash trades (rapid buying/selling to create artificial volume) are different and illegal in securities trading. Tax-loss harvesting is neither.

Summary

Tax-loss harvesting is a powerful tax optimization strategy for investors with significant taxable accounts. By realizing losses in falling investments and using them to offset gains or ordinary income, you reduce your tax bill while maintaining desired portfolio allocation. The wash-sale rule is the key constraint—you must wait 31 days or purchase substantially different securities to avoid disallowing losses. For high-income earners, tax-loss harvesting can save thousands annually in taxes, with benefits compounding over decades. Discipline, documentation, and understanding the wash-sale rule are essential to successful implementation.

Disclaimer: This article is general educational content about tax-loss harvesting and should not be construed as investment or tax advice. Tax laws are complex, and individual circumstances vary. Tax-loss harvesting involves risks, including the possibility that replacement securities perform differently than original holdings. Consult a qualified tax professional or financial advisor before implementing a tax-loss harvesting strategy.

Sources

Next

Tax Drag on Returns