In this paper, a unified method to analyze a large class of waveguides is reported. Both the lower-order and higher-order modes in regular waveguides can be determined accurately with the QZ factorization. Then the scattering parameters at various waveguide junctions are computed efficiently by this unified method. Numerical results show the accuracy and flexibility of the present method.