Most elements exist in nature in more than one isotope. The abundance of the naturally occurring isotopes affects the average atomic mass of the element. The values for atomic mass found on the periodic table are the average atomic weights taking into account the various isotopes. The calculation of the average atomic weight is a weighted average based on abundance. For elements that have only one isotope, the atomic mass is close to the value you would expect, based on the number of protons and neutrons in the nucleus.
Look up the possible isotope for the element of interest. All elements have one isotope and some have two or more isotopes. To calculate the average atomic mass, you must know how many isotopes there are, their abundance and their atomic mass.
Find the natural abundance of each of the isotopes. Record these abundances with the isotope number for the element.
Calculate the atomic mass by using a weighted average. To tabulate a weighted average, multiply each of the isotopes by its percentage abundance. Sum the results for all the isotopes. For example, find the average atomic mass for magnesium. The three isotopes of magnesium are Mg(24), Mg(25) and Mg(26). The percent abundance and mass of each of these isotopes are Mg(24) is 78.9 percent at 23.985, Mg(25) is 10.0 percent at 24.986 and Mg(26) is 11.1 percent at 25.983. The weighted average is calculated by (percent 1 * atomic weight) + (percent 2 * atomic weight) + (percent 3 * atomic weight) = (0.789 * 23.985) + (0.100 * 24.986) + (0.111 * 25.983) = (18.924 + 2.499 + 2.884) = 24.307. The published value is 24.305. Rounding errors can account for the slight difference.