Wash Sale Rule: What It Is & How to Avoid It
⚡ Key Takeaways
- The wash sale rule disallows a tax loss if you buy a substantially identical security within 30 days before or after selling at a loss
- The rule creates a 61-day window (30 days before + sale day + 30 days after) where repurchases trigger disallowance
- Disallowed losses are added to the cost basis of replacement shares, deferring but not eliminating the tax benefit
- The rule applies across all your accounts, including IRAs and your spouse
What Is the Wash Sale Rule?
The wash sale rule is an IRS regulation that prevents investors from claiming a tax deduction on a security sold at a loss if they purchase a substantially identical security within 30 days before or after the sale. The rule exists to prevent taxpayers from selling a stock to claim a loss while immediately buying it back to maintain their position.
Without this rule, an investor could sell a losing stock on December 31, claim the loss on their tax return, and buy the exact same stock on January 1 — getting a tax benefit without any real change in their investment. The IRS considers this an artificial loss and disallows it.
The wash sale rule is codified in Section 1091 of the Internal Revenue Code and applies to stocks, bonds, mutual funds, ETFs, options, and other securities.
The 30-Day Rule Explained
The wash sale window spans 61 calendar days total:
- 30 days before the loss sale
- The day of the sale itself
- 30 days after the loss sale
Wash Sale Window = Sale Date − 30 days to Sale Date + 30 days
Example: Sell at a loss on March 15
Window: February 13 through April 14
Any purchase of identical security in this window triggers a wash sale
This means the rule can be triggered retroactively. If you bought shares of a stock on March 1 and then sold your original shares at a loss on March 20, the March 1 purchase falls within the 30-day window before the sale, triggering a wash sale.
Pro Tip
What Is "Substantially Identical"?
The IRS has never provided a comprehensive definition of substantially identical, which creates some gray areas. Here is what we know:
Clearly substantially identical:
- The same stock (selling and rebuying AAPL shares)
- The same bond from the same issuer with the same terms
- Options or contracts on the same underlying security
- Convertible securities and the underlying stock
Clearly NOT substantially identical:
- Different companies in the same industry (selling AAPL, buying MSFT)
- Bonds from different issuers
- Preferred stock vs. common stock of the same company (usually)
Gray areas:
- Two ETFs tracking the same index (e.g., VOO and SPY both track the S&P 500)
- A mutual fund and an ETF tracking the same index
- Two total market index funds from different providers
The IRS has not issued definitive guidance on whether two funds tracking the same index are substantially identical. Most tax professionals advise caution, recommending that replacement funds track a different index to avoid risk.
Consequences of a Wash Sale
When a wash sale occurs, the loss is disallowed for tax purposes. However, the disallowed loss is not permanently lost — it is added to the cost basis of the replacement shares.
| Transaction | Details |
|---|---|
| Buy 100 shares at $50 | Cost basis: $5,000 |
| Sell 100 shares at $40 | Loss: $1,000 (disallowed) |
| Repurchase 100 shares at $42 | New basis: $4,200 + $1,000 = $5,200 |
In this example, the $1,000 loss is disallowed, but the replacement shares have a higher cost basis ($52 per share instead of $42). When you eventually sell those replacement shares, your gain will be $1,000 less (or your loss will be $1,000 more), effectively deferring the tax benefit.
The holding period of the original shares also transfers to the replacement shares. If you held the original shares for 10 months, the replacement shares are treated as if you have held them for 10 months plus whatever additional time you hold them.
Wash Sales Across Multiple Accounts
The wash sale rule applies across all accounts you own:
- Taxable brokerage accounts (all of them)
- IRA accounts (Traditional and Roth)
- Your spouse's accounts (if filing jointly)
This creates a particularly dangerous trap with IRAs. If you sell a stock at a loss in your taxable account and buy the same stock in your IRA within 30 days, the loss is disallowed. Worse, because IRA contributions are not tracked by cost basis, the disallowed loss cannot be added to the IRA shares' basis. The loss is permanently lost.
Pro Tip
How to Avoid Wash Sales
Wait 31 days. The simplest approach is to sell the losing position, wait 31 calendar days, and then repurchase. The risk is that the stock rises during this waiting period and you miss the recovery.
Buy a similar but not identical replacement. Sell your S&P 500 ETF at a loss and immediately buy a total stock market ETF. The two are similar enough to maintain market exposure but track different indexes.
Double up, then sell. Buy additional shares first, wait 31 days, then sell the original losing shares. This maintains continuous exposure but requires additional capital during the overlap period.
| Strategy | Pros | Cons |
|---|---|---|
| Wait 31 days | Simple, zero risk of wash sale | Price may recover during wait |
| Replace with similar fund | Maintains exposure immediately | Gray area on "substantially identical" |
| Double up method | Full continuous exposure | Requires extra capital; 31-day overlap |
Wash Sales and Day Traders
Day traders and active traders face unique wash sale challenges. If you trade the same stock frequently, virtually every loss sale could trigger a wash sale because you likely bought the same stock within the 30-day window.
Consider a trader who buys and sells TSLA twenty times in a month. Every losing trade is potentially a wash sale because of the constant buying and selling. This creates a cascading effect where disallowed losses keep rolling into the basis of new shares.
Traders who qualify for trader tax status and make the Section 475 mark-to-market election can avoid wash sale problems entirely. Under Section 475, all positions are marked to market at year-end, and the wash sale rule does not apply. This is one of the primary benefits of the election for active traders.
Wash Sales and Options
Options add complexity to the wash sale rule. The following transactions can trigger wash sales:
- Selling stock at a loss and buying a call option on the same stock within 30 days
- Selling stock at a loss and selling a put option on the same stock (which could result in acquiring shares)
- Selling a call option at a loss and buying the underlying stock
- Buying a deep in-the-money call that is substantially identical to owning the stock
The IRS has stated that options can be considered substantially identical to the underlying stock depending on the circumstances. Deep in-the-money options with minimal time value are more likely to be treated as substantially identical.
For more on how options interact with tax rules, see our options taxes guide.
Broker Reporting of Wash Sales
Brokers are required to track and report wash sales on Form 1099-B. However, brokers only track wash sales within their own accounts. If you trigger a wash sale across accounts at different brokers, or between a brokerage account and an IRA, you are responsible for identifying and reporting it yourself.
Your 1099-B will show wash sale adjustments in Box 1g. The disallowed loss amount is added to the cost basis of the replacement shares. When reviewing your 1099-B:
- Verify the wash sale adjustments are correct
- Check for cross-account wash sales your broker may have missed
- Ensure the adjusted basis carries over to your Form 8949
FAQ
What happens to a disallowed wash sale loss?
The disallowed loss is added to the cost basis of the replacement shares. This defers the tax benefit until you sell the replacement shares. The holding period of the original shares also carries over to the replacement shares.
Does the wash sale rule apply to gains?
No. The wash sale rule only applies to losses. You can sell a stock at a gain and immediately repurchase it without any wash sale implications. This is sometimes done to reset the holding period or to realize a gain in a low-income year.
Can I avoid the wash sale rule by selling in one account and buying in another?
No. The wash sale rule applies across all your accounts, including IRAs, and across spousal accounts when filing jointly. The IRS looks at all purchases within the 30-day window regardless of which account they occur in.
Does the wash sale rule apply to cryptocurrency?
Historically, the wash sale rule has not applied to cryptocurrency because it is classified as property, not a security. However, recent legislative proposals aim to extend the wash sale rule to crypto. Monitor IRS updates for changes.
What is the penalty for not reporting a wash sale?
There is no separate penalty for failing to report a wash sale, but you would be understating your income. If the IRS discovers unreported wash sales during an audit, you could owe additional taxes plus interest and accuracy-related penalties of up to 20% of the underpayment.
How do I report wash sales on my tax return?
Report wash sales on Form 8949. Enter the full loss in column (d), then enter the disallowed portion as an adjustment in column (g) with code "W." The net effect is that the disallowed loss is not deducted on your current return. Your broker's 1099-B should provide most of this information.
Disclaimer
This is educational content, not financial advice. Trading involves risk, and you should consult a qualified financial advisor before making any investment decisions. Past performance does not guarantee future results.
Frequently Asked Questions
What is the best way to get started with trading taxes?
Start by reading this guide thoroughly, then practice with a paper trading account before risking real capital. Focus on understanding the concepts rather than memorizing rules.
How long does it take to learn wash sale rule?
Most traders can grasp the basics within a few weeks of study and practice. However, developing consistency and proficiency typically takes several months of active application.