how to know if the discount on ESPP purchases was already taxed and should be applied or not in reporting gains from those sales

how to know if the discount on ESPP purchases was already taxed and should be applied or not in reporting gains from those sales,

 

To explain, i know what happens to diff between sell price and fair market price on acquire date, but what happens with diff between fair market price on acquire date and the lower price i got stock at? I was told its possible employer possibly already calculated that as part of base income on W2, so it might be double reported?