Does selling all shares by December 31 release deferred wash sale losses?

Hoping someone can clear this up before I do anything. I sold some tech shares at a loss in October, then bought back in two weeks later—classic wash sale, I know. The loss got deferred and my broker pushed it to the new cost basis on the replacement shares. My question is: if I sell ALL of those replacement shares before December 31 and don't buy back in within 30 days, does that release the deferred loss so I can actually use it on this year's return? I've seen conflicting things online. Some say yes, some say you have to wait the full 30 days into the new year too. I already have gains to offset so the timing really matters here. The replacement shares are still in the same account where the original wash sale happened.

35 comments

Went through almost the identical thing last December. The deferred loss does get released when you sell the replacement shares in a true closing sale—meaning you sell all of them and don't buy substantially identical shares within 30 days before or after that sale. The wash sale rule just keeps following the loss forward to each new batch of replacement shares until you finally break the chain. Sell before year end AND stay out for 30 days after and the loss lands on this year's return.

Isaac S.

Author

So the 30-day window after the December sale is the part that trips people up. If I sell December 15 I'd need to stay out until around January 14 to be safe?

Exactly. The window is 30 days after the sale date, not 30 days after December 31. Miss that and the loss gets deferred again into next year.

Dealt with this last year with a pile of semiconductor shares. I uploaded my 1099-B and the full transaction history to taxr.ai and it mapped every wash sale chain, showed me exactly which replacement lot was carrying which deferred loss, and flagged that I had one more purchase inside a 30-day window I'd completely missed. Ended up being crucial. Worth doing before you sell anything so you know the real numbers going in.

Isaac S.

Author

Did it pull the numbers straight off the 1099-B or did you have to enter things manually?

Uploaded the PDF and it read the boxes directly—proceeds, basis, the wash sale amount in box 1g, all of it. Saved me a lot of spreadsheet work.

The mechanics here come from Publication 550. When you sell the replacement shares in a closing sale, the deferred loss gets added into your basis on those shares, so it flows through to your gain or loss calculation on Form 8949 for the year of that sale. The key is that the sale has to be a genuine closing—no repurchase of substantially identical stock within 30 days before or after, in the same account or any account including an IRA.

The IRA part catches a lot of people. If you sell the replacement shares clean but your spouse's IRA buys the same stock inside that window, the wash sale rule still applies.

Right, the rule covers purchases by a spouse or a corporation you control, not just your own accounts. Publication 550 spells that out.

Learned this the hard way in 2022. Sold everything December 28, felt great about it, then my spouse bought the same ETF January 10 for their Roth. The loss got disallowed again and I had no idea until the 1099-B arrived showing code W still on those shares. The 30-day window really does apply to a spouse's accounts.

Isaac S.

Author

That's a nightmare. So you couldn't use the loss until you eventually sold out of the spouse's Roth?

Worse—when it's a wash sale triggered by an IRA or Roth IRA purchase, the disallowed loss doesn't get added to the basis of the IRA shares. It's just gone. So coordinate with your spouse before you act.

Ran into the same chain-of-replacement-lots problem the previous poster mentioned. I gave Taxr my brokerage's gain/loss report alongside the 1099-B and it flagged a discrepancy where the broker had only tracked the wash sale to the first replacement lot but I'd actually traded in and out twice. It drafted a column (g) adjustment summary for Form 8949 showing what the correct basis should be for each lot. Really helped me see which sales were clean and which weren't.

The broker tracking only going one layer deep is a known issue. They track wash sales on covered securities with the same CUSIP in the same account—anything across accounts or into an IRA they won't catch.

Something worth flagging: on Form 8949 a wash sale loss that's been disallowed shows up with code W in column (f) and the disallowed amount as a positive number in column (g). When you do the closing sale that releases the deferred loss, the adjustment your broker already rolled into your cost basis should automatically flow through to the correct gain or loss. But check the 1099-B you receive in January to confirm the basis reported includes that rolled-over amount.

Isaac S.

Author

What if the basis on the 1099-B still looks wrong after the closing sale?

If the basis is wrong and it's a covered security with basis reported to the IRS, you enter the basis shown on the 1099-B in column (e) anyway, then put a code B in column (f) and correct the basis with an adjustment in column (g). The instructions for Form 8949 walk through this.

My broker's year-end statement showed three separate wash sale deferrals stacked on the same ticker from trades in September, October and November. Each replacement lot carried the previous loss forward. I had to map out every lot date to make sure the December sale really was closing ALL of them, not just the last one.

Isaac S.

Author

How did you figure out which lots the deferred amounts were attached to?

Specific identification—I called the broker and had them confirm lot by lot which deferred loss had been rolled into each one. Then matched those to what the 1099-B preview was showing.

To answer the core question directly: yes, selling all replacement shares by December 31 can release the deferred wash sale losses onto this year's return, but only if you don't purchase substantially identical stock in the 30-day window after the sale. The wash sale rule under Publication 550 looks at the 61-day window centered on the sale date—30 days before and 30 days after. If you sell December 31, you can't repurchase until around February 1.

Sold my replacement shares December 20 last year, waited out the full 30 days, and the loss showed up correctly on Schedule D when I ran the final numbers. The chain was broken. What I didn't expect was needing to reconcile the 1099-B basis against my own lot records because the broker's cost basis already included the deferred loss—so the gain/loss on that sale looked smaller than I thought it would.

Isaac S.

Author

That's actually reassuring—smaller gain is good. It just means the rolled-over loss was already baked into the basis.

Exactly. The deferred loss doesn't appear separately on the 1099-B for the closing sale; it's already in the adjusted cost basis number. So the net effect is correct, it just looks different from what you'd expect.

Worth noting: the wash sale rule applies to losses on options to acquire stock too, not just the shares themselves. If you bought call options on the same stock during the 30-day window that could count as acquiring the right to buy substantially identical securities. Something to watch if you planned to hedge while staying out of the shares.

Confirmed—Publication 550 covers contracts and options to acquire stock under the wash sale rules. Commodity futures and foreign currency contracts are excluded, but equity options are not.

Checked with my broker last December about this. They said their system only tracks wash sales on covered securities with the same CUSIP bought in the same account. Cross-account wash sales, spousal accounts, IRA purchases—none of that gets flagged on the 1099-B automatically. The obligation to track it and report it correctly on Form 8949 falls on you.

This is why the 1099-B box 1g figure for wash sales is so narrow. The broker reports only what they can see within their own system.

Had a situation where I sold everything December 29 to close out a wash sale chain, but I'd bought shares in the same company inside my traditional IRA on December 10—19 days before the sale. That's inside the 30-day window before the sale, so the wash sale triggered again. And the loss that gets disallowed by an IRA purchase doesn't carry into the IRA's basis. It's permanently lost.

Isaac S.

Author

So the 30-day window before the closing sale matters just as much as after. The window is centered on the sale, not starting from it.

Right. 30 days before the sale date through 30 days after. I wish someone had spelled that out for me in November.

Read through irs.gov/publications/p550 before doing anything. The wash sale chapter lays out the full 61-day window, what counts as substantially identical, the IRA trap, the spousal purchase rule, and how the disallowed loss gets added to basis. It's one of the clearer explanations on the IRS site.

Wrapped up a wash sale chain last year by selling in mid-December and tracking the 30-day post-sale window carefully. The loss came through on Schedule D as expected. The deferred amount had been sitting in my cost basis all along, so the gain/loss calculation on Form 8949 for the closing sale just came out net of everything.

Pulled the Schedule D and Form 8949 instructions after I got my 1099-B and saw codes I didn't recognize. The Exception 1 rule lets you skip Form 8949 entirely and report directly on Schedule D line 1a or 8a if basis was reported to the IRS and there are no adjustments needed—but any closing sale that required correcting basis or adding a code goes on Form 8949 regardless.

Good distinction. If the closing sale has no codes and the basis on the 1099-B is correct, you can use the Schedule D shortcut. The moment you need a column (g) adjustment or any code letter, it goes on 8949.