The atomic weight of an element, also known as the atomic mass, is a weighted average of the masses of all the naturally occurring isotopes of that element. Isotopes are atoms of the same element that have different numbers of neutrons in their nuclei.
An electron is a subatomic particle with a very small mass compared to protons and neutrons. The mass of an electron is approximately 1/1836th the mass of a proton or neutron. Since electrons contribute very little to the overall mass of an atom, they are not included in the calculation of atomic weight.
When determining the atomic weight of an element, the masses of the protons and neutrons in the nucleus are considered, as these are the primary contributors to the mass of an atom. The contribution of the electrons is negligible in comparison and can be ignored for most purposes related to atomic weight calculations.