Resonance energy is calculated by comparing the energy of a molecule to that of a non-resonating structure.