Hybrid systems composed of solar photovoltaic (PV) and battery storage units are reliable and clean technologies for utilization in off-grid cases. Optimal sizing of these systems results in more cost-effective units, which is the main subject of various researches. The current work focuses on the assessment of an optimization approach for finding the optimum size of PV/battery hybrid unit in order to provide the required electricity of the case study and reach the minimum Total Life Cycle Cost (TLCC). In this regard, the components of the designed systems are modelled; afterwards, the objective function is established on the basis of TLCC. In the optimization procedure, a constraint is considered for the highest possible loss of power in order to have a system with acceptable reliability. In addition, Improved Harmony Search (IHS) algorithm is applied to determine the variables with optimal quantities for satisfying the required electricity in the most cost-effective condition. The calculated results are compared with harmony search and simulated annealing algorithms to evaluate the reliability of the applied method. The outcomes show that employing IHS leads to more promising results and it has higher robustness compared with the HS and simulated annealing algorithms. Moreover, the number of units in the hybrid system reduces by increment in the loss of power supply probability.