Chemical element
Whereas the mass number simply counts the total number of neutrons and protons and is thus a natural (or whole) number, the atomic mass of a single atom is a real number giving the mass of a particular isotope (or "nuclide") of the element, expressed in atomic mass units (symbol: u). In general, the mass number of a given nuclide differs in value slightly from its atomic mass, since the mass of each proton and neutron is not exactly 1 u; since the electrons contribute a lesser share to the atomic mass as neutron number exceeds proton number; and (finally) because of the nuclear binding energy. For example, the atomic mass of chlorine-35 to five significant digits is 34.969 u and that of chlorine-37 is 36.966 u. However, the atomic mass in u of each isotope is quite close to its simple mass number (always within 1%). The only isotope whose atomic mass is exactly a natural number is C, which by definition has a mass of exactly 12 because u is defined as 1/12 of the mass of a free neutral carbon-12 atom in the ground state.
Law of definite proportions
A related early idea was Prout's hypothesis, formulated by English chemist William Prout, who proposed that the hydrogen atom was the fundamental atomic unit. From this hypothesis was derived the whole number rule, which was the rule of thumb that atomic masses were whole number multiples of the mass of hydrogen. This was later rejected in the 1820s and 30s following more refined measurements of atomic mass, notably by Jöns Jacob Berzelius, which revealed in particular that the atomic mass of chlorine was 35.45, which was incompatible with the hypothesis. Since the 1920s this discrepancy has been explained by the presence of isotopes; the atomic mass of any isotope is very close to satisfying the whole number rule, with the mass defect caused by differing binding energies being significantly smaller.