This work concerns the use of the iterative algorithm (KMF algorithm) proposed by Kozlov, Mazya and Fomin to solve the Cauchy problem for Laplace’s equation. This problem consists to recovering the lacking data on some part of the boundary using the over specified conditions on the other part of the boundary. We describe an alternating formulation of the KMF algorithm and its relationship with a classical formulation. The implementation of this algorithm for a regular domain is performed by the finite element method using the software Freefem. The numerical tests developed show the effectiveness of the proposed algorithm since it allows to have more accurate results as well as reducing the number of iterations needed for convergence.