Taxes and accounts

What is a wash sale?

Selling a stock at a loss and buying the same or a substantially identical one within 30 days before or after. The IRS disallows the loss for that year and adds it to the cost of the new shares.

A wash sale is what the IRS calls it when you sell an investment at a loss and buy it back, or buy something nearly identical, within 30 days on either side of the sale. The rule exists to stop people selling on December 30 to claim a tax loss and buying back on January 2 with nothing really changed.

The consequence is not a penalty; it is a deferral. The loss you were hoping to deduct this year is disallowed and instead added to the cost basis of the new shares. You get the benefit eventually, when you sell those shares for good, just not now. Annoying rather than catastrophic, but it can wreck a tax-loss harvesting plan.

The 30 days run in both directions, so a total 61-day window around the sale. Buying in an IRA counts. Dividend reinvestment counts, which catches a lot of people: sell at a loss, and an automatic DRIP purchase two weeks later triggers the rule. And "substantially identical" is deliberately vague; two S&P 500 ETFs from different providers are generally treated as fine, two share classes of the same fund are not.

Your broker flags wash sales on the 1099-B, so you will not miss one by accident, but you also will not get a warning before you trigger one. If you plan to harvest a loss, turn off reinvestment on that holding first and wait the 31 days.

Informational only, not financial advice. Updated September 4, 2026.

Get the free market brief

Top stories and analysis, summarized. No spam, unsubscribe anytime.

Keep reading

More on taxes and accounts