This paper presents design and analysis of a single phase multilevel inverter by optimizing both switching angles and DC link voltage of a cascaded inverter. The switching angles and dc link voltage are chosen such that to minimize the total harmonic distortion of the output voltage. The main power devices are switched only once per cycle , so that to overcome the switching loss problem, as well as electromagnetic interference (EMI) problem, a method is given to determine the optimum value of the switching angles and the value of the dc link voltage. Theoretical analysis and simulation of a single phase 5-level cascaded inverter are introduced with a wide range of modulation index.