Exergoeconomic analysis of boilers was done to determine the cost of hot water and steam produced by these systems. For this purpose a steady state steady flow model of a boiler was formed with fuel, moist air and liquid water as input streams, flue gases, hot water or steam as output streams. Methane was chosen as fuel. Thermodynamic and economic analysis of the system were done, mass flow rates, exergy and exergetic cost of each stream were calculated for different values of excess air and outlet states of water. Pinch temperature difference was also considered as a parameter in steam production. A computer program was written and numerical simulations were conducted for different values of the parameters mentioned above. Results are presented in the form of graphs which show the cost of the product versus excess air, pinch temperature difference and outlet states of water.