The present invention provides a shimming method in which an electric current surface that is virtually placed so as to surround a measurement position is assumed from a magnetic field measurement value, in which an electric current distribution that reproduces a measurement magnetic field is reproduced through an electric current potential, and in which the reproduced magnetic field distribution is used. A magnetic moment or an electric current distribution that reproduces a magnetic field distribution obtained by a magnetic field measurement device is estimated on a predetermined closed surface, and, from the estimated magnetic moment or electric current distribution, a magnetic field distribution of an arbitrary point that exists in the closed surface is estimated. Then, on the basis of the estimated magnetic field distribution, a shim magnetic body distribution that produces a correction magnetic field for correcting the magnetic field distribution at the arbitrary point is output.