Recent trends in power systems are mostly undergoing research in the area of widespread failures. With the increase in power demand, operation and planning of large interconnected power system are becoming more complex, so power system will become less secure and stable. Operating environment, conventional planning and operating methods can leave power system exposed to instabilities. Voltage stability is one of the phenomena which have result in a major blackout. Moreover, with the fast development of restructuring, the problem of voltage stability has become a major concern in deregulated power systems. FACTS controllers narrow the gap between the no controlled and the controlled power system mode of operation, by providing additional degrees of freedom to control power flows and voltages at key locations of the network because of their flexibility and fast control characteristics. Placement of these devices in suitable location can lead to control in line flow and maintain bus voltages in desired level and so improve voltage stability margins. This paper presents a GA and PSO analysis based allocation algorithm for Unified Power Flow Controller (UPFC) considering Cost function of UPFC device, Voltage stability indices(VSI) for optimal placement, Improvement of voltage profile and Reduction of power system losses. Proposed algorithm is tested on a IEEE- 5 bus and IEEE-30 bus test power system for optimal allocation of UPFC device and results are presented.