Get your taxes done using TurboTax

If you sold 100 shares, it could be, 

a) your triggering buy was before you sold,

b) your triggering buy was after you sold, 

c) a combination of a) and b)

 

Consider  you bought 5 shares on the 11th day before selling and another 5 shares on the 10th day before selling.

If you buy 10 shares within the time window, then the loss disallowed will be on 10 shares SOLD.

 

Stock is sold FIFO, so that tells you which 10 shares will have their loss disallowed.

The loss is assigned to the earliest shares BOUGHT, in order until all are assigned.

 

See IRS Pub 550 for the rules, where even the examples are confusing.