The idea of this paper is behind the development of sizing optimization model based on a new optimization algorithm to optimize the size of different stand-alone hybrid photovoltaic (PV)/wind turbine (WT)/battery system components to electrify a remote location including ten residential buildings located in Rafsanjan, Kerman, Iran. Then, the optimal system is estimated on the basis of various inconstant parameters related to the renewable energy system units: the number of batteries, occupied region by the turbine blades rotation, and occupied space by the group of solar panels. The solar radiation, ambient temperature, and wind velocity data are achieved from the website of renewable energy and energy efficiency organization of Iran. The ant lion optimizer is suggested to find the optimal values of the parameters for satisfying the electrical load demand in the most cost-effective way. The results obtained from the simulation illustrate that the off-grid PV/WT/battery hybrid power system is the more promising method to provide the electricity consumption of an urban location. To evaluate the performance of the proposed method, the simulation results are compared with other hybrid energy systems, which optimized by particle swarm optimization (PSO), harmony search (HS), firefly algorithm (FA), and differential evolutionary (DE) algorithm. The results obtained by the investigated algorithms show that the PV/WT/battery system that is optimized by ALO method is more economical in compared with PV/battery and WT/battery hybrid systems.