Calculation of wage