Skip to content
On this page
  1. Key Takeaways
  2. What a Wash Sale Substantially Identical Test Is
  3. The Intuition
  4. How It Works
  5. Worked Example
  6. Common Mistakes
  7. Frequently Asked Questions
  8. Sources
  9. Disclaimer
← All concepts
Tax & AccountsAdvanced5 min read

Wash Sale: What Counts as Substantially Identical

A wash sale of substantially identical securities disallows a tax loss when you sell a security at a loss and buy something **substantially identical** within a 61-day window. The wash sale substantially identical test is the hinge of the entire rule, and it decides whether your loss survives or gets deferred into the new shares.

Key Takeaways

  • A wash sale disallows a loss if you buy substantially identical securities within 30 days before or after the sale.
  • The window spans 61 days: 30 before, the sale day, and 30 after.
  • Two different funds tracking the same index have no IRS safe harbor, so practitioners judge each case.
  • A repurchase inside an IRA can destroy the loss permanently, with no basis recovery.

Key Takeaways

  • A wash sale disallows a loss if you buy substantially identical securities within 30 days before or after the sale.
  • The window spans 61 days: 30 before, the sale day, and 30 after.
  • Two different funds tracking the same index have no IRS safe harbor, so practitioners judge each case.
  • A repurchase inside an IRA can destroy the loss permanently, with no basis recovery.

What a Wash Sale Substantially Identical Test Is

Section 1091 of the Internal Revenue Code blocks a loss deduction when, within a window around the loss sale, you acquire substantially identical stock or securities. A wash sale of substantially identical securities is exactly that situation. The blocked loss is not erased in most cases. It is added to the cost basis of the replacement shares, deferring the benefit until you sell those.

The term stock or securities includes contracts and options to buy or sell them. The rule also reaches short sales, so closing a short at a loss and reopening a similar position can be a wash sale too.

The Intuition

The rule exists to stop a paper trade. Without it, you could sell a stock on December 31 to book a tax loss, buy it right back on January 2, and keep the same economic position while harvesting a deduction. Congress viewed that as claiming a loss you did not really take.

Substantially identical is the test that separates a real change in position from a cosmetic one. If the new holding is essentially the same investment, the loss is suspended. If it is genuinely different, the loss stands.

How It Works

The window is fixed in calendar days:

Wash sale window = 30 days before the sale
                 + the day of the sale
                 + 30 days after the sale
                 = 61 days total

If you acquire substantially identical securities anywhere in that window, the loss is disallowed and rolled into the basis of the replacement shares. Your holding period also tacks on, so the original holding period carries over.

The IRS has never published a single bright-line definition of substantially identical. Shares of the same company are clearly identical. Selling a single stock and buying a broad index fund that merely contains that stock is generally not, because the fund is a different, diversified security. The hardest case is two funds from different providers tracking the same index. There is no ruling, so many practitioners treat them as not identical given their different sponsors, fees, and structures, but no safe harbor guarantees it.

Worked Example

Suppose you bought 100 shares of a stock for 10,000 dollars, it falls to 7,000 dollars, and you sell to harvest the 3,000 dollar loss. Eight days later you buy 100 shares of the same stock for 7,100 dollars.

Loss realized      = 3,000  (disallowed, wash sale)
New basis          = 7,100 + 3,000 disallowed = 10,100
Holding period     = carries over from original shares

The 3,000 dollar loss is not deductible now. It is added to the basis of the new shares, raising it to 10,100 dollars, so you recover the benefit when you eventually sell the replacement shares. Had you instead bought a different, non-identical investment, the loss would have been allowed immediately.

Common Mistakes

  1. Counting only the days after the sale. The window starts 30 days before the sale too. A purchase shortly before selling at a loss can trigger the rule.

  2. Rebuying in a different account. Buying the same security in an IRA, a spouse's account, or another brokerage still counts. The rule looks across your related accounts.

  3. Assuming the loss is gone. In a taxable account the disallowed loss usually shifts to the new shares' basis. The benefit is deferred, not destroyed, except in cases like an IRA repurchase.

  4. Treating same-index funds as a safe harbor. Two funds tracking the same index from different sponsors have no IRS blessing. They may be fine, but it is a judgment call, not a guarantee.

  5. Forgetting options and short sales. Options to buy the stock and substantially identical short positions fall within the rule. Replacing stock with a deep call option can be a wash sale.

Frequently Asked Questions

What is a wash sale substantially identical rule in simple terms? A wash sale substantially identical rule blocks your tax loss when you sell a security at a loss and buy a nearly identical one within 30 days before or after. The IRS shifts the disallowed loss into the cost of the new shares.

How does the substantially identical test affect investment decisions? It shapes how investors harvest tax losses, because rebuying the same security too soon defers the deduction. Many switch to a similar but not identical holding to keep market exposure while preserving the loss.

What is a real-world example of a wash sale? You sell 100 shares at a 3,000 dollar loss and buy the same stock back 8 days later. The loss is disallowed and added to the new shares' basis, so you only benefit when you sell those later.

How can investors avoid triggering the wash sale rule? Wait at least 31 days before rebuying the same security, or replace it with a genuinely different investment such as a broad fund rather than the same stock. Check IRA and spouse accounts, which also count.

How is the wash sale rule different from the constructive sale rule? The wash sale rule disallows a loss when you rebuy a substantially identical security, while the constructive sale rule under Section 1259 triggers a gain when you hedge an appreciated position. One defers losses, the other accelerates gains.

Sources

  1. Cornell Legal Information Institute. "26 U.S.C. 1091 - Loss from wash sales of stock or securities." https://www.law.cornell.edu/uscode/text/26/1091
  2. IRS. "Revenue Ruling 2008-5, Section 1091 - Loss from Wash Sales of Stock or Securities." https://www.irs.gov/pub/irs-drop/rr-08-05.pdf
  3. U.S. House Office of the Law Revision Counsel. "26 USC 1091: Loss from wash sales of stock or securities." https://uscode.house.gov/view.xhtml?req=%28title%3A26+section%3A1091+edition%3Aprelim%29
  4. Tax Notes. "IRC Section 1091 - Loss from wash sales of stock or securities." https://www.taxnotes.com/research/federal/usc26/1091

Disclaimer

This article is educational content only and is not financial advice. Nothing here is a recommendation to buy, sell, or hold any security. Consult a licensed advisor before making investment decisions.

The IWP Substack

You understand the concept. Now see it applied.

The Investing With Purpose Substack turns ideas like this into research and risk-managed trade plans on real stocks, updated every week.

Read on Substack (opens in a new tab)

Related concepts