An instrument called a mass spectrometer is used to calculate relative atomic mass.
In a mass spectrometer, atoms are converted to positive ions; these are then deflected by electric and magnetic fields before being detected. The mass of the elements individual isotopes are found as well as their abundance.
Example of a mass spectrum is shown below:
From this data the Relative Atomic Mass can be found.