The expressions of the matrix elements of the electron spin–spin contact interaction have been tabulated for all the states arising from fn configurations. Numerical calculations have been carried out for a large number of lanthanide atoms and ions using accurate numerical Hartree–Fock functions.