The molecular mass of a substance is the sum of the atomic masses of all the atoms present in a molecule of that substance. It is expressed in atomic mass unit (u).
Thus, to calculate the molecular mass, the mass of all the atoms present in it are added.
For example, Molecular mass of glucose C6H12O6 is = 6 (C) + 12 (H) + 6 (O) = 180 amu.
The molar mass, on the other hand is the mass of one mole (or 6.023 X 1023) particles of that substance.
The molar mass of a substance is numerically equal to the atomic mass or the molecular mass of the substance in ‘u’ and is always measured in grams.
For example, the molar mass or mass of 6.023 X 1023 molecules of glucose is 180g.
Similarly, mass of 6.023 X 1023 atoms of sodium or molar mass of sodium is 23g, but its atomic mass is 23u.
The sum of atomic mass of all the atoms present in the chemical formula of a substance is called its formula mass.
Molecular mass is the average relative mass of a single molecule of the given substance compared to 1/12 the mass of an atom of carbon12.