The wash sale rule stops you from deducting a loss on shares you sell if you buy the same shares, or substantially identical ones, within 30 days before or after the sale. It does not block the trade, and in most cases it does not destroy the loss either: the deduction is postponed by adding it to the cost of the replacement shares. This guide covers how the 61-day window is counted, what substantially identical means and where funds fall into a gray area, why IRA and spouse purchases count, how the basis adjustment works, worked examples of disallowed losses, and what your broker will and won't catch. Tax rules change and the IRS judges unclear cases on their facts, so check close calls with a tax professional. The rest of our investing tax coverage starts from the stocks and investing hub.
What is the wash sale rule?
The wash sale rule, section 1091 of the tax code, disallows a loss on a sale of stock or securities if you buy substantially identical ones within 30 days.
IRS Publication 550 lists four ways to trigger it within 30 days before or after the sale: buying substantially identical stock or securities, acquiring them in a fully taxable trade, acquiring a contract or option to buy them, or acquiring them for your traditional or Roth IRA. A purchase by your spouse or by a corporation you control counts as your own. The rule reaches shares, ETFs, mutual funds, bonds, warrants and options, and it applies whether the repurchase is deliberate or automatic. Publication 550 even gives the example of an employee who sells company shares at a loss and receives another stock award within 30 days.
Its target is a sale made to book a loss while the investment stays in place. It never touches gains: sell at a profit and buy back the next morning, and the gain is simply taxable. Publication 550 says the rule does not apply to losses on commodity futures contracts or foreign currencies, and IRS Topic 429 notes that traders who have made a section 475(f) mark-to-market election are not subject to it. Coins held directly generally fall outside it under current law, because it is written for stock and securities; in Congress, H.R. 9172 and H.R. 10357 would apply the wash-sale rule to digital assets; neither had passed the House as of November 1, 2026. The crypto hub and the guide to crypto tax-loss harvesting cover digital assets.
How does the 61-day wash sale window work?
The window covers 30 days before or after the sale (a 61-day window), counted in calendar days from the trade date of the loss sale.
Weekends and holidays count, and settlement dates play no part. A purchase on the 31st day after the sale falls outside the window, and so does one made 31 or more days before it. Purchases before the sale are the half people forget: buying more shares of a falling stock and then selling the original, higher-cost lot at a loss within 30 days is a wash sale.
| Loss sale (trade date) | Window opens | Window closes | First safe day to buy back |
|---|---|---|---|
| Monday, March 2, 2026 | January 31, 2026 | April 1, 2026 | April 2, 2026 |
| Monday, November 16, 2026 | October 17, 2026 | December 16, 2026 | December 17, 2026 |
| Tuesday, December 15, 2026 | November 15, 2026 | January 14, 2027 | January 15, 2027 |
The last row is the year-end trap. A loss realized on December 15 belongs on the 2026 return, but the window runs into January, so a repurchase on January 5, 2027 still disallows it, and the deduction moves into the basis of shares you will sell in some later year.
What counts as substantially identical?
Shares of the same company are substantially identical; shares of different companies ordinarily are not, and for everything in between the IRS looks at all the facts and circumstances.
Publication 550 gives a few markers. A company's bonds or preferred stock are not ordinarily substantially identical to its common stock, but convertible bonds or preferred can be, depending on relative values and price movements; preferred stock that converts freely, votes like the common, faces the same dividend limits and trades close to its conversion value is treated as identical. In a reorganization, shares of the old and new company may be substantially identical. Selling common stock at a loss while buying warrants on the same company is also a wash sale.
Funds are the real gray area. The IRS has not published a test for exchange-traded or mutual funds, and BlackRock's guidance for its iShares funds says the IRS has released no definitive opinion on how the rule applies to ETFs. Tax practitioners generally weigh two things: how much the holdings overlap and how similar the expected returns are. The table applies the risk levels from BlackRock's framework, which are judgments rather than IRS rules.
| Replacement for a position sold at a loss | Typical overlap | Wash sale risk |
|---|---|---|
| The same stock or fund, or a call option on it | Complete | A wash sale |
| A fund tracking the same index, or another share class of the same fund | Near total | Higher |
| An index fund tracking a different index | Partial to significant | Moderate |
| An actively managed fund replacing an index fund, or the reverse | Few holdings in common | Lower |
| A diversified fund, such as a sector fund, replacing a single stock | Small | Lower |
S&P 500 funds from different sponsors, compared in SPY vs VOO vs IVV, hold essentially the same companies in the same weights, which puts them in the higher-risk row. An S&P 500 fund and a Nasdaq-100 fund follow different indexes but share many of their largest holdings, which is why a different index lowers the risk without removing it.
Do purchases in an IRA or a spouse's account trigger a wash sale?
Yes: Publication 550 counts purchases for your traditional or Roth IRA, and purchases by your spouse, as if you had made them yourself.
The IRA version is the harsh one. In Revenue Ruling 2008-5, the IRS held that when you sell stock at a loss and your IRA or Roth IRA buys substantially identical stock within the window, the loss is disallowed and your basis in the IRA is not increased. With no basis increase anywhere, the deduction never comes back. The ruling covers IRAs and Roth IRAs only. It does not address 401(k)s or other workplace plans, so whether a plan purchase counts is unsettled and worth raising with a tax adviser if your plan buys the fund you sold.
It usually happens by accident: an IRA that reinvests dividends from the same fund, a scheduled monthly IRA purchase, or a target allocation that buys in one account what you just sold in another. For a married couple, the practical approach is to treat both spouses' accounts as one pool when checking the window. How the two IRA types differ in other respects is covered in Roth vs traditional IRA.
What happens to the disallowed loss?
The disallowed loss is added to the cost basis of the replacement shares, and their holding period absorbs the time you owned the shares you sold.
Section 1091(d) sets the new shares' basis at the basis of the shares sold, adjusted by the difference between the sale and repurchase prices, which comes to the new purchase price plus the disallowed loss. In Publication 550's own example, shares bought for $1,000 and sold for $750, then rebought for $800 within the window, give a $250 disallowed loss and a $1,050 basis in the new shares. The benefit returns when you finally sell the replacement shares without another wash sale, as a smaller gain or a larger loss.
If you buy back fewer shares than you sold, only the loss on that many shares is disallowed and the rest is deductible now; shares bought beyond the number sold simply take their purchase price as basis. When several purchases fall inside the window, Publication 550 matches them to the shares sold in the order you bought them. Because the holding period carries over, replacement shares can qualify for long-term treatment sooner than their purchase date suggests, which changes the rate when you sell them, as explained in capital gains tax on stocks.
How much of a loss does a wash sale disallow?
A wash sale disallows the loss on as many shares as you replace inside the window, and no more.
Worked example: Seven outcomes for one $1,500 loss
You bought 100 shares of a fund at $55 ($5,500) in March 2026 and sold all 100 at $40 ($4,000) on November 16, 2026, a $1,500 loss. The window runs from October 17 to December 16.
| What happens | Disallowed | Deductible for 2026 | Basis of the new shares |
|---|---|---|---|
| Buy 100 shares at $42 on December 1 | $1,500 | $0 | $4,200 + $1,500 = $5,700 |
| Buy 40 shares at $41 on November 30 | $600 | $900 | $1,640 + $600 = $2,240 |
| You had bought 100 more at $44 on October 28, then sold the March lot | $1,500 | $0 | October lot: $4,400 + $1,500 = $5,900 |
| Your IRA buys 100 shares at $42 on November 20 | $1,500 | $0 | IRA basis unchanged, so the loss is lost |
| Reinvested dividends buy 3 shares at $41 on December 5 | $45 | $1,455 | $123 + $45 = $168 |
| Buy a fund tracking a different index the same day | $0, if not substantially identical | $1,500 | Its purchase price |
| Buy 100 shares at $43 on December 17, day 31 | $0 | $1,500 | $4,300 |
- Partial repurchase: 40 of the 100 shares were replaced, so 40% of $1,500, or $600, is deferred and $900 is deductible now
- Reinvestment: 3 of 100 shares were replaced, so 3% of the loss, $45, is deferred
- Later sale: if the replacement shares in the first row are sold at $45 in 2027 with no new purchase, the loss is $4,500 − $5,700 = $1,200, which is the deferred $1,500 net of the $300 the new shares gained
Who tracks wash sales: your broker or you?
Your broker checks only part of the rule, so applying it across all your accounts is your job.
Under the Form 1099-B instructions, brokers must report a wash sale only when the same security, identified by its CUSIP number, is bought and sold in the same account, and only for covered securities. They may report others, but they need not look at activity outside the account. Any disallowed amount appears in box 1g. Publication 550 states the consequence plainly: you cannot deduct a loss from a wash sale even if it is not reported on Form 1099-B.
The usual blind spots are purchases at another firm, in an IRA or workplace plan, by a spouse, of a different but substantially identical security, and through dividend reinvestment in another account. You report a wash sale the broker missed on Form 8949, with code W in column (f) and the disallowed loss as a positive number in column (g). If box 1g is wrong, the Form 8949 instructions explain how to correct it and attach a statement showing the adjustment.
How can you avoid a wash sale?
You can wait 31 days to buy back, buy a replacement that isn't substantially identical, or double up at least 31 days before selling the original lot.
Before you sell at a loss
- Write down the trade date and the date 30 days later, when the window closes
- Check every account you and your spouse own, including IRAs and workplace plans, for purchases of the same security in the past 30 days
- Turn off dividend reinvestment for that security in every account until the window closes
- Pause automatic investments into the same or a substantially identical fund
- Avoid buying call options on the security during the window
- Keep your own record of any purchase your broker cannot see, for Form 8949
Each approach has a cost. Waiting in cash, or in a money market fund, leaves you out of the market for a month, and a rebound in that time can cost more than the tax saved. Doubling up, which means buying the same number of shares and selling the original lot after 31 days, leaves you holding twice the position, and twice the risk, for a month. Switching to a fund that tracks a different index keeps you invested at moderate risk under the framework above; tax loss harvesting walks through that method and what it can save.
What are the risks of getting the wash sale rule wrong?
The main risks are a smaller deduction than planned, a loss erased by an IRA purchase and a return that understates your tax.
- Automatic purchases. Reinvested dividends, monthly investment plans, workplace contributions and employer stock awards add shares without any decision on your part, and each can disallow part of a loss.
- The IRA trap. A matching purchase in a traditional or Roth IRA erases the loss rather than deferring it.
- Gray-area swaps. A replacement fund with nearly the same holdings can be challenged, and no IRS list of acceptable pairs exists.
- Year-end timing. A December loss followed by a January repurchase still fails, so the deduction you counted on for this year moves to a later one.
- Copying the 1099-B. Brokers miss cross-account wash sales, so a return that simply copies the form can overstate losses and lead to extra tax and interest later.
- Rules change. Congress has considered extending the rule, including to digital assets, and IRS guidance evolves. This page explains the rules as of November 2026 and is not tax advice; a tax professional can review close calls before you trade.
