Wash-Sale Rule (US)
Wash-Sale Rule (US)
The US Internal Revenue Code Section 1091 forbids "wash sales." If you sell a security at a loss and buy a substantially identical security within 30 days before or after the sale, the IRS will disallow your loss. The loss does not vanish; instead, it is added to the cost basis of the replacement security, deferring the tax benefit to a future year when you finally sell the replacement without repurchasing it again. Violating this rule is expensive and common, which is why understanding it is non-negotiable for any US investor harvesting losses in taxable accounts.
Key takeaways
- The wash-sale window spans 61 days total: 30 days before the sale, the sale date itself, and 30 days after.
- A loss is disallowed only if you repurchase a "substantially identical" security; different funds or ETFs in the same sector are permitted.
- If you violate the rule, the loss is not erased; it is added to the cost basis of the replacement, deferring the benefit.
- Wash-sale violations are reported automatically by brokers and matched against your tax return by IRS computers; penalties and interest apply if ignored.
- The 30-day rule is calendar days, not trading days; weekends and holidays count.
What "substantially identical" means
The IRS does not define "substantially identical" with mathematical precision. Instead, it applies a facts-and-circumstances test. In practice, the rule is strict: you cannot repurchase the exact same fund or ETF. However, you can repurchase a different fund in the same asset class or sector.
Examples of substitutions that satisfy the IRS:
- Selling VTI (total US stock) and buying ITOT (iShares Core S&P Total US Stock) within 30 days is not a wash sale because the issuer and fund structure differ, even though both track the entire US stock market.
- Selling SPY (S&P 500) and buying IVV (iShares Core S&P 500) is permitted for the same reason.
- Selling a Vanguard international fund and buying an iShares international fund is permitted.
Examples that likely trigger a wash sale:
- Selling VTI and buying VTSAX (Vanguard's Admiral Shares mutual fund version of the same index) within 30 days is a wash sale because both track the identical index and are issued by the same company.
- Selling one Vanguard S&P 500 fund (VOO) and buying another Vanguard S&P 500 fund (VFIAX) within 30 days violates the rule.
The key distinction: different index, different issuer, or both = safe. Same index, same issuer = wash sale.
The 30-day window: before and after
The wash-sale window is 61 days, not 31. If you sell on Day 0, you cannot repurchase the same security from Day -30 through Day +30 (inclusive). That is 30 days before, the sale day itself, plus 30 days after.
Example: You sell XYZ on March 15. You cannot buy it again:
- On or after February 14 (30 days before)
- On or after April 14 (30 days after)
You can repurchase safely on April 15 or later. If you slip and buy on April 14, the loss is disallowed.
Calendar days are counted, not trading days. Weekends, holidays, and market closures all count toward the 30-day buffer. This is a source of confusion; many investors assume the rule resets on the next trading day after 30 calendar days, but it does not.
If you violate the rule: disallowance and deferral
Suppose you sell VTI at a $5,000 loss on September 1 and repurchase it on September 15 (within the window). The IRS will disallow the $5,000 loss on your tax return. The $5,000 is not forgiven; instead, it is added to your cost basis in the new VTI purchase. If you bought 50 shares at $200 on September 15 (costing $10,000), your new cost basis becomes $15,000 ($10,000 + $5,000 disallowed loss).
Now, when you eventually sell that 50-share position for less than $15,000, you recover the loss. But the tax benefit is deferred until that later year. If you hold the position for 10 years, the loss is deferred for 10 years.
This is why a wash-sale violation is not a complete catastrophe for long-term holders; the loss is preserved. But it defeats the purpose of harvesting in the current year, because you wanted the tax deduction now, not in 2036.
How brokers track wash sales
Since 2011, US brokers are required to track wash-sale violations automatically and report them to the IRS on your Form 8949 and Schedule D. Your brokerage account statement will likely show a notation (e.g., "wash sale disallowed") if you have triggered the rule. Some brokers will even warn you when you place a repurchase order that it may trigger a wash sale.
However, broker tracking is not foolproof, especially if you hold accounts at multiple brokers. If you sell XYZ at one broker and buy it at another, the first broker may not know about the second purchase and won't flag the violation. You are responsible for tracking wash sales across all your accounts.
Decision tree for wash-sale compliance
Avoiding the rule: planning ahead
The simplest way to avoid wash-sale violations is to pre-plan your substitutes before you harvest. Decide in advance which ETF or fund you will buy if you need to harvest a loss from a particular position. This requires foresight and discipline, but it eliminates the risk of panic-buying the wrong fund and disallowing your loss.
Investors with large, diversified portfolios can afford to wait out the 30-day window in cash or in a money-market fund while the window closes. This removes the temptation to repurchase prematurely. Investors with tighter allocations should use substitute funds that they have vetted in advance.
Related concepts
Next
Navigating the wash-sale rule is a US-specific challenge. Investors in the United Kingdom face a parallel but structurally different rule called "bed and breakfasting," which operates on the same principle but with different timing and share-pooling mechanics. We examine this next.