This paper discusses optimizing DG location and size to reduce power loss and bus voltage deviation index in a 51-bus radial distribution network. Optimization of DG placement uses the firefly algorithm, and optimization of DG size uses the differential evolution (DE) algorithm. The results showed that the optimal locations were on buses 16, 45, and 15, with the highest sensitivity indices of 0.6667, 0.0612, and 0.0601. DG at a lagging power factor of 0.95 gives optimal results with sizes of 358.5157, 500.0000, and 499.9781 kW. Active and reactive power loss reduction is 44.6948% and 66.7038% of the system's power loss without DG. In optimizing DG placement, AMFA converges faster than DE, GA, and ICA. In the case of DG size optimization, the DE algorithm converges quicker and gives the most optimal results with a fitness value of 0.12385 which is smaller than the FA, GA, and ICA algorithms.