Introduction

The subscripts in the formula for a substance indicate both 
  • the relative numbers of the atoms in one formula unit of the substance, and
  • the relative numbers of moles of those atoms in one mole of the substance.

    The molar mass (M) is the mass of one mole of a substance and has the unit g mol–1.

    The molar mass for a substance can be calculated from its formula and the molar masses of the atoms comprising the substance.  The relevant molar masses are accessed through links in the pages of the following module.
     
    The molar mass of methanol CH3OH can be calculated from the molar masses of C, H and O.
    M(CH3OH) = (12.01 + 4 × 1 + 16 ) g mol–1 = 32 g mol–1

The amount in moles of substance in a given mass in grams can be calculated by dividing the mass by the molar mass.
 
If the molar mass of CH3OH is 32 g mol–1 ,
3.2 g CH3OH  is 0.10 mole CH3OH.

The number of molecules (or formula units) in a given amount in moles of the molecule equals that amount in moles multiplied by the Avogadro constant.
number of molecules (formula units) = n ×

number of CH3OH molecules = 0.10 mol × 6.02 × 1023 mol–1 
number of CH3OH molecules = 6.02 × 1022

 The amount in moles of an atom in a given amount in moles of molecules (formula units) containing that atom is equal to the number of that type of atom present multiplied by the given amount in moles. 
 
In CH3OH, there are four hydrogen atoms.
The amount in moles of H atoms in 0.10 mol CH3OH is 0.40 mol 

The number of atoms in a given amount in moles of atoms containing that atom is equal to the amount in moles multiplied by the Avogadro constant.
 
Each mole of H atoms has 6.02 × 1023 atoms
The calculation is done below for the 0.40 mol of H atoms in 0.10 mol CH3OH
0.4 mol H atoms × 6.02 × 1023 atoms mol–1 = 2.4 × 1023 H atoms