Comparing first, second, and third ionization energies between atoms

Among the elements boron, carbon, nitrogen, and magnesium, what are the first ionization energies from least to greatest? What about the second and third ionization energies?

I understand the first ionization energy is given by the following formula: $\ce{X -> X+ + e-}$, the second ionization energy is given by: $\ce{X+ -> X^2+ + e-}$, and the third ionization energy is given by: $\ce{X^2+ -> X^3+ + e-}$.

The electron configurations of the elements listed are:

$B: 1s^2 2s^2 2p_x^1$

$C: 1s^2 2s^2 2p_x^1 2p_y^1$

$N: 1s^2 2s^2 2p_x^1 2p_y^1 2p_z^1$

$Mg: 1s^2 2s^2 2p^6 3s^2$

I know that magnesium has the lowest first ionization energy because it undergoes the most electron shielding; it is shielded from the positive nuclear charge by the ($1s^2 2s^2 2p^6$ electrons).

I can deduce that nitrogen has a higher I.E. than carbon because they are both shielded by the same electrons, the $1s^2 2s^2$ electrons, but nitrogen has a higher nuclear charge. The same reasoning can be used to conclude that carbon has a higher first ionization energy than boron.

I did the above reasoning with respect to the first ionization energies. How do I apply a similar logic with the second and third ionization energies? Do the second and third ionization energies follow periodicity with respect to periods and groups? What is that trend, if any?

• This table from Wikipedia should help a lot. You can typically follow periodic trends, but there are other factors (like half and fully filled shells) that might cause exceptions. – Tyberius Apr 15 '17 at 3:49
• One thing I would note in addition is that it is difficult to compare across columns and rows at the same time. For example, phosphorus should have a lower first ionization energy than nitrogen because it is in the same column and below it. But comparing nitrogen and say chlorine is more difficult because there are competing trends (decreasing down a column, increasing along a row). – Tyberius Apr 15 '17 at 14:31