The atomic masses listed in the periodic table are not always whole numbers because they take into account the natural abundance of isotopes of an element. Isotopes of an element have different numbers of neutrons, resulting in slightly different atomic masses.
The atomic mass listed in the periodic table is a weighted average of the masses of all the naturally occurring isotopes of that element, taking into consideration their relative abundances. Since the abundance of each isotope can vary, the atomic mass is a weighted average, which may result in a decimal value.
For example, carbon has two stable isotopes, carbon-12 and carbon-13. Carbon-12 is the most abundant isotope, with an abundance of about 98.9%, while carbon-13 has an abundance of around 1.1%. The atomic mass of carbon is calculated as the weighted average of these isotopes' masses, taking into account their abundances. As a result, the atomic mass of carbon is 12.011 amu, which reflects the weighted average of carbon-12 (12 amu) and carbon-13 (13.003 amu).
Therefore, the inclusion of decimal values in atomic masses on the periodic table reflects the weighted average of isotopic masses to provide a more accurate representation of the element's typical atomic mass based on its isotopic abundances.