Many papers deal with the calculation of magnetic field using the integral method [1,2]. If the coil consists of straight line and circular arc segments with rectangular cross-sectional winding, the expressions of magnetic field only have analytical terms and one dimensional integrals. Unfortunately, there are some singularities in these expressions when the field points are at some special places in the windings of the coil. These singularities bring on difficulties for the numerical solution of the magnetic field. In this paper, some mathematical treatments to eliminate these singularities are presented which allow accurate numerical solution to the magnetic field.