The molar mass of a substance is the mass of one mole of the substance.Carbon-12 has a molar mass of exactly 12 g/mol , by defination.
Important: the molar mass in grams per mole is numerically equal to the formula weight in atomic mass units i.e the molar mass of a compound or molecule in grams per mole , is numercally equal to the sum of the masses of the atoms in the formula.
Notice that the formula of a substance must be known to find its molar mass.
For example : The ethanol whose molecular formula is C2H6O has a molecular weight of 46.1 amu so its molar mass is 46.1 g/mol.
2 atoms of C = 2 x 12 + 6 atoms of H = 6 x 1.008 + one atom of O = 16
total = 24 + 6.048 + 16 = 46.1 amu = 46.1 g/mol