The mass of an atom is tiny. A single hydrogen atom is only about 0.000 000 000 000 000 000 000 002 grams!
Dealing with such small numbers is difficult. Therefore, scientists found a simpler way of comparing the mass of different atoms.
They chose the carbon atom and compared all the other atoms with it. Since a carbon atom consists of 6 protons and 6 neutrons, they gave it a mass of 12 units (they ignored the electrons).
The mass of an atom relative to that of carbon-12 is called the Relative Atomic Mass.
If we compare the mass of a hydrogen atom with that of the carbon-12, we find its mass is a 1/12th of the carbon-12 atom. Therefore, a hydrogen atom is assigned the mass unit 1.
When a magnesium atom was compared, its mass was found to be twice that of carbon-12, therefore magnesium was assigned the mass unit 24.
Many elements possess atoms with differing masses due to them having different numbers of neutrons.
The atoms shown above belong to the isotopes of chlorine. They have different masses because one has two more neutrons than the other. Also it was found that chlorine-35 is more abundant than chlorine-37. For every four chlorine atoms, one will be a chlorine-37 the other three will be chlorine-35. Therefore, the average mass of a chlorine atom is 35.5.
The presence of isotopes and their abundances must be taken into account when calculating Relative Atomic Mass (RAM).
The RAM of an element is the average mass of its isotopes relative to an atom of carbon-12.
If you calculate the RAM of a substance, and then weigh out that number of grams of the substance you can calculate the number of atoms or molecules that it contains.
Carbon has a RAM of 12, if you were to weigh out exactly12 grams of carbon it would contain 602 000 000 000 000 000 000 000 carbon atoms.
24 grams of magnesium would contain 6.02 x 1023 magnesium atoms.
56 grams of iron would contain 6.02 x 1023 iron atoms.
18 grams of water would contain 6.02 x 1023 water molecules.
One mole of a substance is 6.02 x 1023 particles of that substance. It is obtained by weighing out the RAM or the formula mass in grams.