The variational iteration method is applied to solve the cubic nonlinear Schrodinger (CNLS) equation in one and two space variables. In both cases, we will reduce the CNLS equation to a coupled system of nonlinear equations. Numerical experiments are made to verify the efficiency of the method. Comparison with the theoretical solution shows that the variational iteration method is of high accuracy. (C) 2006 Elsevier B.V. All rights reserved.