In this paper, we present a reliable algorithm, the variational iteration method, to obtain exact solutions of electrostatic potential problems defined by poisson equation which is given boundary and initial conditions. The problem region containing the charge density is subdivided into triangular elements. In this scheme the solution takes the form of a convergent series with easily computable components. Some examples are given. Numerical results show that the variation iteration method is easy to implement and accurate when applied to differential equations.