What is a wash sale?
Last updated August 2026
Short answer
The wash sale rule exists to stop people claiming a tax loss on an investment they never really let go of. It is mechanical, easy to trigger by accident, and one version of it is genuinely unforgiving.
The 61-day window
The window runs 30 days before the sale and 30 days after, plus the day of the sale itself. Buy within any of those 61 days and the loss is disallowed.
The before half surprises people. Buying more of a position and then selling the original shares at a loss a week later triggers the rule just as much as buying back afterwards.
It is calendar days, not trading days, and it crosses year ends. A late-December sale and an early-January repurchase is a wash sale.
The loss is deferred, not destroyed
A disallowed loss is added to the cost basis of the replacement shares. A higher basis means a smaller gain, or a larger loss, when you eventually sell them.
The holding period of the sold shares also carries across, which can help a replacement position reach long-term treatment sooner.
So in an ordinary taxable account a wash sale is a timing inconvenience rather than a real cost, provided you keep track of the adjusted basis.
The IRA version, which is not recoverable
If you sell at a loss in a taxable account and buy the same security inside your IRA or Roth IRA within the window, the loss is disallowed and there is no basis adjustment available, because IRAs do not track basis that way.
The deduction is simply gone. This is the one version of the rule with a permanent cost, and it is easy to trigger with automatic IRA contributions buying a fund you just sold elsewhere.
Automatic investment plans and target-date funds inside a retirement account are the usual culprits, because the purchase happens without you thinking about it.
It applies across accounts, including a spouse's
The rule follows you, not the account. Selling at a loss in one brokerage and buying in another does not avoid it.
Purchases by your spouse, and by a company you control, are also captured.
Brokers only report wash sales they can see within their own systems. A wash sale spanning two brokers is your responsibility to identify and report, and neither 1099 will show it.
What substantially identical means
The same stock is obviously identical. So are options and warrants on it in many circumstances.
Two ETFs tracking the same index are widely treated as substantially identical in practice, even though the IRS has never ruled definitively on funds.
Two funds tracking different indices covering the same market are generally accepted as not identical, which is the basis of most loss-harvesting practice. Stock in two different companies in the same industry is clearly not identical.
The absence of a bright line here is why anyone harvesting large losses should get a professional view rather than relying on convention.
Try it in Walnut
Walnut reads your connected brokerage positions, so you can see everything you hold in one place before selling something you may be buying elsewhere.
How people trigger it without noticing
Dividend reinvestment. A reinvested dividend is a purchase, and a small automatic reinvestment inside the window disallows a portion of the loss.
Automatic contributions, whether to a taxable account, an IRA or a workplace plan buying the same fund.
Rebalancing that buys back part of what was just sold.
Turning off automatic reinvestment on a position before harvesting a loss on it removes the most common cause.
How to work around it deliberately
Wait 31 days and repurchase, accepting the market risk of being out.
Buy a similar but not identical replacement immediately, which keeps you invested and is the usual approach.
Buy the replacement first and sell the original more than 30 days later, which also works but doubles your exposure for a while.
All three are legitimate. What is not is claiming a loss on a position you effectively still hold.
Sources
The wash sale rule, capital loss limits and carryforwards are in IRS Publication 550. Walnut is informational and is not an investment adviser. This guide is educational and not personalized tax or investment advice; anything with a tax consequence is worth confirming with a tax professional.
FAQ
What is a wash sale?
+
Selling an investment at a loss and buying the same or a substantially identical one within 30 days before or after. The loss is disallowed for that year and added to the cost basis of the replacement shares instead, so it returns when you sell those.
How long is the wash sale window?
+
61 days: the 30 days before the sale, the day of the sale, and the 30 days after. It is calendar days and it crosses year ends, so a late-December sale and an early-January repurchase counts.
Does the wash sale rule apply across different accounts?
+
Yes. It follows you rather than the account, and includes purchases in another brokerage, in your IRA, and by your spouse. Brokers only report wash sales visible within their own systems, so one spanning two brokers is yours to identify.
What happens if I trigger a wash sale in my IRA?
+
The loss is disallowed and cannot be recovered, because IRAs do not carry a basis adjustment. Unlike an ordinary wash sale, which defers the loss, this version destroys the deduction permanently. Automatic IRA contributions buying a fund you just sold elsewhere are the common cause.