Knowing how many shares you bought, the price per share when you bought them and the current price per share it calculates your profit or loss