A systematic evaluation of dipole localization accuracy using the boundary element method is presented. EEG simulations are carried out with dipoles located in the right parietal and temporal regions of the head. Uniformly meshed and locally refined head models are considered in both spherical and realistic geometries. An initial study determines the influence upon the localization accuracy of the dipole depth below the brain surface, of its orientation (radial and tangential), and of the global and local mesh densities. Simulated potential data are computed analytically in the spherical case, and numerically using a very fine (locally refined) model in the realistic case. Results in both geometries show that in order to get localization errors of about 2-4 mm, uniformly meshed models may be used for dipoles located at depths greater than 20 mm, whereas locally refined models should be used for shallower dipoles. Two other studies show how the localization accuracy depends upon the size of the local refinement area and upon the number of electrodes (19, 32, 63). Results show that a large number of electrodes brings significant improvements, especially for shallow and tangential dipoles.