Calculation of grams consumed in a reaction