Determining the optimum size of the prime mover of combined cooling heating and power (CCHP) systems due to significant impact on energetic, environmental and economic results of these systems is very vital and essential. In this study, based on energy, exergy, environmental, and economic (4E) analysis the optimum capacity of the gas engine (GE) for CCHP systems have been investigated. The evaluation study performed by using a proposed evaluation function (EF) and genetic algorithm (GA) optimization methods for a sample official building in Iran. Regarding eight constraints, the optimum size of GE based on EF and GA optimization methods calculated 70 and 74.3437 kW, respectively. By comparing the results obtained from EF and GA methods, it was concluded that EF method calculate the same optimal capacity with little difference and with the same accuracy of GA method. This is while proposed EF method does not have the complexity of GA optimization algorithm and is simpler. © 2019 American Institute of Chemical Engineers Environ Prog, 38:e13146, 2019