Disclosure: This post is for informational and educational purposes only. FinanceCompassPro.com may earn compensation through display advertising. We may also reference third-party products, services, or platforms by name for educational purposes – these mentions are not paid endorsements unless explicitly stated. Nothing in this post constitutes personalized financial, legal, tax, or investment advice.

Many beginners think the wash sale rule only catches active traders. That is a costly misunderstanding.
The rule disallows your tax loss if you buy the same or a substantially identical investment within 30 days before or after the sale. If you rebuy in a taxable account, the loss is generally deferred, not erased. It is added to the cost basis of the replacement shares, so you benefit later instead of now. However, if you rebuy in your own IRA or Roth IRA, the loss can be permanently disallowed.
This guide explains the 30-day window, walks through a simple example, and covers the traps beginners miss. If gains and losses are new to you, start with Capital Gains Tax for Beginners first.
Quick Answer
- The rule applies only when you sell at a loss. Gains are not affected.
- The window runs 30 days before through 30 days after the sale. Including the sale day, that is 61 days.
- A disallowed loss is generally added to the basis of the replacement shares. Your holding period generally carries over too.
- Buying inside the window in your own IRA or Roth IRA, or having your spouse buy, can still trigger the rule.
The Wash Sale Rule at a Glance
The table below shows common situations. Each one is a general rule, not a prediction for your tax return.
| Situation | Wash sale? | Why it matters |
|---|---|---|
| Sell at a loss, rebuy the same ETF within 30 days | Yes | The loss is disallowed for now |
| Sell at a gain, rebuy right away | No | The rule only applies to losses |
| Sell at a loss, rebuy 31 or more days later, with no other purchase in the window | Generally no | Purchases in the 30 days before the sale still count |
| Sell at a loss, buy the same fund in your own IRA or Roth IRA within the window | Yes | The loss can be permanently disallowed |
| Sell at a loss, your spouse buys the same fund within the window | Yes | The IRS treats the purchases as linked |
| Reinvested dividends buy shares inside the window | Possibly, in part | Only the matching shares are affected |
| Sell at a loss, buy a different fund | It depends | “Substantially identical” turns on the facts |
How the 30-Day Window Works
Count 30 days before your sale date. Then count 30 days after it. Together with the sale day, that makes a 61-day window. Buying the same or a substantially identical security inside it can trigger the rule.
The window works in both directions. As a result, buying first and selling later can trigger it too. For example, you add shares on June 10 and sell the older shares at a loss on June 25. That purchase falls inside the window.
The window also crosses calendar years. A sale on December 20 and a purchase on January 10 can still be linked.
The rule covers stocks, ETFs, and mutual funds. It can also reach a contract or option to buy the same security.
What Happens to the Disallowed Loss
Here is a simplified example. Assume everything happens in one taxable account, with no fees and no other trades. You buy 100 shares of an ETF for $5,000. The price falls, and you sell all 100 shares for $4,000. That is a $1,000 loss. Ten days later, you buy 100 shares of the same ETF for $4,100.
- Loss you can deduct from the first sale: $0, because the $1,000 loss is disallowed. Selling the replacement shares later in the same year may change the result, provided no further wash sale applies.
- New cost basis: $5,100. That is the $4,100 purchase plus the $1,000 disallowed loss.
- Later sale: if you sell the new shares for $5,500, your gain is $400 instead of $1,400.
So the rule delays the benefit instead of erasing it. However, the delay can still hurt. You may hold the new shares for years before you sell them.
Your holding period generally carries over as well. Therefore, the time you held the old shares can count toward the new ones.
A partial repurchase changes the math. Suppose all 100 shares lost $10 each, and you rebuy only 40 within the window. With no other related purchases, the loss on 40 shares is disallowed. That is $400. The other $600 can still count. If your shares were bought at different prices, the IRS matches specific shares, so the split can differ.

Four Traps That Catch Beginners
Buying in an IRA. Say you sell at a loss in a taxable account. Then you buy the same fund in your own traditional or Roth IRA within the window. The IRS still treats that as a wash sale. Worse, under IRS Revenue Ruling 2008-5, the loss is disallowed and the IRA does not receive the basis adjustment. As a result, the loss can be permanently disallowed.
Your spouse’s purchases. The IRS also applies the rule when your spouse buys the same security. Therefore, check joint plans and your spouse’s accounts before you sell.
Reinvested dividends and automatic buying. Dividend reinvestment can buy shares inside the window. Recurring purchases can do the same. Consider pausing both in that fund before you sell at a loss. However, pausing cannot undo a purchase made in the 30 days before the sale.
Several accounts. Your broker may track wash sales only within one account. You remain responsible for purchases elsewhere, even if your Form 1099-B does not show them.
What Counts as Substantially Identical?
The same ETF is clearly covered. Shares of a different company are generally not. The gray area sits in between. The IRS has not set a precise test for ETFs that track similar indexes.
Therefore, do not assume two funds are safe because they have different issuers. The answer depends on the facts. A tax professional can review your specific pair.
How a Wash Sale Shows Up at Tax Time
Your broker reports sales on Form 1099-B. A broker’s wash sale reporting is generally limited to covered securities with the same CUSIP, purchased in the same account. Purchases in another account, or in your spouse’s account, may not appear. A missing entry does not make the loss deductible. You then report the sale on Form 8949.
For a wash sale, the IRS instructions call for code W in column (f). In column (g), you enter the disallowed loss as a positive number. Tax software usually handles this. If the 1099-B already includes the adjustment, do not enter it twice. Compare the result with your own records.
Losses that are allowed first offset your capital gains. If losses are larger, you can deduct up to $3,000 against other income. The limit is $1,500 if you are married filing separately. Any remainder carries forward.
Does It Matter If You Only Use a Roth IRA or 401(k)?
Often, it matters much less. Losses inside a Roth IRA or 401(k) are not deductible, so there is no tax loss to protect.
The rule becomes important once you also own a taxable account. Taxable Brokerage Account Explained covers how those accounts differ from retirement accounts.
How to Avoid an Accidental Wash Sale
- Review purchases in every account for 30 days before and after the sale. Include IRAs and your spouse’s accounts.
- Consider pausing automatic investing and dividend reinvestment in that fund. Pausing does not undo purchases made before the sale.
- Wait at least 31 days after the sale before buying the same fund again. Also check the 30 days before the sale.
- If you want a replacement fund, ask a tax professional whether it is substantially identical.
- Keep your own record of every purchase and sale date.

Verify Before You Sell
Tax rules change, and your facts may differ. Confirm the details in IRS Publication 550 and the Instructions for Form 8949. A tax professional can apply them to your situation.
The Bottom Line
The wash sale rule disallows a loss when you buy back too soon. In a taxable account, the loss is generally deferred into the new shares’ basis. In your own IRA or Roth IRA, it can be permanently disallowed.
Before you sell at a loss, check every account, pause automatic buying, and count the 61-day window. If you want to harvest losses on purpose, ETF Tax-Loss Harvesting Explained shows how the strategy works.
FAQ
A. Yes. The rule applies to stocks and securities, which include ETFs and mutual funds. However, whether two different ETFs are substantially identical depends on the facts.
A. No. The rule only disallows losses. If you sell at a gain, you report the gain whether or not you buy the investment again.
A. Wait at least 31 days after the sale. However, waiting alone is not enough. A purchase in the 30 days before the sale can also trigger the rule.
A. Often not, in a taxable account. A disallowed loss is generally added to the basis of the replacement shares. However, if you buy the replacement in your own traditional or Roth IRA, the loss can be permanently disallowed.
Disclaimer: Tax rules change and depend on your facts. Confirm current rules with the IRS, your broker, or a qualified tax professional before selling an investment at a loss.