Ionization Energy

The energy to pull one electron off a neutral atom is the first ionization energy. Pulling another off the cation you are left with is the second.

The panel names at the top right open and close each panel. Pick an atom in the element panel and pull its electrons off one at a time. Drag a panel by its header to move it.

Each removal leaves the atom more positive, so the electrons that remain are held more tightly. The second is always larger than the first, and the third larger than the second.

What is not steady is how much larger. Once the outermost shell is empty, the next electron has to come out of a closed shell underneath, and the cost jumps by a factor of several. The number of electrons taken before that jump is the number of valence electrons.

Sodium jumps after one electron, so it has one valence electron; magnesium jumps after two, so it has two. The group number falls out of the height of the bars alone.