Combined cooling, heat and power (CCHP) system is an effective way to reduce primary energy consumption and carbon dioxide emissions by generating heat, cooling and electricity simultaneously from the same fuel source. In this study, an economic optimization model which aims to determine optimum capacity of the system components, has been developed by linear programming theory. With and without electricity buyback scenarios was conducted in a building in Tehran to evaluate the proposed model. With electricity buyback, both excess electricity and excess heat are more valuable than without electricity buyback via selling to grid and feeding to absorption chiller respectively. So with electricity buyback, the optimum sizes of the CHP unit and absorption chiller increase and the optimum size of the electrical chiller decreases. Also it can be seen that the size of internal combustion engine is the largest among the others since it has the lowest capital cost.