The document describes a two-stage method for optimal allocation of capacitors in a radial distribution system. In the first stage, loss sensitivity factors are used to calculate candidate locations for capacitors. In the second stage, a harmony search algorithm is used to minimize total costs, including capacitor costs and power loss costs, by determining the optimal capacitor sizes and numbers placed at the candidate locations. The method is tested on 33-bus and 69-bus test systems and results in reduced power losses and costs compared to the base case without capacitors.