The valence electrons are those that are furthest from the nucleus.
The valence electrons are in the highest occupied electron energy level in an atom.
e.g. (1) sodium has 11 electrons so the electron structure can be written as 2. 8. 1 or
Whichever notation you are familiar with you can see that sodium has 1 outer valence electron.
e.g. (2) chlorine has 17 electrons so the electron structure can be written as 2.8.7 of
In each case you can see that there are 7 electrons in the outer energy level.