The sum of the atomic weights of all the constituent atoms in the molecule of an element or a compound.