Buy 500 shares of xyz on March 1 for $30 a share or $15000. Buy another 500 shares on Sept 1 for $10 a share or $5000. If you sell all 1000 shares on Dec 1 for $22 a share or total of $22000, do you have a wash sale on the first lot of 500 shares. I think not because you did not have a loss on the total 1000 shares that were sold all at once. Am I correct??