Tax

What Is a Wash Sale and How Does the 30-Day Window Work?

Sell at a loss and buy the same stock back within 30 days, before or after, and the IRS will not let you claim the loss yet. It moves into the new shares.

Definition

Wash sale: A sale of stock or securities at a loss where you buy substantially identical stock or securities within 30 days before or after the sale. The IRS disallows the loss for that year.

Buy 100 shares at 50.00. The stock drops, and you sell all 100 at 42.00, a loss of 800. Nine days later you buy 100 shares back at 43.00.

You cannot deduct that 800 this year. You have made a wash sale.

The IRS rule is short. If you sell stock or securities at a loss and, within 30 days before or after that sale, you buy substantially identical stock or securities, the loss is disallowed. Thirty days either side, plus the sale day, makes 61 days. A purchase anywhere inside it counts.

Where the loss goes

A disallowed loss is postponed. It is added to the cost basis of the replacement shares, and the holding period of the shares you sold carries over to them as well, so the replacement lot is treated as if it had been held since the original purchase. The loss comes back when you finally sell the replacement shares, as a smaller gain or a bigger loss, provided that sale is not itself a wash sale.

Across the whole round trip, nothing is lost for tax purposes. The timing moves. For a trader who takes a loss in December and buys back in early January, that timing difference can move the loss into the next tax year entirely.

Counting the window

Count calendar days, weekends included, and look backward as well as forward. The backward half catches people who buy more shares shortly before selling an older lot at a loss, since the rule does not care that the new purchase came first. The wash sale window calculator will lay out the 61 days around a sale date for you.

“Substantially identical” is the phrase that decides edge cases. The same stock clearly counts. Options on it can count too. Different share classes and closely related securities are harder calls. Take those to a tax professional.

That leaves three ordinary choices after a losing sale. Wait until the 31st day after it before buying back, and accept whatever the price does in the meantime. Buy back inside the window and accept that the loss is deferred into the new shares, which may suit you if you want the position back and plan to hold it for a while anyway. Or buy something that is plainly a different security. Each is legitimate. What matters is choosing one on purpose, before the buy order goes in.

The accounts that surprise people

An IRA can trigger it. Buying the replacement shares in an individual retirement account still counts as buying them. IRS guidance does not add the disallowed loss to the basis of shares held inside the IRA, so the loss can be lost for good. Get advice before you do this on purpose.

Your broker only sees one account. Brokers report the wash sales they can detect within a single account, and the 1099-B shows any loss they disallowed, yet they cannot see your other brokerage accounts, and you are responsible for wash sales across all of them.

Automatic purchases count. A dividend reinvestment that buys a few shares inside the window can make part of a loss a wash sale, sized to those few shares.

Checking it on your own records

Find the wash sale column on your 1099-B, usually labeled as a disallowed loss, and total it. Then compare the dates of every losing sale against every purchase of the same stock in any account you hold, including retirement accounts and anything bought automatically, because the broker’s figure covers only what that broker could see from inside one account and will miss a replacement purchase made somewhere else.

IRS Publication 550 sets out the rule and its examples in full. For anything beyond a simple buyback, talk to a tax professional. Whether you owe tax on trades you never withdraw is covered separately, as is how choosing tax lots before selling changes which loss you realize.

Also asked

Does selling at a gain trigger a wash sale?
No. The rule only applies to losses. A gain is taxable in the usual way whenever you buy back.
Does a partial buyback disallow the whole loss?
Generally only the part matching the shares you bought back. Sell 100 at a loss, buy back 40 inside the window, and the loss on 40 shares is disallowed.

Put it to work