Calculation of earnings and rates