Distributed generation (DG) is an important element to be considered in distribution planning since it plays a major role in stability and power quality improvement. This paper presents a new method for determining optimal sizing and placement of DG in a distribution system. A multi-objective function is formed to minimize the total losses, average total voltage harmonic distortion, and voltage deviation in the distribution system. The improved gravitational search algorithm (IGSA) is proposed as an optimization techniques and its performance is compared with other optimization techniques such as particle swarm optimization (PSO) and GSA. The load flow algorithm from MATPOWER and harmonic load flow was integrated in MATLAB environment to solve the proposed multi-objective function. Finally, the proposed algorithm is tested on the radial 69-bus distribution system with three case studies. The results show that the IGSA performs better than PSO and GSA by giving the best fitness value and the fastest average elapsed time. V C 2014 AIP Publishing LLC. [http://dx.