The practical application of the magnetic virial theorem