Calculation of mass in a reaction