Search
FC MARKETS

Markets, money and the economy, explained for American investors

Taxes & Investing

Tax-Loss Harvesting and the Wash-Sale Rule: A Practical US Guide

Selling investments at a loss can offset capital gains and up to $3,000 of ordinary income a year, but the wash-sale rule can quietly cancel the benefit. This guide explains how harvesting works, the 61-day window, the IRA trap, substantially identical funds, and when harvesting adds little.

Tax forms, a calculator on a smartphone, a pen and a cup of coffee laid out on a dark desk

Tax-loss harvesting means selling an investment in a taxable account for less than you paid, so the realized loss can offset taxable gains and, within limits, ordinary income. Usually the proceeds are reinvested right away in something similar, so the portfolio stays invested. Done well, it turns market declines into a tax asset. Done carelessly, it runs into the wash-sale rule, which can disallow the loss entirely.

How a harvested loss is used

Capital losses are netted against capital gains in the same tax year. After netting:

  1. Net losses offset net gains of the other type (short-term against long-term, and vice versa).
  2. Up to $3,000 of remaining net loss ($1,500 if married filing separately) is deducted against ordinary income such as wages.
  3. Anything left over carries forward to future years with no expiration, keeping its short- or long-term character.

A simple example: an investor realizes $8,000 of long-term gains when rebalancing during the year. A fund bought earlier now shows a $10,000 loss. Selling it offsets the full $8,000 gain and leaves $2,000 that can be deducted against ordinary income that year.

The wash-sale rule

Section 1091 of the Internal Revenue Code disallows a loss if, within 30 days before or after the sale, you acquire substantially identical stock or securities, or a contract or option to acquire them. Counting the sale day, that is a 61-day window.

What happens to the disallowed loss:

  • It is generally added to the cost basis of the replacement shares, and the holding period of the original shares carries over. The loss is deferred, not destroyed, and is recognized when the replacement is eventually sold.
  • Your broker reports wash sales it can identify within the same account on Form 1099-B, but it does not see your other accounts. Tracking across accounts is your responsibility.

Traps that catch careful investors

Automatic reinvestment. A dividend reinvested in the same fund within 30 days of a loss sale is a purchase. It can trigger a partial wash sale on the shares it buys. Many investors switch off reinvestment on positions they plan to harvest.

Buying before you sell. The window runs both ways. Purchasing extra shares two weeks before selling the original lot at a loss can trigger the rule.

Your IRA. The IRS has ruled (Revenue Ruling 2008-5) that buying the replacement shares in your IRA or Roth IRA within the window triggers a wash sale. Because the basis cannot be added to shares inside an IRA, the loss is effectively lost permanently. This also applies to automatic contributions to a retirement account that buy the same fund.

Your spouse. Purchases by a spouse can trigger the rule as well.

Options. Buying call options on the same stock within the window counts as acquiring a contract to buy it.

"Substantially identical": the gray area

The rule clearly applies to buying back the same stock or the same fund. Beyond that, the IRS has not published a bright-line test for funds, and practitioners rely on judgment:

Swap General view among practitioners
Same stock or same fund share class Substantially identical: triggers the rule
Different share classes of the same fund Widely treated as substantially identical
An ETF and a mutual fund from different providers tracking the same index Debated; some investors avoid it, others consider it acceptable
Funds tracking different indexes in the same asset class (for example, two different large-company US indexes) Commonly treated as not substantially identical
Individual stock replaced by a sector fund, or by a competitor's stock Generally not substantially identical

Because this is not settled law, conservative investors choose a replacement fund that tracks a meaningfully different index, then decide after 31 days whether to switch back.

When harvesting adds real value

  • Offsetting realized gains from rebalancing, a concentrated stock sale or fund distributions in the same year.
  • High current tax rates, especially if short-term gains taxed as ordinary income are being offset.
  • Losses on investments you wanted to change anyway, such as an expensive fund you intended to replace with a cheaper one.
  • Heirs and charity. If the replacement shares are eventually donated to charity or held until death and receive a step-up in basis, the lower basis created by harvesting may never be taxed.

When it adds little

  • Inside retirement accounts, where it has no effect.
  • Low current tax rates. If your long-term gains would be taxed at 0% this year, offsetting them saves nothing, and you may prefer to realize gains instead (sometimes called gain harvesting).
  • Small losses with meaningful trading costs or spreads.
  • If it changes your investment plan. Selling a diversified fund and sitting in cash waiting out 31 days exposes you to missing a rebound, which can outweigh the tax benefit.

It is also worth remembering that harvesting usually defers tax rather than eliminating it: the replacement shares have a lower basis, so a larger gain may be taxed when they are sold in the future.

A worked wash-sale example

An investor buys 100 shares of a stock at $50 ($5,000). The price falls to $40, and on November 10 they sell all 100 shares for $4,000, a $1,000 loss. On November 25, still within 30 days, they buy 100 shares back at $42.

  • The $1,000 loss is disallowed for this year.
  • It is added to the basis of the new shares: $4,200 + $1,000 = $5,200.
  • The holding period of the original shares carries over to the new ones.

If the investor later sells the new shares for $5,000, they report a $200 loss at that point. The tax benefit was postponed, not erased. Had they waited until December 11 or later to buy back, the $1,000 loss would have counted in the year of the sale.

A year-end routine

  1. In October or November, review realized gains for the year from your brokerage statements, including expected fund capital gain distributions, which many fund companies estimate in advance.
  2. List positions with unrealized losses in taxable accounts, by lot.
  3. Pick replacements that keep your allocation without being substantially identical.
  4. Check the 61-day window across every account, including IRAs, a spouse's accounts and automatic purchases.
  5. Sell and reinvest before the last trading day of the year. A sale's trade date, not its settlement date, determines the tax year for losses.
  6. Record what you did, so wash-sale questions are easy to answer at tax time.

Some robo-advisors and direct-indexing services harvest losses automatically throughout the year. They can be efficient, but they generally cannot see purchases in your other accounts, so the cross-account check remains yours.

A note on crypto

Under current law the wash-sale rule refers to stock and securities, and the IRS treats most crypto as property rather than securities. Proposals to extend the rule to digital assets have been discussed in Congress, so anyone harvesting crypto losses should confirm the current position with IRS guidance or a tax professional before relying on it.

This article explains US tax rules in general terms and is not tax advice. Consider your own circumstances and consult a tax professional before acting.

Frequently asked questions

What does the wash-sale rule actually do?

If you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed for now. It is generally added to the cost basis of the replacement shares, so the tax benefit is deferred rather than lost, except in cases such as repurchases inside an IRA.

Can I harvest losses in my 401(k) or IRA?

No. Gains and losses inside tax-advantaged retirement accounts are not reported on your tax return, so selling at a loss there produces no deduction. Harvesting only works in taxable accounts.

Is tax-loss harvesting worth it if I have no gains?

Net capital losses can offset up to $3,000 of ordinary income a year, or $1,500 if married filing separately, with any excess carried forward indefinitely. Harvested losses can therefore still be useful, but the value depends on your tax rates now and when the carried-forward losses are eventually used.

Sources

  1. Publication 550, Investment Income and Expenses
  2. Topic No. 409, Capital Gains and Losses

Topics