Abstract We propose an approach and the numerical algorithm for mapping the electroencephalographic (EEG) data from the scalp to the cortex. The algorithm is based on the solution of ill-posed Cauchy problem for the Laplace’s equation using tetrahedral finite elements. The FEM-based scheme allows to calculate the volumetric distribution of a potential over the head volume. We demonstrate the usage of the the algorithm for accurate estimation of the depth of electric sources in the head. The algorithm sufficiently increases the spatial resolution of the EEG technique making it comparable with intracranial techniques.