In recent years, renewable energy can be seen as one of the important prospect of today's research, as it is likely to enlighten the lives of millions of people by fulfilling demand of electricity in their daily life. The present work focuses on the development of optimal hybrid energy system sizing model based on comparative analysis of particle swarm optimization, genetic algorithm and Homer software for energy index ratio of 1. The model also incorporates renewable fraction, emissions of carbon di oxide from diesel generator, net present cost and cost of energy. The system is developed to supply the demand of 7 un-electrified villages of Dhauladevi block of Almora district in Uttarakhand, India with the help of the available resources of solar, hydro, biomass and biogas energy along with the addition of diesel generator, for meeting out the energy deficit. From the optimization results, minimum cost of energy and maximum renewable fraction are obtained as 5.77 Rs/kWh and 92.6% respectively.