The percent of magnesium (by mass) is based on the mass of magnesium taken and the mass of product which resulted.