There has been developed a mathematical model for analyzing the magnetic field in the core of magnetic-fluid seal (MFS) with account of nonlinear magnetic properties of the materials for magnetic core and shaft. To provide for the numerical realization of this model, there was used a finite-element method and Comsol software package.