In this paper, comparison on air-source heat pump hot water system (ASHP), groundwater source heat pump hot water system (GSHP) and three-heat-source hot-water system (TSHS) were analyzed. The TSHS operates with ASHP running with valley electricity during night, waste heat of bath recycled during afternoon, and wastewater-source heat pump hot water system (WSHP) running with peak electricity. Based on the meteorological parameter condition in Nanjing, environmental temperatures for ASHP were chosen as 35 degrees C, 20 degrees C, 7 degrees C and -6 degrees C respectively, for GSHP, 18 degrees C, for WSHP, 30 degrees C. Other data for these three systems are made the same: fresh water for bath at 45 degrees C, condensing temperature t(k)=58 degrees C, evaporating temperature to be confirmed according to environmental temperature, superheat degree SH-10 degrees C, super cooling degree SC-5 degrees C, isentropic efficiency of compressor eta(i)=0.75. Based on the above condition, thermodynamic calculation and exergy analysis were made on these three systems. Results indicate that: work condition of ASHP varies considerably, while those of GSHP and WSHP are steady on the whole. Annual average exergy efficiency of ASHP (13.82%), which increases accordingly with the increase of high temperature runtime (17.92% maximum), is the weighted average of exergy efficiencies in four environments. The annual average exergy efficiency of GSHP is 15.36% and that of WSHP is 23.97%. The annual average exergy efficiency of TSHS, determined by the rate of the runtime of ASHP and WSHP, which should be calculated with the cost of valley and peak electricity considered, varies between 13.82% and 23.97%. As is shown in the conclusion, TSHS is well worth popularization for it runs at a steady course with low cost and high efficiency, especially for schools which do not need hot water system during the time at the highest and lowest temperature.