Insights

How Can ETFs Help Investors Avoid The Wash Sale Rule?

Written by Motley Fool Asset Management | Friday, January 23, 2026

Selling an investment at a loss can be smart tax planning—but only if you don’t accidentally give the tax benefit back. That’s where the wash sale rule comes in, and it’s a rule that often shows up when investors are tax-loss harvesting or rebalancing a portfolio.

The wash sale rule applies when you sell a holding at a loss in a taxable account and then reinvest in a similar security. It becomes especially important if you’re actively harvesting losses, since frequent trades increase the chances of running into it.

At the heart of the rule is one key requirement: you can’t buy the same (or a "substantially identical") security within a specific window around the sale. This is where ETFs can be especially useful. With such a wide range of ETFs available, investors can often find funds that offer similar exposure without being considered substantially identical. That flexibility can make it easier to stay invested and maintain your asset allocation, without violating the wash sale rule.

What is the wash sale rule?

The wash sale rule states that if you sell a security at a loss, you cannot purchase the same or a substantially identical security within 30 days before or after the sale.1 When you include the day of the sale itself, the total wash sale window is 61 days.

What qualifies as "substantially identical" can be unclear and, in some cases, open to interpretation. An obvious example would be selling shares of IBM at a loss and then repurchasing IBM shares within that 61-day window.

Where things get murkier is with funds. In general, selling one ETF and buying another ETF from a different issuer that tracks the same index could be considered substantially identical—but in practice, these transactions aren’t always treated as wash sales.

For example, selling an index mutual fund at a loss and buying an ETF that tracks the same or a similar index is generally not considered a wash sale. Likewise, selling an S&P 500 ETF at a loss and buying an ETF that tracks a total stock market index or a different large-cap index is typically not a violation.

Edge cases to consider

The wash sale rule isn’t exactly cut-and-dried. There are several edge cases that can easily trip up investors.

  • Different accounts still count: The rule applies across accounts, not just within a single one. For instance, selling a security at a loss in your taxable account and then buying it back in your IRA or 401(k) within the 61-day window would violate the rule. In that case, the loss in the taxable account would no longer be deductible.

    This can be especially easy to miss if part of your regular 401(k) contributions are automatically going into the same security you sold at a loss. If that’s the case, you’ll need to pause those contributions during the wash sale period.
  • Calendar years don’t matter: The wash sale rule isn’t limited by year-end. It’s governed strictly by the 61-day window. A sale on December 17, for example, extends the wash sale period into January. Likewise, a sale in early January reaches back into December of the prior year.
  • Spousal accounts count too: You also can’t sidestep the rule by buying the security in a spouse’s account. Purchases in a spouse’s IRA or taxable account during the wash sale window can still trigger a violation.
  • Multiple sales don’t erase earlier losses: If you sell additional shares of the same or a substantially identical security at a loss during the wash sale period, that doesn’t undo the original loss. Instead, it simply starts a new wash sale window for the additional sale.

What happens if you violate the wash sale rule?

Suppose you sell shares of Salesforce (CRM) at a $20,000 loss in a taxable account on November 19, 2025, and then buy CRM shares in your IRA on December 3. That purchase would violate the wash sale rule, and the $20,000 loss would no longer be deductible.

When a wash sale occurs following a taxable sale, a few things happen:

  • The capital loss deduction is disallowed.
  • If the replacement security is purchased in a taxable account, the disallowed loss is added to the cost basis of the new investment. This raises your basis and can reduce future capital gains.
  • If the replacement security is purchased in an IRA or other retirement account, there is no basis adjustment. The loss is simply lost for tax purposes.

How ETFs can help avoid wash sale issues

ETFs can be especially helpful in several common situations.

Selling a stock and buying a related ETF


Selling an individual stock at a loss and purchasing an ETF that tracks a related sector or benchmark is not considered a wash sale. A technology stock, for example, is not substantially identical to a technology-focused ETF, whether that ETF tracks a broad technology index or a more focused segment of the sector.

While these ETFs provide exposure to the same general area of the market, they are distinct securities and are not treated as the same as the individual stock for wash sale purposes.

Replacing an index fund with a similar, but different, ETF


Selling an S&P 500 fund and purchasing an ETF that tracks a different large cap or total market index is generally not considered a wash sale. 

Although these funds are heavily weighted toward large cap stocks, they are not considered substantially identical, reducing ambiguity around wash sale treatment.

Offsetting an active mutual fund with an ETF


Selling an actively-managed mutual fund at a loss and purchasing a passive ETF that tracks a related index is generally not considered a wash sale. An actively-managed small cap mutual fund, for example, is not substantially identical to an ETF tracking a small cap index such as the Russell 2000.

Similarly, an actively-managed ETF with a different strategy and holdings than the mutual fund sold would not be considered substantially identical under the wash sale rule.

The bottom line

With the sheer variety of ETFs available today—covering broad markets, specific sectors, and even active strategies—it’s often possible to find a replacement investment that keeps you invested without crossing the wash sale line. For investors who actively tax-loss harvest, ETFs can be one of the most flexible tools for staying aligned with their portfolio strategy while avoiding unnecessary tax headaches.