In this paper, we studied the solitary wave solutions of the (2+1)-dimensional Boussinesq equation u(tt) - u(xx) - u(yy) - (u(2))(xx) - u(xxxx) = 0 and the (3+1)-dimensional Kadomtsev-Petviashvili (KP) equation u(xt) - 6u(x)(2) + 6uu(xx) - u(xxxx) - u(yy) - u(zz) = 0. By using this method, an explicit numerical solution is calculated in the form of a convergent power series with easily computable components. To illustrate the application of this method numerical results are derived by using the calculated components of the homotopy perturbation series. The numerical solutions are compared with the known analytical solutions. Results derived from our method are shown graphically.