This study utilizes the Moth Swarm Algorithm (MSA) to determine the optimal location and size of capacitors in radial distribution networks to reduce power losses and enhance the voltage profile. Four case studies involving different numbers of capacitors were analyzed using MSA, demonstrating its effectiveness in comparison to other optimization techniques. The results indicate that MSA provides high-quality solutions for optimizing power system performance through capacitor placement.