Using the spin-Hamiltonian formalism the magnetic parameters are introduced through the
components of the Lambda-tensor involving only the matrix elements of the angular momentum
operator. The energy levels for a variety of spins are generated and the modeling of the
magnetization the magnetic susceptibility and the heat capacity is done. Theoretical formulae
necessary in performing the energy level calculations for a multi-term system are prepared with
the help of the irreducible tensor operator approach. The goal of the programming lies in the
fact that the entire relevant matrix elements (electron repulsion crystal field spin-orbit
interaction orbital-Zeeman and spin-Zeeman operators) are evaluated in the basis set of
free-atom terms. The modeling of the zero-field splitting is done at three levels of
sophistication. The spin-Hamiltonian formalism offers simple formulae for the magnetic
parameters by evaluating the matrix elements of the angular momentum operator in the basis set
of the crystal-field terms. The magnetic functions for dn complexes are modeled for a wide
range of the crystal-field strengths.