Technically molar mass cannot be in grams, it is in grams per mole. and it refers to a specific number of molecules of a substance, therefore substances have different molar masses because the elements have different weights. for example having 10 water molecules would be a lot heavier than having 10 air molecules