The increasing global temperature has induced many states to limit carbon dioxide emissions. The European Union (EU) promotes replacing boilers with heat pumps. However, in countries where electricity is mainly supplied through fossil fuel combustion, condensing gas boilers may prove to be more ecological heat generators. Although this problem was investigated in a particular situation, an algorithm can be applied elsewhere. The running expenditures for the following different heat generators that are available in a location were estimated: water heat pump, brine heat pump, air heat pump, condensing gas boiler, condensing oil boiler, district heat network, and electrical grid. Furthermore, carbon dioxide emissions from local and distant sources were evaluated. The computations were based on hourly averaged external temperature measurements, which were performed by the Institute of Meteorology and Water Management—National Research Institute (IMGW-PIB) in a weather station in Bialystok (Poland) for a ten-year period. Compared with a condensing gas boiler system, the air-to-water heat pump has higher operating costs and higher CO2 emissions. The brine heat pump (closed-loop ground-source heat pump) has lower operating costs, but higher CO2 emissions than the gas boiler system. The water heat pump (groundwater source heat pump) has the lowest operating costs and CO2 emissions of all the systems studied in this paper.