For the efficient analysis of discontinuities in planar circuits a fast computer algorithm is needed based on an uncomplicated theory. In the past the method of lines was successfully applied to planar waveguiding structures and simple two-dimensional cases. In this paper we adapt the method of lines to structures requiring a high number of discretization lines. The two-dimensional discretization and transformation of the Helmholtz equation into the spectral domain are reformulated in an elegant way using the Kronecker product of two matrices. A fast algorithm for the solution of the characteristic equation is developed for periodic structures employing the inversion of block Toeplitz matrices. Any microstrip, finline, or slotline circuit or discontinuity which is composed of several rectangular patches of metallization can be treated in this way. The current distribution of a periodic microstrip step discontinuity is given.