Mass number refers to the sum of the number of protons and neutrons present in the nucleus of an atom and denoted by A Mass number $=$ Number of protons $+$ Number of neutrons.
Atomic number refers to the number of protons present in an atom. It is denoted by $Z$. Example: An atom of oxygen contains $8$ proton Therefore its atomic number is $8$.