Blog

What Is Tax-Loss Harvesting?

Selling an investment at a loss can offset taxable gains. Learn the steps, see an example, and avoid wash-sale mistakes.

Reviewed by Warren Wu, CPA
On this page

Key points

  • Realized capital losses offset capital gains first; excess net losses have annual deduction limits.
  • Wash-sale purchases across relevant accounts can postpone or disallow a loss deduction.

Tax-loss harvesting means selling an investment for less than its tax basis so you can use the loss to offset taxable capital gains.

  • Beyond your gains: losses can generally offset up to $3,000 of other income a year ($1,500 if married filing separately), and the rest carries forward.
  • Staying invested: you may then buy a different investment to keep your portfolio on track.

The strategy can lower today’s tax bill, but it does not recover the investment loss.

What is tax-loss harvesting?

The strategy applies to investments in taxable accounts. Selling at a loss inside an IRA does not create a deductible capital loss on your personal return.

No other trades Hold Harvest
Realized gain $10,000 $10,000
Realized loss $0 $5,000
Net taxable gain $10,000 $5,000
Federal tax (15%) $1,500 $750

The immediate federal saving is $750. This illustration assumes the loss is allowed and the affected gains all face the 15% rate. State tax and other federal taxes can change the result.

A $5,000 loss is not a $5,000 tax saving. The saving depends on the tax that would otherwise apply. The IRS capital-gains guide explains how short- and long-term gains and losses are combined.

How do harvested losses hit your tax return?

  1. Losses offset gains first. Short-term and long-term amounts are netted in their respective groups before the groups are combined. This matters because short-term gains usually face ordinary income rates, while long-term gains may face lower rates.
  2. Then other income. If total losses exceed gains, you can generally deduct up to $3,000 of the remaining net loss against other income each year, or $1,500 if married filing separately.
  3. Then the carryforward. Unused losses carry forward.

Report sales on Form 8949 and summarize them on Schedule D.

How does the wash-sale rule erase a harvested loss?

The wash-sale rule generally disallows a loss on stock or securities if you acquire substantially identical stock or securities within 30 days before or after the sale. Including the sale date, that is a 61-day window.

Check all relevant accounts, not just the account where you sold. These can matter:

  • purchases by your spouse,
  • automatic dividend reinvestments, and
  • certain related-party transactions.

A broker’s report may not catch purchases at another firm.

When replacement shares are in a taxable account, the disallowed loss generally increases their cost basis. This usually postpones the deduction rather than permanently eliminating it. Partial replacement purchases can disallow only part of the loss.

Can a purchase inside an IRA trigger a wash sale?

Yes. Buying substantially identical shares in your IRA or Roth IRA within the window can disallow the taxable-account loss.

Unlike a taxable replacement purchase, the IRA does not receive a basis increase for that loss. See Revenue Ruling 2008-5.

What does substantially identical mean for stocks and ETFs?

Repurchasing the same stock is a clear concern. For different securities or funds, the IRS says to consider the facts and circumstances.

  • It does not publish a list of approved ETF replacement pairs.
  • A different ticker or fund issuer alone is not a guarantee.

Choose a replacement based on both the tax rules and your intended portfolio exposure.

What is a cost-basis reset?

After a valid harvest, your replacement investment has its own purchase cost. In the example above, investing the $7,000 proceeds in a different fund gives that fund a $7,000 starting basis.

If it later grows to $12,000 and you sell, you have a $5,000 gain. The earlier loss reduced tax today, but it can also leave more taxable gain for later.

The benefit can come from postponing tax or using a loss at a higher tax rate than the later gain. Both sides of the trade count, and this year’s deduction is only one of them.

Before selling, compare the expected tax benefit with trading costs, time out of the market, and any change in investment risk. It may be less useful when you can already realize gains at a 0% rate or expect a higher tax rate on a later sale.

Before you place a trade

  1. Check your realized gains and existing loss carryforwards.
  2. Choose the specific lots to sell.
  3. Review purchases across relevant accounts.
  4. Decide what you would buy instead.
  5. Estimate the tax saved now and what a lower replacement basis could mean later.

Frequently asked questions

Tax and financial planning in one place