The Wash Sale Rule Explained: The 30-Day Rule, and Whether It Applies to Crypto
Updated November 14, 2026
Selling an investment at a loss can lower your tax bill, but only if you follow the wash sale rule. This guide explains how the 30-day rule works, how to avoid tripping it, and where crypto stands.
Key takeaways
- If you sell stock or securities at a loss and buy a substantially identical one within 30 days before or after, the loss is disallowed for now.
- The disallowed loss is added to the basis of the new shares, so it’s generally deferred, not lost.
- The rule applies across all your accounts, including your IRA and your spouse’s accounts.
- It doesn’t currently apply to most crypto, but proposed legislation would extend it, so check the latest rules.
- Wait 31 days or buy something different to stay clear of the rule.
What the wash sale rule says
The wash sale rule stops you from claiming a tax loss on an investment you effectively still own. If you sell stock or securities at a loss, and you buy the same or a substantially identical security within 30 days before or after the sale, the IRS disallows the loss for now.
The window runs 30 days before the sale, the day of the sale, and 30 days after, which is 61 days in all.
A worked example
You buy 100 shares at $50, for $5,000. When the price falls to $40, you sell all 100 for $4,000, a $1,000 loss. Two weeks later you buy 100 shares again at $42, for $4,200.
- The $1,000 loss is disallowed this year, because you rebought within 30 days.
- The disallowed loss isn’t gone. It’s added to the basis of the new shares: $4,200 + $1,000 = $5,200. If you later sell at a higher price, you’ll have a smaller gain.
- Your holding period for the old shares carries over to the new ones.
If you rebuy only 40 shares, only 40% of the loss, or $400, is disallowed. The other $600 is allowed.
It works in both directions
A purchase before the sale counts too. If you buy more shares on March 10 and then sell your older shares at a loss on March 25, the March 10 purchase can trigger the rule, because it falls within 30 days before the sale. The shares you sold don’t count as replacement shares, but any other shares you bought in the window do.
What counts as substantially identical?
The IRS hasn’t drawn a bright line. In practice:
- Clearly identical: shares of the same company, and options or contracts to buy or sell those shares.
- Usually not identical: stock of a different company, even in the same industry.
- A gray area: two funds from different providers that track the same index. Some investors treat them as different, but the IRS hasn’t said so clearly. Ask a tax professional if the amounts are large.
Our wash sale checker treats the same ticker as the same security, so it won’t catch the gray areas.
Ways people trigger it by accident
- Other accounts. The rule applies across all your accounts. A purchase in your IRA, or by your spouse, can trigger it. A purchase in an IRA is the worst case, because the disallowed loss generally can’t be added to the IRA’s basis, so it’s lost for good.
- Automatic dividend reinvestment. A small reinvested dividend inside the window counts as a purchase.
- Automatic investing plans. A scheduled purchase can land in the window.
- Options. Buying a call option on the same stock can count as acquiring it.
Your broker reports wash sales in the same account, but it can’t see the others, so you’re responsible for the rest.
How to avoid or work around it
- Wait 31 days before buying the same security back.
- Buy something similar but different, such as a different company or a fund that tracks a different index, if you want to stay invested.
- Pause automatic purchases and dividend reinvestment around a loss sale.
- Keep your own record of trades across every account.
Does it apply to crypto?
As of mid-November 2026, no. The wash sale rule covers stock and securities, and the IRS treats most crypto as property, so selling a coin at a loss and buying it back doesn’t trigger the rule. Crypto funds and ETFs that are securities are covered.
That could change. Two House bills would extend the rule to digital assets. One was introduced in June 2026 and another in September 2026, and a House committee voted to advance the second. Neither is law yet. Some websites describe the rule as already in effect, so check a reliable source, such as IRS guidance, before you plan around it. Also keep records of any loss-and-rebuy trades, in case the law changes or your situation is questioned. For more, see how crypto is taxed.
How it shows up on your return
Your broker’s Form 1099-B shows disallowed amounts. On Form 8949, a wash sale is reported with adjustment code W and the amount of the disallowed loss. If purchases in other accounts caused a wash sale, you add the adjustment yourself. Our tax forms guide explains how Form 8949 fits together.
Common mistakes
- Selling at a loss and rebuying the next day.
- Forgetting the 30 days before the sale.
- Overlooking purchases in your IRA, your spouse’s account, or automatic plans.
- Assuming the loss is gone forever. It’s generally added to the new shares’ basis.
- Assuming your broker’s report covers every account.
Frequently asked questions
Does the wash sale rule apply to gains?
No. It only disallows losses. If you sell at a gain, you can rebuy right away.
How long do I have to wait to rebuy?
Wait more than 30 days after the sale. Day 31 is the first day outside the window.
What if I sell in my taxable account and buy in my IRA?
It still counts, and the loss is generally lost for good, because it can’t be added to the IRA’s basis.
Are two ETFs that track the same index substantially identical?
It’s unclear. Different providers’ funds are sometimes treated as different, but the IRS hasn’t drawn a clear line. The same fund bought again is clearly identical.
Tools that can help
- Stock wash sale checkerSpot stock losses the wash-sale rule may disallow.
- Cost basis method comparisonCompare FIFO, LIFO, and highest-cost-first on the same sale.
- Crypto trade logRecord buys and sells and see realized gains by wallet.
- Long-term capital gains calculatorEstimate federal tax on a gain from an investment held over a year.
Keep reading
- FIFO, LIFO, and HIFO cost basis methodsHow the method you use changes your gain, your holding period, and your tax bill.
- Short-term vs. long-term capital gainsHow the one-year line changes your tax rate, with 2026 brackets and examples.
- How crypto is taxed in the USWhat counts as a taxable event, how to figure gains, and what to report.
This article is for education only and isn’t financial, investment, tax, or legal advice. Tax rules and limits change, so check IRS guidance or a qualified tax professional about your situation. See our disclaimer.