The total Hamiltonian of an atom in a magnetic field is
where  is the unperturbed Hamiltonian of the atom, and  is the perturbation due to the magnetic field:
where  is the magnetic moment of the atom. The magnetic moment consists of the electronic and nuclear parts; however, the latter is many orders of magnitude smaller and will be neglected here. Therefore,
where  is the Bohr magneton,  is the total electronic angular momentum, and  is the Landé g-factor.
A more accurate approach is to take into account that the operator of the magnetic moment of an electron is a sum of the contributions of the orbital angular momentum  and the spin angular momentum , with each multiplied by the appropriate gyromagnetic ratio:
where  and  (the latter is called the anomalous gyromagnetic ratio; the deviation of the value from 2 is due to the effects of quantum electrodynamics). In the case of the LS coupling, one can sum over all electrons in the atom:
where  and  are the total spin momentum and spin of the atom, and averaging is done over a state with a given value of the total angular momentum.
If the interaction term  is small (less than the fine structure), it can be treated as a perturbation; this is the Zeeman effect proper. In the Paschen–Back effect, described below,  exceeds the LS coupling significantly (but is still small compared to ). In ultra-strong magnetic fields, the magnetic-field interaction may exceed , in which case the atom can no longer exist in its normal meaning, and one talks about Landau levels instead. There are intermediate cases which are more complex than these limit cases.