Theory:

We know the subatomic particles that make up the atom are incredibly, small.
 
The atomic mass is a fabulous concept that included in the atomic theory proposed by John Dalton. He stated that each element has a characteristic atomic mass.
 
shutterstock_1067668175.jpg
The size of an atom is determined by its atomic mass. An atom is made up of electrons, protons, and neutrons. The atomic mass is the total mass of all protons, neutrons, and electrons in the atom.
But, since the mass of the electron is lesser than the mass of proton and neutron, the atomic mass is the mass of protons and neutrons.
 
shutterstock_1871139085.jpg
Although the number of protons in each atom of a given element remains constant, the number of neutrons in the nucleus varies.
The atomic mass is expressed in grams or atomic mass units \(amu\). According to the new IUPAC guidelines, the atomic mass is written as 'u'- unified mass.
 
Now, we will see the atomic masses of few elements:
  
shutterstock_1227791587.jpg
The number of protons (p) in an atom is known as the atomic number (Z).
 
The cumulative number is the addition of the number of protons, and neutrons in an atom called as the mass number. It is a whole number.
S. No
Elements
Proton + Neutron
Atomic number(Z)
Total number of proton + neutron = Atomic mass (u)
1
Hydrogen
p=\(1 \)n=\(0\)
\(1\)
\(1\)
2
Carbon
p=\(6 \)n=\(6\)
\(6\)
\(12\)
3
Nitrogen
p=\(7 \)n=\(7\)
\(7\)
\(14\)
4
Oxygen
p=\(8 \)n=\(8\)
\(8\)
\(16\)
5
Phosphorus
p=\(15 \)n=\(16\)
\(15\)
\(31\)
6
Sulfur
p=\(16 \)n=\(16\)
\(16\)
\(32\)
Relative atomic mass:
 
shutterstock_1473857000.jpg
 
Different forms of an element with the same number of protons but different numbers of neutrons are known as isotopes.
The average number of protons and neutrons in all-natural isotopes of an element is called the relative atomic mass. It is a decimal value.
The relative masses of the atoms are also referred as atomic weights.
Example:
shutterstock_1827453719.jpg
Carbon has an atomic mass of \(12.011\)
Hydrogen has an atomic mass of \(1.0079\)
Atomic Mass
Reference: