The magnetopause exerts a tremendous influence on magnetic field within the magnetosphere.In this paper we have calculated the magnetic field of the magneto-pause on following assumptions: (1) the earth's magnetic field is a dipole field;(2) the magnetopause is an ideal conductor so that the perpendicular component of the total magnetic field at the magnetopause is zero;(3) the magnetopause is regular and is composed of three parts: a hemisphere,a cylinder and a cap.At first we evolute the spherical harmonic coefficients by the method of least square,then trace the magnetic field lines by means of numerical integral.The results are that on sunward side the magnetic field,especially the position of the neutral point and the shape of the polar cusp are close to the observational results.But on anti-sunward side,in the vicinity of the equator the calculated magnetic field lines are not parallel to the equator,this result indicates that the effects of the current sheet in the magnetotail can not be neglected in this region.We have made this calculation for three angles between the magnetic dipole and the direction of the solar wind: 90°,the average situation of the earth's magnetosphere;60°,the extreme situation of the earth's magnetosphere;and 0?the situation of the Uranus' magnetosphere.