I am trying to understand how the replacement stock is selected when applying the wash sale rule. This is in the USA. I have scoured the IRS publications that seem relevant and am still unenlightened.

Here is a situation (same stock throughout). This reflects a (one of many, unfortunately) situation I have, and am getting lost trying to reverse engineer the transactions.

I buy 2,000 shares on Jan 1. The way the transaction goes is that the first 1,000 are bought at $11 and the second 1,000 are bought at $9.

I buy 1,000 shares on Jan 2 at $9.

I sell 1,000 shares at $10 on Jan 3.

Which shares are the replacement shares for the wash sale on Jan 3? The 1,000 bought at $9 on Jan 1 or the 1,000 bought on Jan 2?

I am, in general, trying to understand the specific mechanics that apply when determining which stock is the replacement stock. Any pointers to relevant publications, etc, would be much appreciated.


I am familiar with Publication 550, etc. I have have many wash sales over many years and have even written a Python script to unravel my 1099B. Unfortunately, the frequency of wash sales I have incurred over the years has increased, and I keep hitting 'corner cases' which require understanding the rules in increasing levels of detail. This time, I am trying to understand the replacement share dynamics. In particular, which lots are the replacement lots. In the example above, can the replacement shares come from the same buy that triggered the wash?

In particular, it would be great to see the actual rules described somewhere. Most of what I have found are examples, which are nice if they apply unequivocally to my situation, but they don't, and even when they do, it is illustrative and not conclusive.

To clarify:

I am not asking if there was a wash sale, I am asking which are the replacement shares and a pointer to definitive documentation. (In particular, can the replacement shares come from the same buy order?)

To complicate:

To show my confusion, here is a real example. The sells reflect the individual lots reported by my brokerage (I put in one order to sell 1,000, but this was executed in two lots 100, 900):

    05/30/2014 XXX buy      1,000  $88.31/sh.
    06/02/2014 XXX buy      1,000  $88.01/sh.
    06/02/2014 XXX sell      100   $88.27/sh.
    06/02/2014 XXX sell      900   $88.27/sh.

Here the replacement shares for the sell 100 were taken from the 06/02 buy. I would have expected them to come from the remaining 900 in the 05/30 buy.

  • to avoid a wash sale, you'll need to select lots when you sell. Ask your brokerage. They'll let you choose if you sell the $9 shares for $10, or if you prefer to lock in the loss + wash sale, sell the $11, for $10, while moving $1000 in wash sales to the cost of your $9 shares, essentially making them $10 shares. If you go wash sale route, the $1000 gets added to that extra columns on form 8949 - F and G... But like I said can be avoided by selling the more profitable lots first. – Knuckle-Dragger May 26 '15 at 22:54
  • @Knuckle-Dragger: Thanks! I'm interested in the replacement share rules, which are hard to find. – copper.hat May 26 '15 at 23:15
  • Which shares did the broker sell? You would have a 'default' decision on your account, first in first out, is one option. – JoeTaxpayer May 27 '15 at 15:41
  • @JoeTaxpayer: The default rule is FIFO, so the $11 shares would be sold first. – copper.hat May 27 '15 at 15:42
  • As non-US resident with some understanding of the situation in the UK, could someone explain what the significance of a wash sale is in the US? (In the UK, a certain amount of profit per year is tax free, so you want to sell shares to take tax free profits and then re-buy the shares). – gnasher729 May 27 '15 at 15:49

From Pub 550:

More or less stock bought than sold. If the number of shares of substantially identical stock or securities you buy within 30 days before or after the sale is either more or less than the number of shares you sold, you must determine the particular shares to which the wash sale rules apply. You do this by matching the shares bought with an equal number of the shares sold. Match the shares bought in the same order that you bought them, beginning with the first shares bought. The shares or securities so matched are subject to the wash sale rules.

You must match "beginning with the first shares bought."

Activity 1: Buy Lot 1: 1/1 1000 @ $11
Activity 2: Buy Lot 2: 1/1 1000 @ $9
Activity 3: Buy Lot 3: 1/2 1000 @ $9
Activity 4: Sell Lot 1: 1/3 1000 @ $10

If only activity 1 & 4 happened, you'd have bought and sold stock with no wash sale.

If you remove activity 1 & 4 from consideration because they are a "normal" or non-wash sale transaction, then the Activity 2 or Activity 3 trigger a wash sale.

The shares in lot 1 are sold for disallowed loss, so the disallowed basis would be added to shares in lot 2 because lot 2 was purchased before lot 3. (hat tip to user662852 who had much better wording)

Second example:

Activity 5: 05/30/2014 XXX buy      1,000  $88.31/sh.
Activity 6: 06/02/2014 XXX buy      1,000  $88.01/sh.
Activity 7: 06/02/2014 XXX sell      100   $88.27/sh.
Activity 8: 06/02/2014 XXX sell      900   $88.27/sh.

Activity 5, 7, and 8 all together would not be a wash sale. The addition of activity 6 creates a wash sale.

The shares in Activity 5 are sold for a disallowed loss in Activity 7 & 8 because of the wash sale triggering purchase in Activity 6. Activity 6 is where you add the disallowed basis because they are the "first shares bought" that cause the wash sale rule to be triggered.

  • 1
    Lot 1 is sold for disallowed loss, so the disallowed basis would be added to shares in lot 2 – user662852 May 27 '15 at 17:54
  • @user662852: I would interpret the rules as saying that Lot 2 above are the replacement shares, but would like something more definitive. – copper.hat May 27 '15 at 17:58
  • @AlexB: Thanks, let me check my records, I believe I have an example where the replacement stock was not taken from the same buy order (note in the above example that I only put in one order, but it executed at different prices), I need to understand what was different in that situation. – copper.hat May 27 '15 at 18:09
  • 1
    AlexB: At the risk of derailing the point of my question (documentation :-)), I have added an actual transaction above where the replacement stock was not taken from the lot that I would have expected as in @user662852's comment above. – copper.hat May 27 '15 at 18:32
  • @copper.hat I think it is the same situation but just looks different. I added those buys and sells as a second example. – Alex B May 27 '15 at 18:42

Edited: Pub 550 says 30 days before or after so the example is ok - but still a gain by average share basis.

On sale your basis is likely defaulted to "average price" (in the example 9.67 so there was a gain selling at 10), but can be named shares at your election to your brokerage, and supported by record keeping. A Pub 550 wash might be buy 2000 @ 10 with basis 20000, sell 1000 @9 (nominally a loss of 1000 for now and remaining basis 10000), buy 1000 @ 8 within 30 days. Because of the wash sale rule the basis is 10000+8000 paid + 1000 disallowed loss from wash sale with a final position of 2000 shares at 19000 basis. I think I have the link at the example: http://www.irs.gov/publications/p550/ch04.html#en_US_2014_publink100010601

  • Thanks, I am familiar with Pub. 550, unfortunately :-). The examples do not clarify what happens in the example above. The example above is a simplified version of a real situation I am trying to untangle, which is why I am looking for 'the rules'. As an aside, you cannot use the average share basis except in some very specific situations (see 'Identification not possible' in Pub. 550) which do not apply above. – copper.hat May 27 '15 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.