A method of calculation of the magnetic circuit of an electromagnet and determination of the traction force is presented. It is based on an approximation of the magnetization curve of closed magnetic cores. Cases of analytical solution of the general differential equation of a magnetic circuit are considered. The expressions obtained for the traction force are envisaged for application in computer calculations and utilization for the purposes of optimization of electromagnets.