Wash Sale Rule: What It Is, How It Works & How to Avoid It
How the Wash Sale Rule Works
The rule exists to prevent investors from selling at a loss purely for the tax deduction, then immediately buying back the same position. The IRS created a 61-day window: 30 days before the sale, the sale date, and 30 days after. If you acquire substantially identical securities anywhere in that window, the loss is disallowed.
Example
You own 100 shares of XYZ stock bought at $50/share. The price drops to $35, so you sell all 100 shares, realizing a $1,500 loss. But 10 days later, you buy 100 shares of XYZ again at $33. The wash sale rule triggers: your $1,500 loss is disallowed, and your cost basis in the new shares becomes $33 + $15 = $48 per share.
What Triggers a Wash Sale
| Triggers a Wash Sale | Does NOT Trigger a Wash Sale |
|---|---|
| Buying the same stock within 30 days | Buying a different company’s stock in the same sector |
| Buying a substantially identical ETF | Buying a different index ETF (e.g., S&P 500 → Total Market) |
| Buying call options on the same stock | Waiting 31+ days to repurchase |
| Spouse buys the same security in their account | Buying in a different sector or asset class entirely |
| Buying in an IRA within the 61-day window | Selling at a gain (rule only applies to losses) |
The Wash Sale Rule and Tax-Loss Harvesting
Tax-loss harvesting is one of the most effective tax strategies for investors — but the wash sale rule is the main constraint. To harvest losses without triggering a wash sale:
- Swap into a similar but not identical fund. Sell an S&P 500 ETF and buy a Total Stock Market ETF — similar exposure, different securities
- Wait 31 days. If you want the exact same position back, simply wait out the window
- Use the loss to offset gains. Pair capital gains with harvested losses to reduce your tax bill
Wash Sales Across Accounts
This is where many investors get caught. The wash sale rule applies across all your accounts — taxable brokerage, IRAs, and even your spouse’s accounts. If you sell a stock at a loss in your brokerage account and your 401(k) auto-purchases the same stock within 30 days, that’s a wash sale.
Cost Basis Adjustment
When a wash sale is triggered, the disallowed loss isn’t permanently gone (except for the IRA scenario above). It gets added to the cost basis of the replacement shares, which means you’ll realize a smaller gain (or larger loss) when you eventually sell those replacement shares.
Key Takeaways
- The wash sale rule disallows losses if you buy the same or substantially identical security within a 61-day window
- Disallowed losses get added to the replacement shares’ cost basis — they’re deferred, not lost
- Exception: wash sales involving IRAs can permanently destroy the tax benefit
- The rule applies across all your accounts, including your spouse’s
- Swap into similar (but not identical) funds to harvest losses while staying compliant
Frequently Asked Questions
Does the wash sale rule apply to cryptocurrency?
As of 2024, the wash sale rule technically doesn’t apply to cryptocurrency because the IRS classifies crypto as property, not a security. However, legislation has been proposed to close this loophole. Check current rules on cryptocurrency taxes before relying on this exemption.
What does “substantially identical” mean?
The IRS hasn’t given a precise definition, which creates a gray area. The same stock or mutual fund clearly qualifies. Different ETFs tracking the exact same index are risky. ETFs tracking different indexes (like S&P 500 vs. Total Stock Market) are generally considered safe, but there’s no bright-line rule.
Do I need to report wash sales on my tax return?
Your broker reports wash sales on Form 1099-B and adjusts the cost basis on your statement. However, brokers only track wash sales within the same account. Cross-account wash sales are your responsibility to track and report.
Can I sell and buy back the same day to trigger a wash sale intentionally?
Some investors intentionally trigger wash sales to carry forward losses (via higher cost basis) while maintaining their position. This can be useful if you want to stay invested but plan to realize the deferred loss later. Just ensure the math works in your favor.
How long is the wash sale window exactly?
The window is 61 days total: 30 calendar days before the sale, the day of the sale itself, and 30 calendar days after. To be safe, wait a full 31 days after selling before repurchasing the same or substantially identical security.