Key takeaways
- Section 1091 disallows the loss if you acquire substantially identical stock or securities within 30 days before or after the sale. Counting the sale day, that's a 61-day window.
- The disallowed loss isn't confiscated. In the IRS's own example a $250 disallowed loss is added to the $800 paid for the replacement shares, giving a basis of $1,050.
- Revenue Ruling 2008-5 is the exception that hurts. When an IRA makes the repurchase, the loss is disallowed and the account's basis is not increased.
- Publication 550 extends the rule to a purchase by your spouse or by a corporation you control. The text of section 1091 mentions neither of them.
- Brokers must flag a wash sale only inside one account with one CUSIP number. You can't deduct the loss even when box 1g reports nothing.
The window runs 30 days in both directions, and the loss moves rather than vanishes
You sold a fund at a loss to claim the deduction. Now you want to know how long you have to stay out before repurchasing it.
Under US federal tax law the answer is 30 days, and it runs in both directions. Section 1091 of the Internal Revenue Code disallows the loss where, within a period beginning 30 days before the sale and ending 30 days after it, you have acquired substantially identical stock or securities. Add the day of the sale itself and you get 61 days. That is the term the Treasury regulation uses for it.
Here's the part the potted summaries leave out. The disallowed loss isn't taken away from you. It's added to the cost of the shares you bought, and you recover it when you sell those. What the rule confiscates is the timing, not the deduction.
Two situations break that consolation, and they are where people are actually caught. The replacement can be bought by someone who isn't you. And if the buyer is your own retirement account, the loss doesn't move into anyone's basis. It simply ends.
What section 1091 says, and the word the regulation adds
The operative rule is one sentence of statute. Where a taxpayer has acquired substantially identical stock or securities inside the window, section 1091(a) says that "no deduction shall be allowed under section 165" unless the taxpayer is a dealer and the loss arose in the ordinary course of that business.
Three details in that sentence do most of the damage. The trigger is acquisition, not a completed round trip. A contract or option to acquire counts as an acquisition. And the acquisition can happen before the sale, which is how a monthly contribution or a dividend reinvestment on the 3rd of the month can disallow a loss you take on the 20th.
The regulation adds the arithmetic. It defines the same period and then names it: the 61-day period. Neither the statute nor Publication 550 uses that figure. Add 30 and 30 and you get 60; the regulation counts 61, because the day of the sale sits inside the period.
The disallowed loss lands in the cost of the shares you bought
Publication 550 works the mechanism through with round numbers, and it repays reading twice. You buy 100 shares for $1,000. You sell them for $750, then buy 100 shares of the same stock for $800 within the window. The $250 loss is disallowed. You add that $250 to the $800 you paid, and your basis in the new holding becomes $1,050.
The chart plots those five figures. What it shows is a loss changing address rather than disappearing: the $250 leaves the current tax year and reappears as a higher cost, which means a smaller gain or a larger loss whenever the replacement shares are finally sold.
The holding period travels with it. Publication 550 states that your holding period for the new stock "includes the holding period of the stock or securities sold". So a wash sale doesn't restart your clock towards long-term treatment. That is the one part of this rule that works in your favour, and it's rarely mentioned.
Partial repurchases are matched share by share. In the IRS's own example, a $1,000 loss on 100 shares runs into 75 shares of substantially identical stock bought inside the window. The result is $750 disallowed and $250 deductible, with the disallowed amount split across the replacement lots in proportion.
"Substantially identical" has never been given a bright line
This is the phrase everyone wants a rule for, and the honest answer is that no rule exists. Publication 550 says you "must consider all the facts and circumstances in your particular case". The statute doesn't define the term. The regulation uses it without defining it either.
What the IRS does supply are edges. Ordinarily, securities of one corporation are not substantially identical to securities of another. Bonds and preferred stock are ordinarily not identical to the common stock of the same issuer. Then comes the one specific test in the whole passage: convertible preferred stock is substantially identical to the common where it meets five conditions, including that it trades "at prices that do not vary significantly from the conversion ratio" and is unrestricted as to convertibility.
Notice what those edges have in common. Every one of them is about two securities of the same issuer. The IRS has published nothing applying the phrase to two index funds from different managers tracking the same benchmark, which is exactly the swap that tax-loss harvesting guides recommend. The two funds are different issuers, which points one way. They can hold the same companies in the same weights, which points the other. Anyone who tells you where that line sits is telling you their reading, not the IRS's. If you want a sense of how alike two supposedly different funds can be, our analysis of holdings overlap across five popular funds is the place to start.
A repurchase inside an IRA disallows the loss and gives nothing back
Publication 550's list of triggers has a fourth item that reads like an afterthought: acquiring substantially identical stock for your IRA or Roth IRA. It is the most expensive item on the list.
Revenue Ruling 2008-5 sets out the facts plainly. A taxpayer holds 100 shares with a basis of $1,000, sells them for $600, and the next day causes their IRA or Roth IRA to buy 100 shares of the same stock. The IRS holds that the loss is disallowed, and then adds the sentence that matters: the taxpayer's "basis in the individual retirement account or Roth IRA is not increased".
Publication 550 carries the same carve-out in four words. You add the disallowed loss to the cost of the new securities "except in (4) above" — item four being the IRA purchase. So the ordinary consolation does not apply. There is no higher basis waiting for you, because a pre-tax retirement account has no basis to raise. The deduction is not deferred. It is gone.
This is also the trap least likely to be spotted, because the two accounts usually sit at different institutions and nothing on either statement connects them.
Your spouse's purchase counts, and the statute never says so
Publication 550 is unambiguous: "If you sell stock and your spouse or a corporation you control buys substantially identical stock, you also have a wash sale."
Read section 1091(a) again and you'll find no spouse in it. The statute speaks only of what "the taxpayer" has acquired. The regulation is silent too. The spousal extension is the IRS's stated position, and it rests on case law rather than on statutory text. The Supreme Court shut down exactly this manoeuvre between spouses in its 1947 decision in McWilliams v. Commissioner. That case was decided under a different provision: the related-party loss rule.
That distinction is not academic, because the two rules dispose of your loss differently. Under the related-party rule the disallowed loss doesn't attach to your basis at all. It attaches to the other person's outcome. In the IRS's example, a sibling sells you stock for $7,600 against a $10,000 basis, and the $2,400 loss is denied to them permanently. If you later sell for $10,500, your $2,900 gain is reduced by that $2,400, so you report $500. The relief lands on the buyer's return, never on the seller's.
The phrase "a corporation you control" is undefined in the wash sale passage. Elsewhere in the same publication, the related-party tests turn on owning more than 50% of a corporation's stock by value. Whether that threshold governs the wash sale sentence is not something the IRS has stated.
Your broker watches one account and one CUSIP, and nothing else
Most people assume the 1099-B does this arithmetic for them. It does part of it. The instructions to brokers require a wash sale to be reported "if both the sale and purchase transactions occur in the same account with respect to covered securities with the same CUSIP number". Brokers are "permitted but are not required" to report anything wider than that.
So a sale in your taxable brokerage account and a purchase in your IRA, or in your spouse's account, or at a different firm, will usually pass through the reporting system untouched. The Schedule D instructions close the loop: you "can't deduct a loss from a wash sale even if it isn't reported on Form 1099-B or Form 1099-DA".
The Form 8949 instructions go further still. If the disallowed amount shown in box 1g "is incorrect", you are told to enter the correct figure yourself in column (g), flagged with code W. The IRS has written the correction of your broker's number into the taxpayer's job description.
The strongest objection: this rule costs far less than the alarm suggests
The case against treating wash sales as a disaster is a good one, and it deserves stating properly.
Start with the deferral. Outside the IRA case, nothing is lost. A disallowed loss becomes basis, and basis is money — you collect it later. If you were harvesting losses to carry forward anyway, a delay of a year or two may cost you very little.
Then look at how slowly the deduction can be used. In the IRS's guidance on capital gains and losses, net capital losses offset other income only up to $3,000 a year, or $1,500 if married filing separately, with the remainder carried forward indefinitely. Someone with a $30,000 harvested loss and no gains to offset is looking at ten years of $3,000 deductions regardless. Against that queue, a wash sale that pushes part of the loss into next year's basis is a small inconvenience.
There is also a cost on the other side of the ledger that harvesting guides tend to ignore. Selling one fund and buying a near-substitute costs a spread, potentially a commission, and a step away from the fund you actually chose. Our work on what higher turnover costs and on the costs that sit outside the expense ratio both point the same way: trades are not free, and the tax saving has to clear them.
One group escapes the rule entirely. The IRS's published guidance for traders in securities states that the wash sale rules do not apply to traders using the mark-to-market method of accounting, an election made under section 475. That election is not available to investors, and the qualification test is demanding.
Where this framework breaks down
The central limitation is the one already stated, and it can't be argued away. "Substantially identical" is undefined, so the most common harvesting trade — swap one broad index fund for another — sits in territory the IRS has never mapped. Any confident number of days, or confident list of safe substitutes, is somebody's interpretation. The data cannot tell you where the boundary is, because there is no data; there is only guidance the IRS has chosen not to write.
Asset coverage is unsettled too. Section 1091 reaches "stock or securities". The Schedule D instructions for 2025 state that the rules "generally apply to transactions involving digital assets that are also stock or securities for tax purposes (tokenized securities)", which leaves digital assets that aren't securities outside the sentence. The same instructions carve out redemptions in a floating-NAV money market fund. Neither point should be read as settled, and neither is drawn from the statute itself.
Finally, scope. Everything here is US federal law, as stated in the 2025-edition IRS publications and in the current Code and regulations. It says nothing about state conformity, and nothing about how any other country treats a repurchase. If you file outside the United States, none of it transfers.
What would change the conclusion
Three things would move this materially, and none of them is in your hands.
A revenue ruling or regulation defining "substantially identical" for funds tracking the same index would settle the biggest open question in retail tax-loss harvesting. The IRS has had decades to write it and hasn't, which is itself informative about how much appetite there is for a bright line.
A statute extending section 1091 beyond "stock or securities" would be the second. Harvesting losses on digital assets that are not securities currently rests entirely on that phrase, and a change to it would bite from its effective date rather than retroactively.
The third is broker reporting. Widening it beyond one account and one CUSIP would change nothing about what you owe, but a great deal about what gets noticed. Until then, the account that catches people is the one their broker cannot see, and the half of the window most often forgotten is the 30 days before the sale rather than the 30 after.
