This paper presents a novel analytical approach to estimate the optimal generation profiles/size and location of a distributed generation (DG) unit that can be integrated into distribution network to attain the lowest level of active loss. This approach considered the impact of significant parameters including daily load profiles, best power limits of a DG unit, and varying injected power profiles of the substation on results of minimum active loss of the distribution network and optimal calculations of DG. Additionally, the DG placement was speedily identified in this approach by using a new active loss expression along with four different scenarios. These scenarios considered a number of assumptions on the load profiles and on the state variables (voltage and angle). The obtained optimal active generation profile was also used to manage the uncertainty in the energy of the wind and photovoltaic distribution generators for achieving the highest loss reduction. Additionally, the exhaustive load flow method was used to check the validity of the analytical approach by using 13-bus and 69-bus distribution networks. The results obtained suggest the effectiveness of this approach in estimating the optimal location and profile/size of DG.