Calculating grams of product produced