Shunt capacitors are broadly applied in distribution systems to scale down power losses, improve voltage profile and boostsystem capacity. The amount of capacitors added and location of deployment in the system highly determine the advantage ofcompensation. A novel global harmony search (GHS) algorithm in parallel with the backward/ forward sweep power flow techniqueand radial harmonic power flow was used to investigate the optimal placement and sizing of capacitors in radial distribution networksfor minimizing power loss and total cost by taking account load unbalancing, mutual coupling and harmonics. The optimal capacitorplacement outcomes show that the GHS algorithm can reduce total power losses up to 60 kW and leads to more than 18% of costsaving. The results also demonstrate that the GHS algorithm is more effective in minimization of power loss and total costs comparedwith genetic algorithm (GA), particle swarm optimization (PSO) and harmony search (HS) algorithm. Moreover, the proposedalgorithm converges within 800 iterations and is faster in terms of computational time and gives better performance in findingoptimal capacitor location and size compared with other optimization techniques.