How do you convert moles and grams to formula units?
Technically, (in a given chemical formula) molecular mass, molar mass, formula mass and formula unit mass are numerically the same.
If you were given the number of moles, you can convert it to grams by multiplying it to the respective atom or molecule’s mass.
For example, you are given 2 moles of ##H_2O##. How many grams of ##H_2O## do you have? (Molecular weight of ##H_2O## = 18.0g/mol)
##2 cancel (mol)## x ##(18 grams)/(1 cancel “mol”)####H_2O## = 36 grams ##H_2O##
The formula is vice-versa if you were given the number of grams instead of moles.
For the molecular weight/molar mass, you can compute this by actually adding up the atomic weights of the given molecule. Again, for example, the water molecule has 2##H## atoms (atomic weight = 1.01 g/mol) and 1 ##O## atom (atomic weight = 16.0 g/mol).
Thus,
(2 x 1.01 g/mol) + 16.0 g/mol = 18.01 g/mol
For the formula unit mass, it is usually defined as the mass of a unit of an ionic compound.
But then again, rarely (if at all) exists at individual level so to avoid confusing yourself, the value for, say, molecular mass of ionic compound ##NaCl## (58 g/mol) is numerically the same as its formula unit (58 unit or amu).