how to calculate profit and loss