Calculation of mass of reactants and products