As we already know that nucleus of an atom contains protons and neutrons.
The number of protons and neutrons in an atom of an element is called Atomic mass, or Mass number
Protons and neutrons have the same mass of 1 unit, while electrons are very light and their mass can be ignored and taken as zero.
Atomic Mass = number of protons + number of neutrons
= 6 + 6 = 12
Therefore, the mass number of carbon is 12.