Atomic mass is the relative mass of the atoms of an element as compaired to carbon -12 isotope taken as 12 units.Mass spectro is a device by which we can calculate atomic mass.
As such there is no method for calculating the atomic mass.You can calculate mass number by adding number of protons and number of neutrons present in an atom. Atomic mass you have to memorize.