In distribution systems minimization of active power loss is very essential to raise the overall efficiency of power system. This article presents a method of reducing the loss by placing shunt capacitors. In this paper a two stage methods have been proposed for optimal allocation of capacitor in a radial distribution system. In first stage loss sensitivity factor is used to calculate the location and secondly the firefly algorithm is used for cost minimization including capacitor cost and cost due to power loss. The proposed method is tested on 33-bus and 69-bus system and results are given below