The wash sale rule applies to ETFs exactly as it applies to stocks. If you sell an ETF at a loss and buy the same or a "substantially identical" security within 30 days before or after the sale, the IRS disallows the loss for now. The loss is not gone. It is pushed into the cost basis of the shares you bought, so you recover it later. The real risk is not the rule itself but the purchases nobody warns you about: a second account, an IRA, a reinvested dividend. A rules-based portfolio where every buy and sell is decided in advance makes those traps easier to manage, and we show how below.
TL;DR
- The wash sale window is 61 days: 30 days before the loss sale, the day of the sale, and 30 days after (26 U.S.C. § 1091).
- Buying the same ETF, or one the IRS could treat as substantially identical, inside that window defers your loss rather than letting you deduct it.
- Purchases in an IRA or Roth IRA can disallow the loss for good, with no basis added in the IRA (Revenue Ruling 2008-5).
- Your broker reports only same-account, same-CUSIP wash sales, so you must check other accounts yourself (Form 1099-B instructions).
- The IRS has not published a list of ETF pairs that are safe to swap, so keep your replacement choices defensible and documented.
Table of Contents
- What the wash sale rule says
- What counts as a purchase
- The IRA trap
- What happens to the loss in a normal wash sale
- How "substantially identical" applies to ETFs
- A practical routine for avoiding accidental ETF wash sales
- Keep records you can reconstruct
- Why a rules-based portfolio helps with wash sale control
- Where StockPilot fits
- FAQ
- Sources
What the wash sale rule says
Congress wrote the rule to stop investors from selling a security to book a tax loss while keeping the same position. Under Internal Revenue Code section 1091, a loss on a sale is disallowed when you acquire substantially identical stock or securities during the period that begins 30 days before the sale and ends 30 days after it. The SEC's investor education site describes the same timing and notes that losses tied to wash sales cannot be deducted, even when the repurchase came before the sale.
That is why people call it the 61-day rule. Count 30 days back, the sale day itself, and 30 days forward. A purchase anywhere in that stretch can matter.

The rule treats ETFs as securities like any other. An ETF share you sell at a loss is a loss disposition. A share of that ETF, or something substantially identical to it, bought inside the window is a replacement purchase.
What counts as a purchase
IRS Publication 550, the agency's guide to investment income and expenses, lists the situations that can create a wash sale. They include:
- Buying substantially identical securities outright.
- Acquiring them in a fully taxable trade.
- Acquiring a contract or option to buy them.
- Having an IRA or Roth IRA acquire them.
It is easy to think only of the obvious case: you sell, then click buy on the same ticker. The less obvious ones cause most surprises. Consider three:
Automatic dividend reinvestment. A reinvested dividend is a purchase of shares. If your loss sale falls within 30 days of a reinvestment in the same fund, the general statutory test applies to that purchase. Publication 550 does not single out reinvestment, so the safe habit is to turn reinvestment off in the position you are harvesting until the window has passed.
Another taxable account. The rule follows you, not the account. A purchase in a joint or second brokerage account you control can still count, even though neither broker sees the other side.
Your IRA. This one is the costliest, covered next.
The IRA trap
In Revenue Ruling 2008-5, the IRS held that if you cause your IRA or Roth IRA to buy substantially identical securities within 30 days before or after your loss sale, the loss is disallowed. The IRA is a tax-exempt trust, yet the ruling treats its purchase as your acquisition for section 1091.
The key difference is what happens to the loss. In a normal taxable wash sale, the disallowed loss is added to the basis of the replacement shares. In the IRA case, the IRA's basis is not increased for it. The tax benefit of that loss is not deferred, it is simply lost.
A worked example: you sell 200 shares of an ETF in a taxable account for a $2,000 loss. Two weeks later your automatic monthly IRA contribution buys 50 shares of the same ETF. The loss on those 50 shares' worth of the sale is disallowed, and because the buy happened in the IRA, nothing is added back anywhere.
If you invest through both taxable and retirement accounts, treat them as one portfolio for wash sale purposes.
What happens to the loss in a normal wash sale
For a replacement purchase in a taxable account, Publication 550 explains that the disallowed loss is added to the basis of the replacement securities. The loss is generally deferred until you dispose of those replacement securities.
Partial wash sales work proportionally. The Form 1099-B instructions give an example: if you sell 100 shares at a loss and buy 75 replacement shares in the window, only the loss attributable to those 75 shares is disallowed, and that amount goes into the basis of the replacement shares. The remaining loss on 25 shares is still deductible. Section 1091 also contains the matching rules for cases where you buy fewer, or at least as many, shares as you sold.
Here is a simple illustration with made-up numbers:
| Step | Result |
|---|---|
| Buy 100 shares at $50 | Basis $5,000 |
| Sell all 100 at $42 | Loss of $800 |
| Buy 100 shares at $43 within 30 days | Wash sale |
| Loss allowed this year | $0 |
| New basis in replacement shares | $4,300 plus $800 disallowed loss = $5,100 |
You do not lose the $800. You carry it inside the new basis and it reduces your gain, or increases your loss, when you finally sell the replacement shares in a transaction that is not itself a wash sale.
How "substantially identical" applies to ETFs
This is where ETF investors want certainty, and the IRS does not give it. Publication 550 says whether securities are substantially identical depends on all the facts and circumstances. It does not publish a list of safe ETF pairs or a rule for funds that track the same index.
Professional commentary points the same way. A July 2026 analysis in The Tax Adviser notes that the IRS has not defined the term and cautions that the share of an ETF's holdings in a stock you sold at a loss could draw questions.
In practice, that gives you a spectrum:
- Clearly identical: the same ticker, or a share class of the same fund. Treat these as a wash sale every time.
- Gray area: two funds from different sponsors that track the same index. They are the closest to the line, so many investors avoid relying on them.
- More distinct: funds tracking different indexes, with clearly different holdings and methodology. These carry less risk, although the IRS has not blessed any pair.
If you want to keep market exposure while a loss sits in the 61-day window, the more your replacement differs in index and holdings, the easier it is to defend. Write down why you chose it. Then you can explain the position if anyone asks.
A practical routine for avoiding accidental ETF wash sales
This is the routine that keeps most investors out of trouble.
- Mark the window. When you sell at a loss, put the 30-day-before and 30-day-after dates on your calendar. Look backward too: a purchase in the prior 30 days counts.
- List every account. Include taxable, joint, IRA, Roth IRA and any account a spouse controls that you could be tied to. Your broker will not look across them.
- Pause automatic buys. Turn off dividend reinvestment and scheduled contributions for the fund you sold until the window closes.
- Choose the replacement deliberately. If you stay invested through a different fund, pick one whose index and holdings are clearly different, and record the reason.
- Reconcile at tax time. Compare your broker's 1099-B with your own trade log for every account.
Step 5 matters because the reporting rules are narrow. The Form 1099-B instructions require brokers to report a wash sale loss in box 1g when the sale and purchase are in the same account and involve covered securities with the same CUSIP. Brokers may report other disallowed losses but are not required to. A clean 1099-B therefore does not prove you had no wash sales.
Keep records you can reconstruct
For each loss sale, keep the trade date, shares, proceeds, original cost, and a list of every purchase of the same or a similar fund in the 61-day window across all your accounts. Save the confirmations. If a wash sale does turn up later, the work is to adjust the basis of the replacement shares and the loss you claimed, which is far easier with a log than from memory. If you have already filed a return that deducted a disallowed loss, talk to a CPA or enrolled agent about whether to amend it.
Why a rules-based portfolio helps with wash sale control
Wash sales happen most to investors who trade on impulse: a panic sale, a regretful rebuy, a dividend reinvested without thinking. A portfolio run by predefined rules removes much of that. StockPilot's model portfolio holds 19 positions, six income-producing and 13 AI-selected growth positions, and the system issues after-hours buy and sell alerts only when its predefined investment and risk criteria call for a change. During unfavorable market conditions it can reduce growth exposure and shift capital toward Treasury ETFs as part of its risk management.

Because subscribers mirror those trades in their own brokerage accounts, you keep complete control of every trade and every account. That is the right setup for wash sale discipline: you decide where each trade is placed, you can see the whole picture, and you can check any alert against your calendar before you act. A short list of trades, announced after hours, is also easier to log than a stream of daily picks. Our guide to avoiding the 61-day wash sale walks through the harvesting side in more depth, and our piece on executing after-hours buy and sell signals shows how the alerts reach you.
If part of your portfolio sits in Treasury funds, see how Treasury ETF taxes work at the federal and state level before you plan a harvest there.
Our view
We built StockPilot for investors who want a disciplined process instead of constant decisions. Tax rules like the wash sale rule punish the opposite: scattered trades, several accounts and automatic purchases nobody tracks.
A fixed 19-position model, with six income positions and 13 growth positions, gives you a clear list to mirror and a clear record of what changed and when. Alerts arrive after hours, only when the criteria call for a portfolio change, so you can look at your calendar and your other accounts before placing a trade.
You keep custody and control of your own accounts. We think that is the best foundation for tax awareness: you see every account, you place every trade, and the process behind each trade is written down in advance.
David Elliot
Where StockPilot fits
StockPilot Premium costs $147 per month. You get the daily 19-position model portfolio, after-hours buy and sell alerts, position sizing guidance, automated risk management during downturns and performance analytics, all executed in your own brokerage account without StockPilot taking custody. If you want a structured portfolio that grows and pays income, with a list of trades you can match against your tax calendar, StockPilot Premium is built for that.

Subscribers who also want to review how dividends are taxed can read our 2026 dividend tax rules, and retirees can see how 19 mirrored positions fit a tax-aware plan.
FAQ
Does the wash sale rule apply to ETFs?
Yes. Section 1091 covers stock and securities, and ETF shares are securities. Selling an ETF at a loss and buying the same or a substantially identical one within 30 days before or after the sale disallows the loss for that year. The loss is added to the basis of the replacement shares.
Can I swap into a similar ETF without a wash sale?
The IRS has not defined "substantially identical" for ETFs and gives no approved list. It decides based on facts and circumstances, so two funds tracking the same index are the closest to the line. A fund tracking a different index with different holdings is easier to defend. Record your reasoning.
What happens if I accidentally trigger a wash sale?
In a taxable account, the disallowed loss is added to the basis of the replacement shares, so you recover it when you sell them. If the replacement was bought in your IRA or Roth IRA, the loss is disallowed and the IRA's basis does not increase. If you already deducted the loss, ask a CPA or enrolled agent whether to file an amended return.
Will my broker catch every wash sale?
No. Brokers must report wash sales only when the sale and purchase are in the same account and involve covered securities with the same CUSIP. Purchases in other accounts, including your IRA, may not appear on your 1099-B, so compare your records across all accounts.
Sources
- 26 U.S.C. § 1091: Loss from wash sales of stock or securities
- IRS Publication 550 (2025)
- Investor.gov: Wash Sales
- IRS Internal Revenue Bulletin 2008-3 (Revenue Ruling 2008-5)
- Instructions for Form 1099-B (2026)
- The Tax Adviser: Tax planning for exchange-traded funds
