The Wash Sale Rule With ETFs: Can You Swap One S&P 500 Fund for Another?
Does the wash sale rule apply to ETFs? Yes. Here's the 30-day window, the gray area on same-index funds, DRIP traps and a tax-loss harvesting example.

The short version
- Yes, the wash sale rule applies to ETFs. If you sell at a loss and buy the same or a substantially identical fund within 30 days before or after, the loss is disallowed for now.
- Swapping to a fund that tracks a different index is the commonly used safer route. Swapping to another fund tracking the exact same index is a gray area, because the IRS has not drawn a clear line for funds.
- Dividend reinvestment (DRIP) buys, purchases in your IRA and purchases by your spouse can all trigger a wash sale without you realizing it.
Yes, the wash sale rule applies to ETFs, because the IRS treats an ETF share like any other security. If you sell an ETF at a loss and buy the same fund, or one that is "substantially identical," within 30 days before or after the sale, you cannot claim that loss on your taxes right away. Whether two different funds tracking the same index count as substantially identical is not settled, so the cleanest swap is into a fund that follows a different index.
This guide walks through exactly how the rule works, what the 61-day window really is, where the gray area sits, and a worked example of tax-loss harvesting with real dollar amounts. This is education, not tax advice. Your situation may differ, so confirm details with a tax professional.
What a wash sale actually is
A wash sale happens when you sell a security at a loss and, close to that sale, you buy the same security or one that is substantially identical. The rule exists to stop people from selling a loser, claiming the loss, and buying right back in as if nothing happened.
Here's the thing most people miss: the window runs in both directions. It covers the 30 days before the sale, the day of the sale, and the 30 days after. That is a 61-day stretch centered on your sale date.
The rule only matters for losses. If you sell at a gain, there is no wash sale. You owe tax on the gain as normal, and you can buy back whenever you like.
What happens to the loss if it is a wash sale
In a typical case, the loss is not erased. It is deferred. The disallowed loss gets added to the cost basis of the replacement shares, and your holding period carries over from the shares you sold. So you get the benefit later, when you eventually sell the replacement shares (assuming you sell them outside of another wash sale).
There are two wrinkles worth knowing:
- Partial wash sales. If you sell 100 shares at a loss and rebuy only 40 within the window, generally only the loss on those 40 shares is disallowed. The rest counts normally.
- Only the loss lot matters. The rule looks at the shares you sold at a loss. Shares you sold at a gain are not affected.
The gray area: can you swap one S&P 500 fund for another?
This is the question behind most searches on this topic. Say you own VOO (Vanguard S&P 500 ETF) at a loss. Can you sell it and buy another S&P 500 fund from a different company, like IVV or SPY, the same day?
Honest answer: nobody can promise you yes. The IRS has not published a clear test for when two funds are "substantially identical." It has long said that stock in one company is not identical to stock in a different company, and that is where the comfortable guidance ends. For funds that track the exact same index, with nearly the same holdings and results, many tax professionals take the cautious view that it could be treated as substantially identical. Others see it differently because the funds have different issuers and legal structures.
I'm not going to tell you which side is right, because the rule is unsettled. What I will say is this: if you want certainty, do not lean on the gray area. Pick a replacement that clearly differs.
Safer swaps: funds that track a different index
The widely used approach is to swap into a fund that tracks a different index but gives you similar broad exposure. A few general examples:
- S&P 500 fund out, total U.S. stock market fund in (for example, a fund like VTI). Different index, much overlap, similar role in your portfolio.
- S&P 500 fund out, a large-cap growth or Nasdaq-100 fund in, such as QQQ, which has $476B in assets. Different index, but the exposure is tilted more heavily toward tech and growth, so it behaves differently.
- A dividend-focused fund like SCHD in place of a broad market fund. Different index and a different style, so your portfolio would shift.
The trade-off is real. The more similar the replacement, the more likely it is to raise a question. The more different it is, the more your portfolio drifts away from what you actually wanted to own. Even a different index is not an ironclad guarantee, it is just the lower-risk choice that most people use.
You can compare options in the ETF screener. For the example above, the original fund's fee is tiny: VOO charges 0.03%. When you swap, check that the replacement's fee is not much higher, since a fee gap eats into returns every year.
Step by step: how to harvest a loss without tripping the rule
- Check your holding period and loss. Look at the specific tax lot, not just the fund. Your broker shows cost basis per lot.
- Look back 30 days. Did you buy more of this fund in the last 30 days, including through dividend reinvestment? If so, the sale could be a wash sale.
- Turn off DRIP on the fund before you sell, so no reinvestment lands inside the window.
- Check every account. Include your IRA, 401(k), a spouse's accounts and any other brokerage. The rule looks at you, not at one account.
- Sell the loss lot. Count the 30 days from the trade date.
- Buy the replacement in a fund that tracks a different index, or wait more than 30 days to buy back the original.
- Do not buy the original back for at least 31 days after the sale, and do not let any automatic purchase sneak in.
- Keep records. Save the confirmations and note the dates for tax time.
Selling takes a day or two to settle. If you need a refresher on timing, see how long an ETF sale takes to settle.
Worked example: a $1,500 loss
Here's a simple hypothetical. All numbers are assumptions to show the math, not fund data or predictions.
Assume you bought $10,000 of an S&P 500 ETF in a taxable account. It has dropped, and your position is now worth $8,500. That is a $1,500 unrealized loss. Assume you also have a $1,500 long-term gain elsewhere, and a 15% long-term capital gains rate.
| Scenario | Rebuy | Loss claimed | Tax effect |
|---|---|---|---|
| A: wait 31 days | Same fund | $1,500 | Saves about $225 |
| B: swap to different index | $8,500 total market fund | $1,500 | Saves about $225 |
| C: buy back on day 10 | Same fund | $0 for now | Loss added to basis |
In scenario C, the new shares' basis becomes $10,000 ($8,500 paid plus the $1,500 disallowed loss). You do not lose the $1,500, you just push it into the future. That is a deferral, not a disaster, but it defeats the reason you sold.
Also notice that in scenario B the savings is $225 and not $1,500. A loss is worth your tax rate on it, not the full amount. If you have no gains to offset, losses can generally reduce a limited amount of ordinary income each year (currently $3,000, but confirm the current figure), with the remainder carried forward. For how gains and dividends get taxed even if you never sell, see do you pay taxes on ETFs every year.
The traps that catch careful people
DRIP purchases
A dividend reinvestment plan buys more shares automatically every time the fund pays. Those are purchases, and they can land inside your 61-day window. If VOO pays quarterly and your DRIP buys shares 12 days before you sell the old shares at a loss, part of your loss can be disallowed. The disallowed part is based on the shares the reinvestment bought. It is usually small, but it is real. Read more on the mechanics in how ETF dividends work.
Buying in your IRA
Selling at a loss in a taxable account and then buying the same fund inside your IRA can trigger a wash sale. The painful part is that the IRS has taken the position that the loss is then not added to your IRA basis, so you may never get it back. Be extra careful here.
Your spouse's account
Purchases by your spouse can count against you. Treat the household as one investor for this rule.
Different brokers
Your broker's 1099-B generally tracks wash sales on the same security in the same account. It does not see your other brokers or your IRA. The responsibility to catch those is yours.
Automatic investing plans
Monthly auto-buys into the fund you sold will quietly repurchase inside the window. Pause them before you sell.
Common mistakes
- Counting only 30 days after the sale. The 30 days before count too.
- Forgetting reinvested dividends. DRIP buys are purchases.
- Assuming a different ticker means a different security. Two funds on the same index may or may not be treated as different. Don't treat it as a sure thing.
- Ignoring other accounts. The IRA is the classic one.
- Selling in late December and buying back in early January. The window still crosses the year end and the rule still applies.
- Letting the tax tail wag the dog. A replacement fund that does not fit your plan can cost you more than the tax benefit saves.
Quick checklist
- Is the sale actually at a loss, by tax lot?
- Any purchases of this fund in the prior 30 days, including DRIP?
- Auto-investing and DRIP paused?
- IRA, 401(k) and spouse's accounts checked?
- Replacement tracks a different index, or I am waiting 31 days?
- Dates and confirmations saved?
If you want to see how a swap changes the shape of a portfolio, the TopETFs calculators and GrowthETFs.com can help you compare broad market and growth options. If you are new to how funds are built, start with how an ETF actually works.
FAQ
Does the wash sale rule apply to ETFs?
Yes. ETFs are securities, so selling one at a loss and buying the same or a substantially identical one within the 61-day window can disallow the loss.
Can I sell VOO and buy IVV or SPY right away?
It is a gray area. The IRS has not clearly said whether funds from different issuers tracking the same index are substantially identical. If you want certainty, choose a fund tracking a different index or ask a tax professional.
Does the wash sale rule apply if I sell at a gain?
No. The rule only disallows losses. Gains are taxed normally no matter when you buy back.
Does a dividend reinvestment trigger a wash sale?
It can. A DRIP purchase within 30 days before or after a loss sale counts as a purchase, which can disallow part of your loss.
Does the 30-day rule apply across different accounts?
Yes. It looks at you across your taxable accounts, IRAs and your spouse's accounts, even though your broker may only track the one account.
How long should I wait before buying the same ETF back?
More than 30 days after the sale, so day 31 or later, and make sure no other purchases of that fund fall in the 30 days before the sale either.
Benjie's bottom line
The wash sale rule is simple to state and easy to trip over in practice. The window is 61 days, it covers DRIP and IRA purchases, and the "same index, different issuer" question is unsettled, so I would not build a plan that depends on it. If you harvest a loss, swapping into a fund on a different index is the common, more cautious route, as long as the replacement still fits what you want to own.
This isn't a buy or sell signal, and I'm not a tax advisor. Do your own due diligence, check your own accounts, and run the specifics by a tax professional before you rely on a loss.
ETFs in this story
How this article was made: Benjie picks every topic based on what he finds useful as a dividend investor and what readers ask about. Parts of this article were drafted with help from AI tools, then edited, fact-checked and shaped by Benjie. All fund numbers come from the TopETFs database and update daily.
Disclaimer: TopETFs.com is published by Dividend Empire LLC for educational and entertainment purposes only. We are not financial advisors, and nothing on this site is financial advice, a recommendation, or a solicitation to buy or sell any security. ETF data is compiled from public sources and fund issuers, may be delayed, inaccurate or outdated, and may differ from the fund sponsor's own figures. Yields are trailing distribution yields, are not guaranteed, and distributions may include return of capital, which reduces your cost basis and is not a measure of performance. Total returns are since each fund's inception unless noted and are not comparable across funds with different start dates. Past performance does not guarantee future results. Investing carries risk, including loss of principal. Read each fund's prospectus and consult a licensed financial advisor before investing. Dividend Empire LLC receives compensation from ETF issuers for sponsored placements, which are labeled as such.


