Since Berkhoff proposed the mild-slope equation in 1972, it has widely been used for calculation of shallow water wave transformation. Recently, it was extended to give an extended mild-slope equation, which includes the bottom slope squared term and bottom curvature term so as to be capable of modeling wave transformation on rapidly varying topography. These equations were derived by integrating the Laplace equation vertically. In the present study, we develop a finite element model to solve the Laplace equation directly while keeping the same computational efficiency as the mild-slope equation. This model assumes the vertical variation of wave potential as a cosine hyperbolic function as done in the derivation of the mild-slope equation, and the Galerkin method is used to discretize it. The computational domain was discretized with proper finite elements, while the radiation condition at infinity was treated by introducing the concept of an infinite element. The upper boundary condition can be either free surface or a solid structure. The applicability of the developed model was verified through example analyses of two-dimensional wave reflection and transmission.