Wash Sale Rule Explained: How It Affects Your Tax Bill
Wash Sale Rule Explained: How It Affects Your Tax Bill
The wash sale rule is one of the most commonly misunderstood provisions in the tax code, and violating it can silently destroy your tax-loss harvesting strategy. Under IRC Section 1091, if you sell a security at a loss and repurchase the same or a “substantially identical” security within 30 days before or after the sale, the loss is disallowed. The loss does not disappear entirely — it is added to the cost basis of the replacement security — but the immediate tax benefit is denied. This guide breaks down every aspect of the rule, including recent changes that now apply it to cryptocurrency.
Data Notice: Figures, rates, and statistics cited in this article are based on the most recent available data at time of writing and may reflect projections or prior-year figures. Always verify current numbers with official sources before making financial, medical, or educational decisions.
The Rule in Plain English
You cannot sell an investment at a loss and buy it right back just to claim the tax deduction.
Specifically: if you sell a stock, bond, ETF, mutual fund, option, or (now) cryptocurrency at a loss, and you acquire substantially identical property within a 61-day window centered on the sale date, the loss is disallowed for tax purposes.
The 61-Day Window
| Period | Duration |
|---|---|
| 30 days before the sale | Purchases in this window trigger a wash sale |
| Day of the sale | The sale itself |
| 30 days after the sale | Purchases in this window trigger a wash sale |
| Total | 61 days |
The “before” window catches a common scenario: you buy additional shares, then sell your older shares at a loss within 30 days. The purchase of the new shares before the sale triggers the wash sale, even though the purchase happened first.
What Happens When a Wash Sale Is Triggered
The disallowed loss is not permanently lost. Instead:
- The disallowed loss is added to the cost basis of the replacement shares
- The holding period of the original shares is tacked onto the replacement shares
Example
- January 5: You buy 100 shares of XYZ at $50/share ($5,000 total basis)
- March 15: You sell 100 shares of XYZ at $40/share ($4,000 proceeds). Loss = $1,000.
- March 25: You buy 100 shares of XYZ at $38/share ($3,800 cost)
Result: The $1,000 loss is disallowed. Your basis in the new 100 shares becomes $3,800 + $1,000 = $4,800 (instead of $3,800). Your holding period for the new shares starts from January 5 (the original purchase date), not March 25.
When you eventually sell the replacement shares, the higher basis means you will have a smaller gain (or larger loss), effectively recovering the disallowed loss — but later, not now.
What Are “Substantially Identical” Securities?
The IRS has intentionally left this term vague, but decades of rulings and practice establish clear guidelines:
Definitely Substantially Identical
- The same stock (selling MSFT and buying MSFT)
- The same mutual fund (selling Vanguard 500 Index VFIAX and buying VFIAX)
- The same ETF (selling SPY and buying SPY)
- Options or contracts to acquire substantially identical stock (buying a call option on the stock you just sold at a loss)
- Convertible bonds or preferred stock that are convertible into the stock you sold
Probably NOT Substantially Identical
- Different companies in the same industry (selling AAPL and buying MSFT) — different companies are not identical securities, even if they are competitors
- Different index funds from different providers — selling Vanguard S&P 500 ETF (VOO) and buying iShares S&P 500 ETF (IVV) is generally considered acceptable, though the IRS has never issued a definitive ruling. Some advisors take the conservative position that funds tracking the identical index may be substantially identical.
- ETFs tracking different indexes — selling an S&P 500 ETF and buying a Total Stock Market ETF is not a wash sale (different underlying index, different composition)
- Individual stocks vs. an ETF containing that stock — selling shares of AAPL and buying an ETF that holds AAPL (like QQQ) is generally not a wash sale, unless AAPL dominates the ETF
The Gray Areas
The IRS has not issued comprehensive guidance on:
- Two ETFs from different providers tracking the same index (e.g., VOO vs. IVV)
- Mutual fund vs. ETF versions of the same fund (e.g., VFIAX vs. VOO)
- Cryptocurrency pairs (is Bitcoin substantially identical to… anything?)
Conservative investors avoid the gray areas entirely. Aggressive tax planners operate in them. The safest approach: swap to a fund tracking a different but similar index (e.g., S&P 500 → Total Stock Market, or U.S. Large Cap → Russell 1000).
Wash Sales Apply Across All Your Accounts
This is where many investors get caught. The wash sale rule applies across:
- All brokerage accounts (if you sell at a loss at Fidelity and buy back at Schwab, it is a wash sale)
- Your IRA (if you sell at a loss in your taxable account and buy back in your IRA, the loss is disallowed — and it is permanently lost because IRA basis adjustments provide no future tax benefit)
- Your spouse’s accounts (if filing jointly)
- Your 401(k) (if a 401(k) fund purchase triggers the rule, the loss is effectively destroyed)
The IRA Trap
This is the most dangerous wash sale scenario:
- You sell Stock A at a $5,000 loss in your taxable brokerage account
- Within 30 days, you buy Stock A in your Roth IRA
- The $5,000 loss is disallowed in your taxable account
- The basis adjustment goes to the Roth IRA — where basis is irrelevant because Roth distributions are tax-free
- The $5,000 loss is permanently destroyed
The same trap applies to traditional IRAs and 401(k)s, where distributions are taxed as ordinary income regardless of basis.
Broker Reporting Limitations
Your broker only reports wash sales that occur within their accounts. They cannot see your accounts at other brokers, your IRA, or your spouse’s accounts. You are responsible for identifying wash sales across all accounts and making the appropriate adjustments on Form 8949.
Wash Sales and Cryptocurrency
Until recently, cryptocurrency occupied a gray area. The tax code’s wash sale provision (Section 1091) applied to “stock or securities,” and crypto was classified as “property” — arguably not a “security.” Many crypto investors exploited this gap, selling crypto at a loss and immediately rebuying to claim the loss.
This loophole is now closed. Recent legislation explicitly extends the wash sale rule to cover digital assets. Beginning with the applicable tax year, if you sell Bitcoin at a loss and repurchase Bitcoin within 30 days, the loss is disallowed — just like with stocks.
For a complete discussion of crypto tax rules, see our cryptocurrency tax guide.
How Wash Sales Are Reported
On Your 1099-B
Your broker reports wash sales on your Form 1099-B with:
- A “W” code in the applicable column
- The disallowed loss amount
- The adjusted basis of the replacement shares
On Form 8949
You report the transaction on Form 8949 with:
- Column (f): Code “W” (wash sale)
- Column (g): The amount of the disallowed loss (as a positive number, added to your basis)
Example Form 8949 Entry
| (a) Description | (b) Date Acquired | (c) Date Sold | (d) Proceeds | (e) Cost Basis | (f) Code | (g) Adjustment | (h) Gain/Loss |
|---|---|---|---|---|---|---|---|
| 100 sh XYZ | 01/05/2025 | 03/15/2025 | $4,000 | $5,000 | W | $1,000 | $0 |
The $1,000 loss is shown as a $0 loss after the wash sale adjustment. The $1,000 is added to the basis of the replacement shares.
Strategies to Avoid Wash Sales
1. Wait 31 Days
The simplest approach: sell the losing position and wait 31 calendar days before repurchasing. The risk is that the investment recovers during the waiting period and you buy back at a higher price.
2. Substitute a Similar but Not Identical Security
Sell the losing position and immediately buy a similar but not substantially identical investment:
- Sell S&P 500 ETF → Buy Total Stock Market ETF
- Sell individual stock → Buy sector ETF
- Sell U.S. large-cap fund → Buy U.S. large-cap fund tracking a different index
After 31 days, you can switch back to the original investment if desired.
3. Double Up Before Selling
Buy additional shares first (increasing your position), wait 31 days, then sell the original losing shares. This keeps you invested the entire time. The risk: you double your position size for 31 days, increasing your exposure.
4. Turn Off Automatic Dividend Reinvestment
Automatic dividend reinvestment purchases count as acquisitions. If you sell a stock at a loss and a dividend is reinvested in that same stock within 30 days, it triggers a partial wash sale for the reinvested shares. Turn off DRIP for any position you plan to harvest. For an overview of how dividends are taxed, see our dividend tax rates guide.
Partial Wash Sales
A wash sale can be partial. If you sell 200 shares at a loss and buy back only 100 shares within the window, the loss is disallowed only on 100 shares (the number repurchased). The loss on the remaining 100 shares is allowed.
Frequently Asked Questions
Does the wash sale rule apply to gains?
No. The wash sale rule only applies to losses. If you sell at a gain and immediately repurchase, there is no wash sale issue — you simply owe tax on the gain.
What if I sell at a loss and my spouse buys the same stock?
If you file jointly, purchases by your spouse within the 30-day window trigger a wash sale. If you file separately, the rule technically does not apply to your spouse’s accounts — but IRS interpretation on this point is aggressive, and some tax professionals advise treating it as a wash sale regardless.
Can the wash sale rule create a long-term gain from a short-term loss?
Yes. Because the holding period of the original shares tacks onto the replacement shares, a short-term loss can be disallowed and the replacement shares can become long-term more quickly. When you eventually sell, you may pay the lower long-term capital gains rate instead of the short-term rate.
My broker did not report a wash sale, but I think I have one across accounts. What do I do?
You must self-report it. On Form 8949, enter the broker-reported figures and add an adjustment with code “W” for the disallowed loss amount. The IRS holds you responsible regardless of what your broker reports. For an overview of how to report stock sales, see our stock sales reporting guide.
Is there a de minimis exception?
No. The wash sale rule applies regardless of the dollar amount. A $10 loss on 1 share is subject to the same rule as a $100,000 loss on 10,000 shares.
What about exchange-traded notes (ETNs)?
ETNs are debt instruments, not equities. However, they can be treated as securities for wash sale purposes. If you sell an ETN at a loss and buy back the same ETN within 30 days, the loss is likely disallowed. Consult your tax professional for ETN-specific guidance, and review your complete list of available deductions to ensure you are optimizing your tax position.
Key Takeaways
- The wash sale rule disallows losses when you repurchase the same or substantially identical security within 30 days before or after the sale
- The disallowed loss is not permanently lost — it is added to the basis of the replacement shares (except in the IRA/401(k) trap, where it IS permanently lost)
- The rule now applies to cryptocurrency, closing the previous loophole
- It applies across all your accounts, including IRAs, 401(k)s, and your spouse’s accounts
- Your broker only tracks wash sales within their own accounts — cross-account tracking is your responsibility
- To avoid wash sales, wait 31 days or substitute a similar but not identical investment
Tax information is for educational purposes only and does not constitute tax advice. Consult a licensed tax professional for guidance specific to your situation.