Hybrid energy systems (HESs) comprising photovoltaic (PV) arrays and wind turbines (WTs) are remarkable solutions for electrifying remote areas. These areas commonly fulfil their energy demands by means of a diesel genset (DGS). In the present study, a novel computational intelligence algorithm called supply-demand-based optimization (SDO) is applied to the HES sizing problem based on long-term cost analysis. The effectiveness of SDO is investigated, and its performance is compared with that of the genetic algorithm (GA), particle swarm optimization (PSO), gray wolf optimizer (GWO), grasshopper optimization algorithm (GOA), flower pollination algorithm (FPA), and big-bang-big-crunch (BBBC) algorithm. Three HES scenarios are implemented using measured solar radiation, wind speed, and load profile data to electrify an isolated village located in the northern region of Saudi Arabia. The optimal design is evaluated on the basis of technical (loss of power supply probability [LPSP]) and economic (annualized system cost [ASC]) criteria. The evaluation addresses two performance indicators: surplus energy and the renewable energy fraction (REF). The results reveal the validity and superiority of SDO in determining the optimal sizing of an HES with a higher convergence rate, lower ASC, lower LPSP, and higher REF than that of the GA, PSO, GWO, GOA, FPA, and BBBC algorithms. The performance analysis also reveals that an HES comprising PV arrays, WTs, battery banks, and DGS provides the best results: 238.