Electric power utilities are focusing on the optimal placement and sizing of shunt capacitors (SC) and distributed generation (DG) in radial distribution grids. In this paper, the optimal location and size of SC and DG units will be addressed using the Grey Wolf Optimizer (GWO). The main aim of this paper is to minimize the real power losses. The approach proposed to determine the optimal location is the reconfiguring method which achieved by selecting the bus having the lowest real power losses. The optimal sizing of SC and DG units can be achieved by using GWO. GWO is optimization technique inspired by the social behavior of grey wolves. The algorithm's effectiveness is tested on the IEEE 69 bus system. From the results, it can be concluded that the real power losses have been minimized from 0.2228 [MW] in the initial case to 0.1510 [MW], 0.0831 [MW], and 0.02312 [MW] in the optimal case. The reduction rates of real power losses after the installation single SC units, single DG units, and single SC and DG units are 31.88%, 62.71%, and 89.62%, respectively. The proposed method is characterized by being easy to implement, requires less computational effort, has optimal solutions. © The Institution of Engineering & Technology 2024.