When you sell an investment, the IRS wants to know how much profit you made (or loss you took). The only way to calculate this is by comparing your selling price to what you originally paid—your cost ...