A mode-matching approach is presented for the analysis of substrate-integrated waveguide (SIW) circuits. The numerical technique takes advantage of recently developed fabrication techniques employing rectangular-shaped via holes. Discontinuity models involving all-dielectric waveguides and sections with arbitrary numbers of vias are presented and combined into a powerful analysis tool which can be used straightforwardly for the design of SIW components. The influence of the overall substrate width on the circuit performance is investigated. It is found that the computational domain can be significantly reduced without impacting on the computed performances. A design example involving a back-to-back impedance transformer is presented. The results are verified by comparison with the commercially available field solver CST Microwave Studio.