I have a question about wash sales.

Here's the scenario: let's say I'm trading XYZ with the following transactions:

  • December 10, 2019, Buy 100 shares of XYZ [Lot 1] @ $100 each
  • December 17, 2019, Buy 100 shares of XYZ [Lot 2] @ $105 each
  • December 18, 2019, Sell Lot 2 @ 106 each
  • January 6 2020, Sell Lot 1 @ $90 each

So let's analyze this situation.

First, let's pretend the last (January) transaction did not happen. There are no sales at a loss, so there is no wash sale. Then the only sale in 2019, the sale of Lot 2, has capital gains of $100, which are part of the 2019 fiscal year.

But now let's add in the sale of Lot 1 in January. This is a sale at a loss (a $1000 capital loss), so the wash sale rule applies. Within the 61 day wash sale window around January 6, there is one purchase of "substantially identical" stock: the purchase of Lot 2 in early December. Therefore the loss is moved into the cost basis of Lot 2. As a result, the cost basis of Lot 2 becomes $115 instead of $105. But then the sale of Lot 2 later in December is now a loss of $900 instead of a gain of $100.

So in summary, adding the January sale triggered the wash sale rule and moved losses backwards into the previous fiscal year. This seems entirely contrary to the intent of the wash sale rule. Is my interpretation of what would happen correct? If not, what communication by the IRS indicates that something would happen differently than I have indicated?

I've noticed that a lot of places on the internet, including other questions on this site, treat complicated wash sale scenarios as mostly academic and not worth the time/effort to answer. In particular, the advice given is often to avoid wash sales (thereby avoiding the complicated scenario) instead of actually answering the question. So to be completely clear, I don't currently have this situation in my finances but something like the above (just more complicated) may actually happen to me within the next couple of years. "Just don't do those transactions (in order to avoid wash sales)" is not a solution for me because I have unavoidable automatic transactions in the form of RSU vests and auto-sales.

2 Answers 2


The end goal of the wash sale rule is to cause you to carry forward your basis on the position you still have. In the example stated, you don't have a position on Jan 6, and if you don't buy another one in 31 days, you don't have a wash sale because you don't have a basis for your position in XYZ to account for. You have completely disposed of your position and your final transaction accounts for your remaining basis.

If you do buy in another lot in 31 days, or you structure the example with three lots purchased and two lots sold, then you might have a wash sale, but that's not your example.

Context from the IRS; I have bolded the key line.

Wash Sales You cannot deduct losses from sales or trades of stock or securities in a wash sale unless the loss was incurred in the ordinary course of your business as a dealer in stock or securities.

A wash sale occurs when you sell or trade stock or securities at a loss and within 30 days before or after the sale you:

Buy substantially identical stock or securities, Acquire substantially identical stock or securities in a fully taxable trade, Acquire a contract or option to buy substantially identical stock or securities, or Acquire substantially identical stock for your individual retirement account (IRA) or Roth IRA.

If you sell stock and your spouse or a corporation you control buys substantially identical stock, you also have a wash sale.

If your loss was disallowed because of the wash sale rules, add the disallowed loss to the cost of the new stock or securities (except in (4) above). The result is your basis in the new stock or securities. This adjustment postpones the loss deduction until the disposition of the new stock or securities. Your holding period for the new stock or securities includes the holding period of the stock or securities sold.


To make your life easier, the advice is to avoid carryover wash sales which defer losses into the next tax year. Wash sales that occur during the year where there is no carry forward position do not affect your tax bill. They only affect the manner in which the gains and losses are accounted for in the filing.

Wash sale violations do not move losses backwards into the previous fiscal year. They move the losses forward into the next year. Here are your paired trades (out of date order):

December 17, 2019, Buy 100 shares of XYZ [Lot 2] @ $105 each December 18, 2019, Sell Lot 2 @ 106 each

You have a gain of $100 toward 2019 taxes.

December 10, 2019, Buy 100 shares of XYZ [Lot 1] @ $100 each January 6 2020, Sell Lot 1 @ $90 each

You have a loss of $1,000 toward your 2020 taxes.

For the first sale, it would not have mattered which lot you sold because either trade would have been for a gain. There is no wash sale violation because you incurred no loss in 2019.

If you had sold either of the long lots for a loss in 2019 then the other purchase would have triggered the violation and the loss would have been deferred until 2020.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .