Last updated: October 25, 2026 · Applies to the 2026 tax year (returns filed in 2027)
The wash sale rule stops you from selling a stock at a loss, claiming the tax deduction, and buying the same stock right back. If you buy substantially identical shares within 30 days before or after the sale, the loss is disallowed for now. It isn’t gone forever, though: it’s added to the cost of the new shares and comes back when you sell them. Here’s how the rule works and how to harvest losses without triggering it.
Key takeaways
- A wash sale happens when you sell at a loss and buy substantially identical securities within 30 days before or after, a 61-day window.
- The disallowed loss is added to the basis of the replacement shares, and their holding period includes the old shares’.
- Purchases by your spouse or in your IRA count. A wash sale with an IRA purchase can make the loss permanently disappear.
- Brokers only flag wash sales of identical securities in the same account; the rule applies across all your accounts.
- As of 2026, the rule applies to stocks, ETFs, mutual funds and options, but not to crypto held directly.
The 61-day window
The window runs from 30 days before the loss sale to 30 days after it. A purchase on either side counts. Buying more shares a week before you sell your losing lot triggers the rule just as much as buying back a week after. The rule only affects losses; gains are always taxed in full.
Worked example
Chris owns 100 shares of a stock he bought for $5,000. On December 10, 2026, he sells them for $4,000, a $1,000 loss. On December 20, he decides the stock is a bargain and buys 100 shares back for $4,200. In March 2027, he sells those shares for $4,500.
| Step | What happens |
|---|---|
| December 10 sale | $1,000 loss, but disallowed because he repurchased within 30 days |
| Basis of new shares | $4,200 + $1,000 disallowed loss = $5,200 |
| Holding period | Includes the time he held the original shares |
| March 2027 sale | $4,500 − $5,200 = $700 loss, claimed in 2027 |
In total, Chris paid $9,200 and received $8,500, so his real loss of $700 is still recognized. But he loses the $1,000 deduction on his 2026 return, which may be the year he needed it. Had he waited until January 10, 2027 to buy back, the 2026 loss would have counted.
What counts as “substantially identical”
- Clearly identical: the same stock, the same ETF or mutual fund, and options or contracts to buy the same stock.
- Generally not identical: a different company’s stock in the same industry, or a fund that tracks a different index, such as moving from an S&P 500 fund to a total market fund.
- Gray area: two funds from different issuers that track the same index. The IRS hasn’t given clear guidance. Many investors treat them as not identical, but it’s a risk.
Traps that catch investors
- Automatic dividend reinvestment. A small reinvested dividend within the window can turn part of your loss into a wash sale.
- Your IRA. If you sell at a loss in a taxable account and buy the same shares in your IRA, the loss is disallowed and can’t be added to the IRA’s basis, so it’s lost permanently (IRS Revenue Ruling 2008-5).
- Your spouse. Purchases by your spouse count as your purchases.
- Multiple brokers. Your broker reports wash sales only for identical securities in the same account (box 1g on Form 1099-B). You must track others yourself and adjust Form 8949 with code W.
- Year-end. A December loss followed by a January repurchase is still a wash sale. The window crosses the year.
How to harvest losses without a wash sale
- Wait 31 days before buying back, and accept being out of the position.
- Switch to a similar but not identical investment, such as a fund tracking a different index, then switch back after 31 days if you want.
- Turn off dividend reinvestment on the position for the window.
- Check all accounts, including IRAs and your spouse’s, before you sell.
What about crypto?
The wash sale rule in section 1091 applies to “stock or securities”. Cryptocurrency held directly is property, not a security, so as of 2026 you can sell bitcoin at a loss and buy it back immediately. Congress has proposed extending the rule to digital assets several times, but it hasn’t become law. Crypto ETFs, however, are securities and are covered. See crypto tax-loss harvesting.
Frequently asked questions
Does the wash sale rule apply to gains?
No. You can sell at a gain and buy back immediately; the gain is taxed and your new basis is the new purchase price. Some investors do this to reset basis in years when they’re in the 0% long-term bracket.
What if I only buy back part of the shares?
Only the matching portion is a wash sale. If you sold 100 shares at a loss and bought back 40, the loss on 40 shares is disallowed and the loss on the other 60 is allowed.
Is the disallowed loss ever lost for good?
Usually not; it’s deferred into the new shares. The main exception is a repurchase inside an IRA or other tax-advantaged account, where the loss is lost permanently.
Sources
- 26 U.S. Code § 1091: Loss from wash sales of stock or securities
- IRS Publication 550: Investment income and expenses (wash sales)
- IRS Revenue Ruling 2008-5: Wash sales and IRA purchases
- IRS: Instructions for Form 8949 (code W)
This article is for educational purposes only and is not tax, legal or investment advice. Tax rules depend on your individual situation; consult a qualified tax professional before filing.