A valence electron is an electron that is the most likely to be involved in a chemical reaction. They are typically the electrons with the highest value of the principal quantum number, n. Another way to think of valence electrons is that they are the outermost electrons in an atom, so they are the most susceptible to participation in chemical bond formation or ionization. The simplest way to identify the valence electrons is to look for the highest number in the electron configuration of an atom (the principal quantum number).
It's worth noting the IUPAC definition of valence is for the single highest valence value that is displayed by an atom of an element. However, in practical use, main group elements of the periodic table may display any valence from 1 to 7 (since 8 is a complete octet). Most elements have preferred values of valence electrons. The alkali metals, for example, almost always display a valence of 1. The alkaline earths tend to display a valence of 2. The halogens usually have a valence of 1, yet may sometimes display a valence of 7. The transition metals may display a range of valence values because the highest energy electron subshell is only partially filled. Those atoms become more stable by emptying the shell, half-filling it, or completely filling it.
- Magnesium's ground state electron configuration is 1s22s2p63s2, the valence electrons would be the 3s electrons because 3 is the highest principal quantum number.
- Bromine's ground state electron configuration is 1s22s2p63s2p6d104s2p5, the valence electrons would be the 4s and 4p electrons.