The mass number gives an estimate of the isotopic mass measured in atomic mass units (u). For C, the isotopic mass is exactly 12, since the atomic mass unit is defined as 1/12 of the mass of C. For other isotopes, the isotopic mass is usually within 0.1 u of the mass number. For example, Cl (17 protons and 18 neutrons) has a mass number of 35 and an isotopic mass of 34.96885. The difference of the actual isotopic mass minus the mass number of an atom is known as the mass excess, which for Cl is –0.03115. Mass excess should not be confused with mass defect which is the difference between the mass of an atom and its constituent particles (namely protons, neutrons and electrons).
There are two reasons for mass 
excess:
# The neutron is slightly heavier than the proton. This increases the mass of nuclei with more neutrons than protons relative to the atomic mass unit scale based on C with equal numbers of protons and neutrons.
# Nuclear binding energy varies between nuclei. A nucleus with greater binding energy has a lower total energy, and therefore a lower mass according to Einsteins mass–energy equivalence relation E = mc'. For Cl, the isotopic mass is less than 35, so this must be the dominant factor.