Reliance on fossil-fuel-dominated grid has increased congestion, raised capital and operating costs, and intensified greenhouse-gas emissions. To mitigate these interrelated challenges, the present study proposes an optimal-sizing methodology for grid-connected hybrid power plants employing the Hybrid Optimization of Multiple Energy Resources (HOMER) software. A comparative case study was conducted for a primary school located in three Algerian climatically distinct regions: Tlemcen, Adrar, and Constantine. The optimization process aims to simultaneously minimize the Net Present Cost (NPC) and Levelized Cost of Energy (LCOE), while adhering to predefined renewable-fraction (RF) constraints. Results show that grid-tied configurations with a high (PV) contribution achieve NPC values ranging from 515758$ to 989946$ and LCOE between 0.032 $/KWh to 0.047 $/kWh. Additionally, lifecycle CO2 emissions are reduced by up to 50 %, underscoring the environmental benefits of the proposed systems. Collectively, beyond their techno-economic viability, these findings provide a practical framework for accelerating the adoption of renewable energy in educational institutions, thereby supporting Algeria’s broader energy transition strategy and providing replicable solutions for other emerging economies pursuing sustainable electrification.