This paper proposes a program which defines the least costly vehicle following a driving cycle. An exhaustive research is making by the algorithm for find the optimal configuration of the car between the size of the batteries and the powers of the electrical machine and the heat engine. Cost during the life duration and performances are calculated for each configuration in order to determine optimal hybridization rate. The proposed method helps engineers to have a better sense of hybridization rate during design process of a hybrid, plug-in hybrid or full electric vehicle.