You should see three figures. Your cost basis, your gross proceeds and your gains/loss. The 40k is probably the difference between your basis and your proceeds - subtract the two and see if that is it. If the 40k is a positive number it is your profit - if it is negative <40k> then it is how much you lost.