The atomic masses listed on the periodic table are not whole numbers because they take into account the natural abundance of isotopes of an element. Isotopes are atoms of the same element that have different numbers of neutrons in their nuclei, resulting in slightly different atomic masses.
Most elements have multiple isotopes, and their relative abundance in nature can vary. The atomic mass listed on the periodic table is a weighted average of the masses of all naturally occurring isotopes of an element, taking into account their abundance. The atomic mass is weighted by the percentage of each isotope found in nature.
Since the atomic masses are calculated using the average masses of the isotopes, which are not whole numbers, the resulting atomic masses are typically decimal numbers. These values provide a more accurate representation of the average mass of the atoms of a given element in nature, accounting for the isotopic variations.