The atomic mass of an element depends on the number of neutrons. Atoms with the same number of protons, but a different number of neutrons are called isotopes and they each have a slightly different atomic mass. So all in all, the average atomic mass depends on the weight of all the isotopes and how frequent each isotope occurs.