This paper presents mathematical modeling and economic analysis of a medium size combined heat and power (CHP) operation, installed in Poland. The plant is equipped with steam boilers, extraction condensing turbine, and the grade type water boilers. The paper determines the most efficient mode of CHP operations. The economic efficiency analysis is performed for transient seasons, characterized by low demands for heating, which obliged production units to operate out of its nominal conditions at a lower efficiency. The developed method is also suitable for analyzing complex power plants, with a few energy equipments.The developed mathematical model for simulating CHP performance gives the possibility to select the boiler type, and assess the probability and efficiency of each configuration. The dedicated tool calculates the selected operation mode, heating power demand, and enables models comparison. The algorithm includes real equipment operational parameters, technical limitations, actual energy prices and costs regarding energy law acts. The performed analysis is up-to-date, due to a few aspects: permanently increased fossil fuels costs, low electric energy prices, growing costs of CO2 emission allowances, and high electricity production cost on turbine’s condensing section at steam parameters of T = 435 °C and p = 34 bar. A detailed cost analysis is performed on each product separately: thermal energy, electric energy from cogeneration and electric energy from condensation, during every hour, frequently. The calculation is carried every an hour for a period of 24 h, the energy balance is ensured during the calculation. The most important result of this study is a comparison of CHP to water boiler operation profitability, also including the net profit comparison. Furthermore, the cost of the CO2 emission is studied, for the production profitability in two scenarios, as the price increases from 7 EUR/tone to 15 EUR/tone and 30 EUR/tone.