Calculate Profit or loss