Calculation of material consumption