The relative atomic mass (symbol = Ar) of an element is the weighted average mass of its naturally occurring isotopes
You calculate the relative formula mass (symbol = Mr) of a compound by adding up all the relative atomic masses of all the atoms present in the formula of the compound
The elements hydrogen, oxygen, nitrogen, chlorine, bromine, iodine and fluorine exist as diamotic molecules. This means that in equations their relative formula masses are twice their relative atomic mass
All other elements are represented by just their symbols in an equation. So their relative formula mass is equal to their relative atomic mass