The number of moles of magnesium reacted is based on the mass of magnesium taken and the molar mass of magnesium (24.31 g per mole of Mg). For the data above, the number of moles of magnesium would be given by the following.

 
Moles Mg = 0.3397 g Mg x (1 mole Mg/24.31 g Mg) = 0.01397 moles Mg