A very fast and efficient approach for gravity data inversion based on the regularized conjugate gradient method has been developed. This approach simultaneously inverts for the depth (z), and the amplitude coefficient (A) of a buried anomalous body from the gravity data measured along a profile. The developed algorithm fits the observed data by a class of some geometrically simple anomalous bodies, including the semi-infinite vertical cylinder, infinitely long horizontal cylinder, and sphere models using the logarithms of the model parameters [log(z) and log(|A|)] rather than the parameters themselves in its iterative minimization scheme. The presented numerical experiments have shown that the original (non-logarithmed) minimization scheme, which uses the parameters themselves (z and |A|) instead of their logarithms, encountered a variety of convergence problems. The aforementioned transformation of the objective functional subjected to minimization into the space of logarithms of z and |A| overcomes these convergence problems. The reliability and the applicability of the developed algorithm have been demonstrated on several synthetic data sets with and without noise. It is then successfully and carefully applied to seven real data examples with bodies buried in different complex geologic settings and at various depths inside the earth. The method is shown to be highly applicable for mineral exploration, and for both shallow and deep earth imaging, and is of particular value in cases where the observed gravity data is due to an isolated body embedded in the subsurface.