A finite element solution of the KdV equation is presented. To demonstrate the efficiency of the method two test problems are considered. The numerical solutions of the KdV equation are compared with both the exact solutions and other numerical solutions in the literature. The numerical solutions are found to be in good agreement with the exact solutions. (c) 2005 Elsevier Inc. All rights reserved.