How do you calculate the number of valence electrons in an atom?
For elements in Groups 1, 2, and 12 to 18, a valence electron is an electron that has highest principal quantum number n.
For example, how many valence electrons are in arsenic?
Arsenic is in the fourth row of the Periodic Table, so we count from left to right starting with K. From K to Ca, we are filling 4s orbitals. From Sc to Zn, we are filling 3d orbitals, but these are not valence electrons. They do not have the highest principal quantum number (n = 3 instead of 4). From Ga to As, we are putting electrons into 4p orbitals, and these are valence electrons.
Arsenic has five valence electrons.
Transition metals (Groups 3 to 11) have incomplete d subshells. These atoms can use their d electrons for bonding. So the valence electrons for a transition metal are the ns and (n-1)d electrons.
This means that manganese (Mn) has the electron configuration [Ar]4s²3d⁵ and 7 valence electrons.