Unit content
Molar mass from a chemical formula
The molar mass of a chemical species is the mass of one mole of that species. For a compound, it is obtained by adding the molar-mass contributions of all atoms in its chemical formula.
The numerical atomic masses listed in the periodic table correspond, to ordinary chemical precision, to elemental molar masses in $\mathrm{g/mol}$. If a formula contains $n_i$ atoms of element $i$ with atomic molar mass $M_i$, then
$$M_{\text{compound}}=\sum_i n_iM_i.$$
For calcium nitrate,
$$\mathrm{Ca(NO_3)_2},$$
one formula unit contains one Ca, two N and six O atoms. Using
$$M_{Ca}=40.08,\quad M_N=14.01,\quad M_O=16.00\ \mathrm{g/mol},$$
we obtain
$$\begin{aligned} M_{\mathrm{Ca(NO_3)_2}} &=40.08+2(14.01)+6(16.00)\ &=164.10\ \mathrm{g/mol}. \end{aligned}$$
Therefore a $0.500,\mathrm{mol}$ sample has mass
$$m=nM=(0.500)(164.10)=82.05,\mathrm g.$$
Conversely, a measured mass can be converted to amount of substance using
$$n=\frac{m}{M}.$$
The formula determines which elemental masses must be counted; the mole converts that microscopic composition into a macroscopic mass scale.