Recently, the reduction of electricity costs in residential areas has become one of the major research fields. A comprehensive power management system is required to lower the cost of both power generation and consumption. Moreover, the world's energy consumption is continuously increasing. This rise is the consequence of perpetual birth rates and the expansion of factories, which have both significantly increased carbon dioxide emissions and global warming. In order to address these difficulties, hybrid renewable energy systems have evolved in an important way since the development of renewable energy sources. Two meta-heuristic approaches are applied in this paper: the first one is the particle swarm optimization (PSO), which is inspired by the social behavior of bird swarms, and the second one is the whale optimization algorithm (WOA) which is inspired by humpback whale hunting behavior, to tackle the main issue in this work which is decreasing the overall electricity cost of a residential home. The residential home considered in this work consists of two renewable energy sources: a solar panel and the wind turbine, and a power storage system based on battery. This residential home is connected to the main grid through a bidirectional inverter. Furthermore, a comparative optimization study was suggested where we propose two different residential load demands. The results showed the best decrease in the total electricity cost and the best optimal solution by employing the whale optimization approach in both proposed cases.