In this paper, a new method is presented for mathematical modeling of the buck-boost dc-dc converter in continuous conduction mode (CCM). The proposed method consists of two stages. At first stage, the related relations of the inductor current and the output voltage are obtained using the Laplace transform. In the second stage, the initial values of the inductor current and the output voltage are obtained in each switching interval. In this stage, the Z-transform is used as a tool for determining the initial values of the inductor current and the capacitor voltage. In continuous, after obtaining the time functions of the inductor current and the capacitor voltage, the transient response of the converter is investigated. Also the effect of the converter components on the transient response of the buck-boost dc-dc converter is analyzed by the obtained relations and curves. Finally, the results of the theoretical analysis are compared with the simulation results in PSCAD/EMTDC to prove the validity of the presented subjects.