This paper presents a new method (simulated Annealing) for depth determination of a buried structure from residual magnetic anomalies along profile. This method is applied to synthetic data with and without random errors. Finally, the validity of the method is tested on a field example from the Iran. The agreement between the results obtained by the simulated annealing method and other interpretation methods is good. Moreover, the depth obtained by the proposed method is found to be in a very good agreement with the depth obtained from Seismic and drilling information’s. Applying the simulated Annealing method a computer code in FORTRAN is prepared.