On the Periodic table there are groups 1-8, each of the groups is how many electrons are on the outer shell, i.e. Oxygen has the atomic number of 8, which is the equivalent to 8 protons, and 8 electrons. The first shell has 2 electrons, and the 2nd (last) shell has 6, which means it is in group 6.