Computation of profit