Iran's removing subsidy from energy carrier in four years ago leads to spike electricity price dramatically. This abrupt change increases the interest on distributed generation (DG) because of its several benefits such as lower electricity generation price. In Iran among all type of DGs, because of wide natural gas network infrastructure and several incentives that government legislated to support combined cooling, heat and power (CCHP) investors, this type of technology is more prevalent in comparison with other technologies. Between existing CCHP technologies, certain economic choices are to be taken into account. For different buildings with different load curves, suitable size and operation of CCHP should be calculated to make the project more feasible. If CCHP does not well suited for a position, then the whole energy efficiency would be plunged significantly. In this paper, a model to find the optimal size and operation of CCHP and auxiliary boiler for any users is proposed by considering an integrated view of electricity and natural gas network using GAMS software. Then this method is applying for a hospital in Tehran as a real case study. Finally, by applying COMFAR III software, useful financial parameters and sensitivity analysis are calculated.