This paper deals with an inverse magnetostatic problem related to the reconstruction of a permanent magnet encapsulated inside the cathode of a magnetron sputtering device. The numerical analysis is aimed to obtain the estimation of a short solenoid equivalent to the unknown magnet. Least squares approach has been used to solve the functional defined as squared sum of the residuals. A comparison of the results obtained with Genetic Algorithm approach and nonlinear system of equations is performed. A regularized solution, which is in good agreement with the experimental data, was found by applying a Newton adapted regularization technique.