Is it a wash sale if I sell all shares within 30 days of buying?

Trying to figure out if I triggered a wash sale on a trade I made last month. I bought 50 shares of a stock, it dropped pretty fast, so I sold all 50 shares at a loss about 18 days after I bought them. I did not buy any new shares of the same stock after the sale — I just walked away entirely. My broker's 1099-B preview is showing a wash sale disallowed amount in box 1g, which is confusing me. I already looked at the holding period rules but those seem to be about short-term vs long-term, not wash sales. The wash sale rule is what I'm trying to understand here. Is it a wash sale if I sell all shares within 30 days of buying, with no repurchase before or after the sale?

32 comments

The wash sale rule is about what happens in the 30 days BEFORE the sale, not just after. But the shares you sell can't be their own replacement. If you bought those 50 shares within 30 days before you sold all 50 at a loss, that purchase alone isn't a wash sale. The before-window only matters if you bought additional substantially identical shares. The window runs 30 days before AND 30 days after the sale date. So buying first and then selling that same lot at a loss within 30 days is not by itself the wash sale event.

Eric N.

Author

That actually makes a lot of sense, but I don't think that's what happened here. The buy and the loss sale were within that 30-day window, but it was the same 50 shares. So unless some other purchase of the same stock landed in the window, the box 1g amount must come from something else?

Worth separating two things: the holding period (short vs long-term) and the wash sale. They're different questions. You can have a short-term loss that's also a wash sale. The 18-day hold just means if the loss were allowed it would be short-term. The wash sale question is purely about whether substantially identical stock was bought within the 61-day window centered on the sale date.

Publication 550 spells out the wash sale rule clearly: a wash sale happens when you sell at a loss AND within 30 days before or after the sale you buy substantially identical stock. The purchase of the very shares you sold doesn't count as that "buy." Only other substantially identical shares bought within the window do. The 30-day before window is what trips most people up. It's not just repurchases after the fact.

This is the part I never understood until I read it carefully. The "before" side of the window catches people who bought extra shares and then sold their older shares at a loss.

Eric N.

Author

Okay so my buy 18 days before the sale is inside the 30-day before window, but those are the same shares I sold. So it doesn't explain the box 1g entry on the 1099-B, and I need to look for another purchase.

I ran into this same pattern last year — bought shares, price dropped, sold the whole position at a loss, never bought again. Broker still flagged a wash sale. I uploaded my 1099-B to taxr.ai and had Taxr walk through each transaction line and flag which ones were inside the 61-day window. It listed exactly which buy dates were within 30 days before each loss sale, and noted that the disallowed loss gets added to the cost basis of the replacement shares, not the shares that were sold. Saved me from reporting it wrong on Form 8949.

Eric N.

Author

Good to know it flagged it that way. I'll look into that for my own 1099-B since the numbers feel off.

Form 8949 is where you sort this out when you file. If the wash sale is on your 1099-B in box 1g, you check box A (or D for long-term), enter the proceeds in column (d), the basis in column (e), put code W in column (f), and put the disallowed loss as a positive number in column (g). The net effect is that the loss disappears from your return for now.

And that disallowed amount doesn't just vanish forever — it gets added to the cost basis of the replacement shares that triggered the wash sale, which can't be the same shares you sold at a loss.

Eric N.

Author

So the adjustment goes on the basis of the replacement shares, not the original shares I already sold? Or is the basis adjustment only relevant if I still hold the replacement shares?

The basis adjustment question you raised is an important one. The shares you sold at a loss can't be the shares that trigger the wash sale. Only other substantially identical shares bought within 30 days before or after can, and the disallowed loss is added to their basis. If you sold all your shares and bought no others in the window, there's no wash sale at all. This is a known wrinkle and it's worth reading Publication 550 carefully or running it by a CPA.

This is correct — it's a nuance that brokers sometimes handle differently on the 1099-B. The standard rule is the disallowed amount adds to the basis of the "new" stock. The stock you sold can never be the new stock, so selling your whole position with no other purchase in the window isn't a wash sale.

Just to make sure the scenario is right: you bought 50 shares, sold all 50 at a loss 18 days later, and bought zero shares in the 30 days after the sale? If that's accurate, there's no "replacement" stock at all, because the original purchase can't replace itself, so it isn't a wash sale. No repurchase happened after. That's different from the classic wash sale where someone sells, then immediately buys back in.

Eric N.

Author

Yes that's exactly it. No shares bought after the sale. The only buy was the one 18 days before. So there's no replacement stock in the IRS's view, and I need to find out why the broker flagged it.

Schedule D line 1a or 8a is where wash-sale-free transactions can be summarized directly (Exception 1 in the Form 8949 instructions), but anything with a code W in column (f) has to go on Form 8949 itself — you can't skip to Schedule D for those. Make sure your software doesn't accidentally put the wash sale line in the summary.

Does the same 30-before/30-after window apply if the shares were bought inside a Roth IRA? Asking for a separate situation I have.

Yes — acquiring substantially identical stock in an IRA or Roth IRA within that window counts as a wash sale on the taxable account loss. The tricky part is the disallowed loss does NOT get added to the IRA's basis in that case; it's just gone. That's worth checking in Publication 550.

That's worse than I thought. Okay I'll read that section carefully before I do anything.

Form 3921 is unrelated here since that's for ISOs, but I mention it because I once confused wash sale basis tracking with ISO AMT basis tracking — they're completely separate adjustments. For plain stock like this, the only forms in play are your 1099-B, Form 8949 and Schedule D. I had Taxr check my 8949 draft against the 1099-B line by line last filing season; it caught two columns where I'd entered the basis incorrectly for wash-sale-adjusted lots.

Eric N.

Author

Good reminder to keep those separate. My situation is plain stock, no options involved, so just the 1099-B and 8949.

The holding period of the new shares also includes the holding period of the shares you sold — that's in the wash sale rules. In your case, with no other shares bought in the window, there are no "new" shares, so it doesn't come up, but it matters in the more typical repurchase scenario.

If your 1099-B box 1g shows a wash sale disallowed amount but you believe it shouldn't apply — for instance if the buy and sell were not substantially identical, or the only purchase in the window was the lot you sold — you're still allowed to override it on Form 8949. Enter the basis shown on the 1099-B in column (e), use code B in column (f) to flag that the basis is incorrect, and put a negative adjustment in column (g) to reflect the correct deductible loss. You'd want solid documentation if you go that route.

Worth noting that the broker's wash sale determination in box 1g only triggers when it's the same CUSIP bought in the same account. If the repurchase was in a different account the broker won't catch it, but the rule still applies — you're responsible for self-reporting it.

Eric N.

Author

In my case it's all one account and same stock, but since my only buy was the lot I sold, I'll check whether another purchase explains the broker's flag. Good to know the override path exists though.

When I had a messy batch of wash sale lots from rapid trading, I showed Taxr my 1099-B and had it lay out each lot's adjusted basis after the disallowed losses were added back, then produce a reconciliation I could check against what I entered on Form 8949. Made it much easier to spot where the numbers diverged before I filed.

Eric N.

Author

That reconciliation idea is exactly what I need. My 1099-B has a few other trades and I want to make sure none of the basis numbers carry over incorrectly.

One scenario that changes the answer entirely: if you acquire any options or contracts to buy substantially identical stock during that 61-day window, the wash sale rule can apply to those too. The rule covers contracts and options on stock or securities. Commodity futures and foreign currency are explicitly excluded, but equity options are not.

Good point. The rule is broader than just buying shares directly. An option to buy the same stock within the window counts.

Form 8949 instructions on irs.gov lay out the column (f) codes and column (g) entries in detail. Worth downloading the actual instructions PDF rather than relying on software tooltips, especially for wash sale adjustments, because some programs don't label the columns clearly.

The capital loss deduction limit is also worth keeping in mind. Even if the wash sale loss were fully allowed, losses above your gains are only deductible against other income up to the annual limit on Schedule D — the rest carries forward. So the wash sale disallowance matters most if you were counting on that loss to offset significant income this year. Check Topic no. 409 on irs.gov for how the carryover worksheet works.

Eric N.

Author

Good point. Even if I sort out the wash sale question the deduction cap could still limit what I actually use this year. I'll check Topic 409.