Distributed Generation (DG) can help in reducing the cost of electricity to the costumer, relieve network congestion and provide environmentally friendly energy close to load centers. Its capacity is also scalable and it provides voltage support at distribution level. Hence, DG placement and penetration level is an important problem for both the utility and DG owner. DG allocation and capacity determination is a nonlinear optimization problem. The objective function of this problem is the minimization of the total loss of the distribution system. Also high levels of penetration of DG are a new challenge for traditional electric power systems. This paper presents a new methodology for the optimal placement of DG and penetration level of DG in distribution system based on General Algebraic Modeling System (GAMS) and Genetic Algorithm (GA).