Spatial resolution of magnetoencephalography (MEG) was studied by computer simulations using a spherical conductor model for the head. The accuracy obtainable in the absolute location of a dipole was found by calculating the confidence limits for source location in 3 dimensions. The accuracy in determining the relative locations of two sources was estimated by calculating the smallest shift in source location that could be detected with statistical significance. The results were used to illustrate the dependence of spatial resolution on several factors including noise, source depth, source strength, flux transformer configuration and the choice of the measurement locations. Under optimal conditions, separations of a couple of millimeters in superficial non-simultaneous sources can be detected, whereas for deeper sources the resolution is worse.