How to calculate profit?