The chemical formula for water is H2O, and this means it contains 2 hydrogen atoms and 1 oxygen atom. If you then look at the periodic table and find the relative atomic mass for each element you find that: Hydrogen = 1 and Oxygen = 16.So the relative formula mass of H2O is calculated by adding 16 (for the oxygen atom) and 1 (for the first hydrogen atom) and 1 (for the second hydrogen atom) which is 16 + 1 + 1 = 18.