Abstract The pressure in the main natural gas transport pipelines should be reduced for proper consumption in vicinity of cities. A common procedure of reducing pressure in natural gas station (city gate station, CGS) is using expansion valves, which causes the waste of large amount of exergy (availability). In this paper a combined heat and power (CHP) system was used instead which included an expander, gas engines, boilers, a pump and a preheater. A new and relatively quick method for selecting the required number of gas engine/boiler, and determining their nominal power/heating capacity, as well as the expander efficiency are also presented. An objective function named actual annual benefit ($) was defined as the sum of income (from selling electricity) and expenses (such as investment cost, operation and maintenance costs). Subsequently different parts of the objective function were expressed in terms of 9 decision variables. The optimum values of decision variables were obtained by maximizing the objective function using genetic algorithm optimization technique. By applying the above procedure for our case study, it was obtained that two 5.48 (MW) gas engines and one 5.94 (MW) boiler was needed while the payback period was found to be 1.23 (year).