Determine the molecular formula of the molecule.
Use the periodic table to determine the atomic mass of each element in the molecule.
Multiply each element's atomic mass by the number of atoms of that element in the molecule. This number is represented by the subscript next to the element symbol in the molecular formula.
Add these values together for each different atom in the molecule. This will give you the molecular mass of the molecule. This is equal to the number of grams in one mole of the substance.
Divide the number of grams of the substance by the molecular mass.