This document presents a two-stage methodology for optimizing the location and sizing of distributed generation (DG) resources in transmission and distribution systems to reduce losses. The first stage uses a fuzzy inference system to determine optimal DG locations based on loss and voltage indices. The second stage uses a gravitational search algorithm to compute the optimal DG sizes at the identified locations to minimize losses. The proposed approach is tested on IEEE 5-bus, 14-bus, and a 62-bus Indian practical system, demonstrating reductions in losses and improvements in voltage profiles.