Nowadays, piston type compressors, having many advantages in compressing gases to high pressures, are preferred. In this study, energy and exergy analysis were performed by using the data obtained from the performance tests of three and four stage piston compressors located in the facilities that carried out compressed natural gas (CNG) filling of the buses of the city of Ankara Metropolitan Municipality. In this study, the temperature, pressure and flow values of the compressors during the filling process was measured. The theoretical analysis of the system was made according to the first and second laws of thermodynamics by using obtained value. In the energy analysis, power is calculated by using the pressure and temperature values at each stage. When the exergy analysis is performed, irreversibility caused by the compressor and the cooling system is considered. The actual power value of the three-stage compressor used in the study was 737.77 kJ/kg calculated from the polytropic state change of 600 kJ/kg, and the real and the polytropic state change values for the four-stage compressor were respectively 560 kJ/kg and 690.64 kJ/kg. The second law efficiency was calculated for each stage, and the highest efficiency was 86.84% at the fourth stage of the four stage compressor. The three-stage compressor has a storage cycle time of 700 seconds while the four stage compressor measures 540 seconds. Considering the total energy cost and other parameters, four stage piston compressors were found more efficient in CNG filling.