We present a finite element method to compute guided modes in a stratified medium. The major difficulty to overcome is related to the unboundedness of the stratified medium. Our method is an alternative to the use of artificial boundary conditions and to the use of integral representation formulae. The domain is bounded in such a way we can write the solution on its lateral boundaries in terms of Fourier series. The series is then truncated for the computations over the bounded domain. The problem is scalar and 2-dimensional.