This paper presents a new methodology for optimally designing transformer-less grid-connected PV inverters to minimize lifetime levelized cost of energy (LCOE) by calculating the optimal switching frequency and component values and types. The optimization considers failure rates to account for reliability and maintenance costs over the PV system lifetime. A design example shows the optimized inverters have lower total manufacturing and maintenance costs while injecting more energy into the grid compared to non-optimized designs.