If you sold 120 shares, your cost basis using the FIFO method would be as follows: (100 × $20 per share) + (20 × $15 per share) = $2,300 The average cost method may also apply and is the total ...