This paper presents an analysis of the optimal reactive power of distributed generators (DGs) in distribution networks for improving the energy efficiency. In recent years, the increasing awareness of the pollution problem, social issues, and economic factors have rapidly increased the penetration of DGs in the distribution networks. Because of the smart inverter technology, the reactive power of DGs is controllable and can be utilized to improve the energy efficiency of networks. For this purpose, three factors are considered: (1) line loss, (2) load reduction by conservative voltage reduction, and (3) inverter internal loss. These factors should be simultaneously minimized, while satisfying the security constraints, and the optimization problem can be solved based on quadratic programming. The IEEE 37 node test system is selected to show the results of optimal reactive power of DGs. Simulations indicate that the optimal reactive power significantly depends on the load model, the inverter loss model, and the line parameters.