Abstract The purpose of this work is to develop an optimization method applicable to stand-alone photovoltaic systems as a function of its reliability. For a given loss-of-load probability (LLP), there are many combinations of battery capacity and photovoltaic array peak power. The problem consists in determining the couple which corresponds to a minimum total system cost. The method has been applied to various areas all over Algeria taking into account various climatic zones. The parameter used to define the different climatic zones is the clearness index KT for all the considered sites. The period of the simulation system is 10 years.