Methods for localizing electrical dipolar sources in the brain differ from one another by the models they use to represent the head, the specific formulas used in the calculation of the scalp potentials, the way that the reference electrode is treated, and by the algorithm employed to find the least-squares fit between the measured and calculated EEG potentials. The model presented here is based on some of the most advanced features found in other models, and on some improvements. The head is represented by a three-layer spherical model. The potential on any point on the scalp due to any source is found by a closed formula, which is not based on matrix rotations. The formulas will accept any surface electrode as the reference electrode. The least-squares procedure is based on optimal dipoles, reducing the number of unknowns in the iterations from six to three. The new method was evaluated by localizing five implanted dipolar sources in human sensorimotor cortex. The distances between the locations of the sources as calculated by the method, and the actual locations were between 0.4 and 2.0 cm. The sensitivity of the method to uncertainties encountered whenever a real head has to be modeled by a three-layer model has also been assessed. © 1990 IEEE