When your portfolio takes a hit, there's a silver lining: you can turn those losses into immediate tax savings. Tax loss harvesting is the practice of selling investments that have declined in value to realize capital losses, which can then offset capital gains elsewhere in your portfolio—or even reduce your ordinary income. It's one of the most powerful tools for improving after-tax returns, yet most investors either don't use it or use it incorrectly.

This isn't about finding joy in losing money. It's about recognizing that losses are going to happen, and when they do, you might as well extract every bit of value from them. Done right, tax loss harvesting can save you thousands in taxes each year without changing your investment strategy or taking on additional risk.

Here's how it works, when to use it, and—critically—how to avoid the traps that can destroy the benefit entirely.

What Is Tax Loss Harvesting?

Tax loss harvesting is the deliberate sale of an investment at a loss to offset taxable gains. The mechanic is straightforward: you sell a security that has declined below its purchase price, realizing a capital loss. That loss can then offset capital gains from other investments you sold at a profit.

If your losses exceed your gains for the year, you can use up to $3,000 of the excess loss to reduce your ordinary income. Any remaining losses carry forward indefinitely to future tax years, ready to offset gains whenever they occur.

How the Offset Works

Suppose you sell Stock A for a $10,000 gain and Stock B for a $7,000 loss. Your net capital gain is $3,000. You only owe tax on that $3,000—not the full $10,000. If your capital gains tax rate is 15%, harvesting that loss saved you $1,050 in taxes ($7,000 × 0.15).

The beauty of this strategy is that it doesn't require you to exit the market. You can sell the losing position and immediately buy a similar (but not identical) investment, maintaining your market exposure while locking in the tax benefit.

How Losses Offset Gains: The Netting Process

Capital gains and losses are categorized as either short-term (assets held one year or less) or long-term (assets held more than one year). The tax treatment differs significantly: short-term gains are taxed at ordinary income rates (up to 37%), while long-term gains are taxed at preferential rates (0%, 15%, or 20% depending on income).

The IRS requires a specific netting sequence:

  1. Net short-term against short-term: Combine all short-term gains and losses to get a net short-term result.
  2. Net long-term against long-term: Combine all long-term gains and losses to get a net long-term result.
  3. Net the two categories: If one is positive and the other negative, they offset. The character of the final result (short-term or long-term) is determined by whichever side is larger.
Worked Example: Multi-Year Netting

Your 2026 activity:

  • Short-term gains: $12,000
  • Short-term losses: $8,000
  • Long-term gains: $20,000
  • Long-term losses: $15,000

Step 1 — Net within each category:

  • Net short-term: $12,000 − $8,000 = $4,000 gain
  • Net long-term: $20,000 − $15,000 = $5,000 gain

Step 2 — Both are positive, so no further netting:

  • You report $4,000 short-term gain (taxed at ordinary rates)
  • You report $5,000 long-term gain (taxed at preferential rates)

Now assume you harvested an additional $6,000 long-term loss before year-end:

  • Net long-term: $20,000 − $21,000 = −$1,000 (a loss)
  • Net short-term: $4,000 (still a gain)

Step 3 — Net the categories:

  • $4,000 short-term gain − $1,000 long-term loss = $3,000 net short-term gain

By harvesting that extra $6,000 loss, you eliminated the $5,000 long-term gain entirely and reduced the short-term gain from $4,000 to $3,000. Total tax savings: roughly $1,550 if you're in the 24% bracket.

The $3,000 Ordinary Income Deduction

If your total capital losses exceed your total capital gains, you have a net capital loss for the year. The IRS allows you to deduct up to $3,000 of that loss against ordinary income (or $1,500 if married filing separately). This is especially valuable because ordinary income is taxed at higher rates than long-term capital gains.

Why This Matters

If you're in the 32% tax bracket, a $3,000 deduction against ordinary income saves you $960 in taxes. If you only had capital gains to offset, and those gains were taxed at 15%, the same $3,000 loss would save you just $450. The ordinary income deduction is more than twice as valuable.

Any losses beyond the $3,000 limit don't disappear—they carry forward to the next year, and the next, and the next, until fully used. There's no expiration date. If you harvest $20,000 in losses this year but have no gains, you can deduct $3,000 this year, $3,000 next year, and so on for nearly seven years if needed.

When to Harvest: Timing Strategies

While tax loss harvesting can happen any time during the year, certain moments make it especially attractive:

Year-End Planning

Most harvesting occurs in November and December. Why? Because you know your realized gains for the year by then. If you sold a property in March for a $50,000 gain, you have until December 31 to harvest losses to offset it. Waiting until year-end gives you full visibility into the gains you need to cover.

After Market Corrections

Bear markets and corrections create large pools of unrealized losses. A 20% market decline means virtually every position bought in the past year is underwater. This is prime harvesting season—you can selectively realize losses on positions you were planning to rebalance anyway.

When You Have Large Realized Gains

If you sold a business, real estate, or concentrated stock position and face a significant tax bill, harvesting losses from your portfolio can directly reduce that bill. This is reactive harvesting: you already have the gain, and now you're looking for offsets.

Quarterly or Continuous Harvesting

Some investors monitor their portfolios continuously and harvest losses whenever they appear, not just at year-end. This approach requires more active management but maximizes the total losses captured over time. Automated platforms and robo-advisors often do this daily.

Don't Wait for Rock Bottom

You don't need to time the exact bottom. If a position is down 15% and meets your harvesting criteria, sell it. Waiting for it to drop to 20% might mean missing the opportunity entirely if the stock rebounds. The tax benefit is real right now—speculation about future prices is just that.

The Wash Sale Rule: The One Trap You Cannot Ignore

Here's where most people destroy the value of tax loss harvesting: the wash sale rule. Under IRS regulations, if you sell a security at a loss and then buy a "substantially identical" security within 30 days before or after the sale, the loss is disallowed. You cannot claim it on your taxes.

Note the language: 30 days before or after. The wash sale window is actually 61 days total—30 days before the sale, the day of the sale, and 30 days after.

How a Wash Sale Happens

You own 100 shares of XYZ Corp, purchased at $50. It's now trading at $35. On December 15, you sell all 100 shares, realizing a $1,500 loss. On January 5 (21 days later), you buy back 100 shares of XYZ at $37.

Result: The $1,500 loss is disallowed. You cannot deduct it. The loss is instead added to the cost basis of the shares you repurchased, deferring the tax benefit until you eventually sell those shares.

What "Substantially Identical" Means

The IRS has never published a precise definition, but case law and guidance suggest:

  • Identical: Same stock, same company. Buying Apple after selling Apple is a wash sale.
  • Substantially identical: Options or convertible securities on the same stock. Selling Apple stock and buying deep-in-the-money Apple call options is likely a wash sale.
  • Not identical: Different companies in the same sector. Selling Pfizer and buying Merck is not a wash sale, even though both are pharmaceutical companies.
  • Not identical: Different ETFs tracking similar (but not identical) indexes. Selling an S&P 500 ETF and buying a total market ETF is generally safe.

The conservative approach: if the investments move in near-lockstep, they're too similar. You need meaningful tracking difference.

How to Avoid Wash Sales

The simplest method: wait 31 days before repurchasing the same security. If you sell on December 15, you can safely buy back on January 15 or later. During those 31 days, you can either hold cash or buy a similar (but not identical) replacement.

Strategy: The Substitute Swap
1
Sell the losing position. Realize the loss immediately.
2
Immediately buy a similar replacement. For example, sell Vanguard S&P 500 ETF (VOO) and buy iShares Core S&P 500 ETF (IVV). Both track the same index but are not substantially identical securities.
3
After 31 days, swap back if desired. Sell the replacement and repurchase the original. Or keep the replacement—it's functionally the same.

This preserves market exposure and avoids the wash sale rule entirely. Your portfolio's return profile barely changes, but you've locked in a tax deduction.

Watch Your Other Accounts

The wash sale rule applies across all accounts you control: taxable accounts, IRAs, 401(k)s, even your spouse's accounts. If you sell Tesla at a loss in your brokerage account and your 401(k) automatically buys Tesla through a target-date fund two weeks later, you've triggered a wash sale. Coordinate across all accounts or use different securities in tax-deferred accounts.

Tax Loss Harvesting in Practice: A Full Example

Let's walk through a realistic scenario to see how this plays out across a full tax year.

Case Study: Priya's 2026 Portfolio

Starting situation (January 2026):

Priya, a software engineer in the 32% tax bracket, holds a taxable brokerage account with the following positions:

  • Tech ETF: 200 shares, purchased at $100/share, now at $85. Unrealized loss: $3,000.
  • S&P 500 ETF: 150 shares, purchased at $200/share, now at $220. Unrealized gain: $3,000.
  • Individual stock (CleanEnergy Corp): 50 shares, purchased at $80/share, now at $50. Unrealized loss: $1,500.

March 2026: She sells rental property

Priya sells a rental property and realizes a $40,000 long-term capital gain. At a 15% capital gains rate, she faces a $6,000 tax bill. She decides to harvest losses to offset it.

Action 1: Harvest the Tech ETF loss

On March 15, she sells all 200 shares of the Tech ETF at $85, realizing a $3,000 loss. She immediately buys 200 shares of a different tech ETF that tracks a similar but not identical index. Her market exposure is unchanged.

Action 2: Harvest the individual stock loss

On March 20, she sells all 50 shares of CleanEnergy Corp at $50, realizing a $1,500 loss. She buys shares of a different renewable energy company with similar growth prospects.

Total losses harvested: $4,500

Tax impact:

Her $40,000 capital gain from the property is reduced by $4,500 in losses. Net taxable gain: $35,500. Tax owed: $5,325 instead of $6,000. Tax saved: $675.

November 2026: Market correction creates more opportunities

The market drops 12% in October. Her portfolio now has additional unrealized losses. She identifies $8,000 in harvestable losses across several positions. She executes another round of harvesting, swapping into similar securities.

Total losses for 2026: $12,500

Gains for 2026: $40,000

Net taxable gain: $27,500

Tax owed: $4,125. Without any harvesting, she would have owed $6,000. Total tax saved: $1,875.

Result: Priya reduced her tax bill by nearly one-third without changing her investment strategy or taking on additional risk. She reinvested the tax savings into her portfolio, compounding the benefit.

Who Benefits Most from Tax Loss Harvesting?

Not everyone gains equally. The strategy is most valuable for:

High-Income Earners

The higher your tax bracket, the more each dollar of loss is worth. If you're in the 37% bracket and harvest $10,000 in short-term losses that offset short-term gains, you save $3,700. Someone in the 12% bracket saves $1,200 from the same harvest.

Investors with Taxable Accounts

Tax loss harvesting only works in taxable brokerage accounts. You cannot harvest losses in IRAs, 401(k)s, or other tax-deferred accounts because gains and losses inside those accounts aren't taxed annually.

Investors with Concentrated Gains

If you sold a business, exercised stock options, or sold real estate with large gains, harvesting portfolio losses can directly offset those gains. A $100,000 gain from a business sale can be reduced by $30,000 in harvested losses, saving $4,500 to $7,500 depending on the gain type and your bracket.

Active Rebalancers

If you rebalance your portfolio regularly—say, quarterly or annually—you're already selling positions. Harvesting simply means being intentional about which positions you sell and when, prioritizing those with losses.

When NOT to Harvest

Tax loss harvesting isn't always the right move. Avoid it when:

You're in a Low or Zero Capital Gains Bracket

If your income is low enough that your long-term capital gains rate is 0%, harvesting losses has no immediate value. You'd be realizing losses to offset gains that wouldn't have been taxed anyway. Save the harvesting for years when your income is higher.

Transaction Costs Exceed the Benefit

If you're harvesting $200 in losses but paying $50 in commissions and fees to execute the trade, you're netting $150 in deductions. At a 22% tax rate, that's a $33 tax saving—less than the trading cost. Most modern brokerages have zero-commission trading, but if yours doesn't, factor this in.

You'll Trigger a Wash Sale and Can't Avoid It

If you can't find a suitable replacement security and can't afford to be out of the market for 31 days, don't harvest. A disallowed wash sale provides zero benefit and creates accounting complexity.

You're Harvesting Short-Term Losses with No Short-Term Gains

Short-term losses offset short-term gains first, which are taxed at ordinary rates. If you have no short-term gains and only long-term gains, the short-term loss will net against the long-term gain—but it would have been better to harvest a long-term loss instead, preserving the short-term loss for future years when short-term gains appear. Prioritize harvesting losses that match your gains.

Advanced Strategies

Daily Automated Harvesting

Robo-advisors like Betterment and Wealthfront scan portfolios daily for harvesting opportunities. The algorithm sells positions with losses and immediately buys similar replacements, often capturing small losses (1-3%) that would disappear if you waited. Over a full year, this can harvest $5,000 to $15,000 in losses from a $100,000 portfolio during volatile markets.

Specific Lot Identification

If you've purchased the same security at different times and prices, you can choose which specific shares to sell. This is called specific identification (as opposed to FIFO, LIFO, or average cost methods).

Specific Lot Selection

You own three lots of the same ETF:

  • Lot 1: 50 shares bought at $100 (current value: $90) — $500 loss
  • Lot 2: 50 shares bought at $95 (current value: $90) — $250 loss
  • Lot 3: 50 shares bought at $85 (current value: $90) — $250 gain

If you sell 50 shares without specifying the lot, your broker will use its default method (often FIFO). But if you specify "Lot 1," you realize a $500 loss. If you specify "Lot 3," you realize a $250 gain. By choosing Lot 1, you maximize the tax benefit.

Most brokerages allow specific lot selection at the time of sale. Enable this feature and use it deliberately.

Pairing with Roth Conversions

If you're converting a traditional IRA to a Roth IRA, the converted amount is treated as ordinary income. Harvesting capital losses in your taxable account can offset other income, reducing your overall tax bill in the year of the conversion. This is sophisticated tax coordination—consider consulting a CPA.

Record-Keeping and Reporting

Every harvested loss must be reported on IRS Form 8949 (Sales and Other Dispositions of Capital Assets) and Schedule D (Capital Gains and Losses) when you file your taxes. Your brokerage will send you a Form 1099-B detailing every sale.

Keep a personal log of:

  • Date of each sale
  • Security sold and quantity
  • Purchase price (cost basis) and sale price
  • Realized gain or loss
  • Replacement security purchased (to document wash sale avoidance)

If you're carrying forward losses from prior years, those appear on line 6 of Schedule D. The IRS tracks this automatically from year to year, but keep your own records as backup.

State Tax Considerations

Most states that impose income tax follow federal rules for capital gains and losses, meaning harvested losses reduce your state tax liability as well. However, a few states have quirks:

  • California, New York, New Jersey: High state income tax rates amplify the benefit of harvesting. A $10,000 loss can save $1,000+ in state tax on top of federal savings.
  • States with no income tax (Texas, Florida, Washington, etc.): You still benefit federally, but there's no additional state-level savings.
  • Pennsylvania: Does not allow capital losses to offset other income, only capital gains. The $3,000 ordinary income deduction doesn't apply at the state level.

Check your state's rules or consult a local tax professional if you're in a high-tax state.

Common Mistakes to Avoid

Mistake 1: Buying Back Too Soon
Repurchasing the same security within 30 days triggers a wash sale, disallowing the loss. Set calendar reminders or use substitute securities to maintain exposure.
Mistake 2: Forgetting Other Accounts
Wash sales apply across all your accounts, including IRAs and spousal accounts. Coordinate purchases across every account you control.
Mistake 3: Harvesting Trivial Amounts
Harvesting $100 in losses to save $15 in taxes may not justify the time and attention. Focus on material losses—generally $1,000 or more.
Mistake 4: Ignoring Holding Period
Selling a position held 364 days realizes a short-term loss (offsets ordinary-rate gains). Waiting one more day makes it long-term. If you have no short-term gains, wait for long-term treatment.
Mistake 5: Letting the Tax Tail Wag the Dog
Don't harvest losses on an investment you actually want to keep long-term just for a small tax benefit. The goal is tax efficiency within your investment strategy, not replacing it.
Mistake 6: Not Tracking Carryforwards
If you harvest $20,000 in losses but only use $8,000 this year, the remaining $12,000 carries forward. Keep a running tally so you know how much you have available for future years.

Tax Loss Harvesting vs. Portfolio Rebalancing

These two strategies work beautifully together. Rebalancing means selling assets that have grown beyond their target allocation and buying assets that have shrunk below it. When rebalancing, you often need to sell winners (realizing gains) and buy losers (which may have unrealized losses).

Instead of selling the losers, harvest them. Sell to realize the loss, then buy back a similar security after 31 days or use a substitute. This way, you rebalance the portfolio and generate tax deductions simultaneously.

Integrated Strategy

Your portfolio is 70% stocks, 30% bonds. Stocks have surged, and the allocation is now 80/20. To rebalance, you sell stocks (likely at a gain) and buy bonds. Before selling the stocks, check if any stock positions are underwater. Harvest those first, realize the losses, then sell the gainers. The losses offset the gains, reducing the tax cost of rebalancing.

How Much Can You Really Save?

The dollar value of tax loss harvesting depends on three factors: the size of your portfolio, the volatility of your holdings, and your tax rate. Studies suggest that disciplined harvesting can add 0.5% to 1.5% per year to after-tax returns.

On a $500,000 portfolio, that's $2,500 to $7,500 per year in additional value. Compounded over 20 years, the cumulative benefit can exceed $100,000.

The benefit is highest in the first few years of building a portfolio (when you have many small lots purchased at different prices) and during bear markets (when losses are plentiful).

"Tax alpha—the return added purely through tax efficiency—is one of the few sources of outperformance that doesn't require taking additional risk. It's free money, assuming you're disciplined enough to capture it."

Tools and Automation

Manual tax loss harvesting requires continuous monitoring, lot tracking, and wash sale management. For most investors, automation makes sense.

Robo-Advisors

Platforms like Betterment, Wealthfront, and Schwab Intelligent Portfolios offer automated tax loss harvesting. They scan your portfolio daily, harvest losses algorithmically, and handle all the wash sale avoidance and lot tracking. Fees range from 0.25% to 0.50% annually.

Rokerage Tools

Many traditional brokerages (Fidelity, Vanguard, Schwab) provide tax loss harvesting alerts or reports showing which positions have unrealized losses. You execute the trades manually, but the tools identify the opportunities.

Tax Software Integration

Tax software like TurboTax and H&R Block automatically import 1099-B data from brokerages and populate Form 8949 and Schedule D. Ensure your brokerage's data feed is compatible to avoid manual entry errors.

Final Rules of Thumb

  • Harvest systematically, not emotionally. Don't wait for a crash. Monitor quarterly and harvest whenever losses appear.
  • Avoid wash sales at all costs. Use substitute securities or wait 31 days. A disallowed loss is worthless.
  • Prioritize large losses first. A $5,000 loss is worth more attention than five $200 losses.
  • Match loss character to gain character. Harvest short-term losses when you have short-term gains; harvest long-term losses when you have long-term gains.
  • Track everything. Maintain a spreadsheet of all harvested losses, carryforwards, and replacement purchases.
  • Coordinate with your tax advisor. If you have complex situations (business sales, stock options, real estate), professional guidance ensures you maximize the benefit.
Key Takeaways
  • Tax loss harvesting converts portfolio losses into tax deductions, reducing capital gains tax or ordinary income tax by up to $3,000 per year.
  • Losses offset gains first. Excess losses (up to $3,000) can reduce ordinary income, with remaining losses carrying forward indefinitely.
  • The wash sale rule disallows losses if you buy the same or substantially identical security within 61 days (30 before or after the sale).
  • Use substitute securities to maintain market exposure while avoiding wash sales—sell VOO, buy IVV; sell Microsoft, buy Google.
  • Harvesting is most valuable for high-income earners, investors with taxable accounts, and those with concentrated capital gains.
  • Systematic, year-round harvesting (or automated daily harvesting via robo-advisors) captures more value than waiting for year-end.
  • Track all harvested losses, replacement securities, and carryforwards meticulously—errors can disallow deductions or trigger audits.
  • Tax loss harvesting can add 0.5-1.5% annually to after-tax returns—compounded over decades, this is substantial wealth preservation.

Quick Knowledge Check

Test your understanding of tax loss harvesting

Question 1 of 5: You sell Stock A at a $5,000 loss and Stock B at a $3,000 gain. What is your net capital position for the year?

Question 2 of 5: You sell a stock at a $2,000 loss on December 10. What is the EARLIEST date you can repurchase the same stock without triggering a wash sale?

Question 3 of 5: This year you have $8,000 in capital losses and $2,000 in capital gains. How much can you deduct against ordinary income?

Question 4 of 5: Which of the following is LEAST likely to trigger a wash sale?

Question 5 of 5: You harvested $15,000 in losses this year but only had $6,000 in gains. You used $3,000 to offset ordinary income. What happens to the remaining $6,000 in losses?

Your Results

You scored 0 out of 5