Just a detail: remember to think cautiously with unpaired electrons. Pairing itself removes very little energy by magnetic interaction, but the nearer charges may raise the energy; pairing is rather a means to put two electrons on the same orbital.
If pairing permits a lower sum of energies, say in a covalent bond where both electron can be in a new favourable molecular orbital, fine. But if several orbitals have about the same energy, then the electrostatic repulsion tends to spread them unpaired on different orbitals, and this happens especially for transition metals - or in O2 for instance.