Nonuniform transmission lines (NTLs) are widely used in pulsed power accelerators because they provide an efficient way to achieve impedance matching and pulse shaping. Since designing and constructing these accelerators typically demands substantial effort, finding the optimal impedance profile to maximize the power transmission efficiencies of the NTLs is important. In this paper, a convenient numerical method to determine the optimal impedance profile is proposed. First, the output of the NTL with arbitrary parameters is theoretically analyzed under arbitrary input conditions. It was found that only four factors affect the power transmission efficiency: the ratio of output impedance to input impedance, the ratio of input pulse width to the NTL’s one-way transit time, the normalized impedance profile, and the normalized input pulse. Based on these findings, a method designed to minimize the reflected component within the working frequency range is proposed. Using this method, an impedance profile demonstrating superior power transmission efficiency compared to the traditional exponential profile is identified. This work can provide a rapid and effective method to determine the impedance profile of the NTL, undoubtedly benefiting the design process of pulsed power accelerators. Published by the American Physical Society 2024