Atoms consist of protons and neutrons, both similar in weight, plus electrons, which barely contribute any weight to the atom.
So the mass number can be calculated by adding the number of protons to the number of neutrons.
Alternatively it can be read off the periodic table by *rounding off * the atomic mass or atomic weight, which is the decimal number below the atomic symbol.
Due to the presence of isotopes, elements can have some atoms that have a greater mass number than those that are most common. There are also some atoms in the mix that will be smaller.
In some cases the atomic mass will be greater than the mass number calculated above, because the number of stable isotopes with extra neutrons is higher for that element.
For example hydrogen,
There is more information here: