The molecular mass of a substance (less accurately called molecular weight and abbreviated as MW) is the mass of one molecule of that substance and is expressed in terms of the molecular mass unit u (equal to 1/12 the mass of one atom of carbon-12). The molecular mass can be calculated as the sum of the atomic masseses of all the atoms of any one molecule.
The molecular mass of a substance is equal to the mass in grams of one mole of that substance; this follows from the definition of "mole" and Avogadro's number. Therefore,
Strictly speaking, the molecular mass is not precisely equal to the sum of the atomic masses, but a little bit lower. This is because of the energy of the chemical bonds, which is equivalent to mass according to special relativity. This difference is negligible however.Nitpicking