This paper describes a methodology for automatic optimization of hybrid electric powertrains. This methodology is developed and implemented in a tool, CAPSimO, and the paper is written in the form of describing the tool. Given the user inputs, which are dynamic vehicle model, driving cycle and optimization criterion, the tool first produces a simplified powertrain model in a form of static maps, before dynamic programming is used to find an optimal power split which minimizes the chosen criterion. The tool does not require that the vehicle model is transparent, which makes it possible to work on models hidden for intellectual property reasons. The paper presents two examples of powertrain evaluation, in terms of fuel consumption, for a parallel and a parallel-series powertrain.