Capacitance-voltage measurements provide an attractive nondestructive method to determine the doping profile in not too highly doped semiconductor layers. However, traditionally the CV method is limited to one space dimension. Also, some error due to the abrupt depletion approximation can occur for steep profiles. In this paper, a numerical measurement data inversion algorithm is presented that circumvents the above limitations of the CV method. It uses a discretization of the doping profile on a one-or two-dimensional grid and involves the repeated solution of a linear least squares system.