A new spectral domain formulation of the propagation characteristics for planar and coplanar lines is presented. It is based on a newly established variational principle, valid for a spatial as well as for a spectral formulation. In combination with conformal mapping, it drastically reduces the complexity of the numerical computation and leads to rapidly convergent results even when higher order modes are considered. Mathieu functions are shown to be very efficient expressions for trial fields of the dominant and the higher order modes in slots. Calculation is fast: it is made on-line on a regular PC. Results obtained on open and shielded lines have been successfully checked with new experimental data and with previously published data. The method is general enough to accommodate gyrotropic substrates. The paper however is limited to isotropic media.