# Why is the mass of a carbon atom greater than the total mass of its protons and electrons?

The atomic mass is also contributed to by $\text{neutrons}$.
The identity of the element is defined by the number of nuclear protons, massive, positively charged, nuclear particles. $Z$, the atomic number, defined the element, $Z = 1 , H$, $Z = 2 , H e$, $\ldots \ldots \ldots Z = 23 , V$.
The nucleus can contain various numbers of neutrons, neutrally charged massive particles, which can act to bind the nucleus together. Differing numbers of neutrons give rise to the existence of isotopes. For $Z = 6$, the element is $C$; i.e. there are 6 massive, positively charged protons in each $C$ nucleus by definition. The most common isotope is ""^12C, that is this ""^12C nucleus contains 6 neutrons in addition. A small number of $C$ atoms have 7 neutrons in their nuclei, i.e. ""^13C; a smaller number have 8 neutrons to give the ""^14C isotope.
The existence of isotopes allows the chemist to interrogate molecular structure by means of such experiments as mass spectroscopy, and (very importantly) by NMR spectroscopy. ""^13C{""^1H} $\text{NMR spectroscopy}$ is routinely performed by chemists in order to characterize and identify organic compounds.