In this paper we evaluate a heuristic methodology to obtain the optimal placement and size of distributed generation in order to minimize the distribution utilitypsilas cost. Technical aspects like energy losses and voltage levels are considered, as well as economic aspects like price of energy, investment and operating cost of distributed generation and cost of losses. We use the IEEE 13 nodes test feeder.