Calculating grams of product formed