This paper presents a new technique for analyzing a non-uniform transmission line (NUTL). This method expands the differential equations of voltage and current as the slope functions. Then, differential equations are solved using the explicit Runge–Kutta technique with the fourth-order method with four stages. It is shown that the proposed method can be used not only for analyzing the NUTL but also for analyzing the no-uniform waveguides (NUWG). Additionally, it is shown that the sensitivity of the proposed method concerning the discretization error is suitable. Several theoretical and practical NUTLs and NUWG are investigated to verify the proposed method’s accuracy and advantages. The performance of the proposed method is compared with those obtained by the other popular techniques, such as uniform cascaded sections (UCS).