This document presents an optimization of distributed generation placement and sizing in a distribution system to maximize net profit. It formulates the optimization problem considering electricity purchase costs, distributed generation investment and operating costs, and distribution system net savings. The objective is to maximize net savings by reducing electricity purchases through optimal distributed generation. Two stochastic algorithms, genetic algorithm and particle swarm optimization, are used to solve the optimization problem for a 9-bus test system considering multiple load levels. Both algorithms achieved reductions in electricity costs and power losses while maintaining voltage constraints.