Underground buildings are pointed out as alternatives to conventional aboveground buildings for reducing total energy requirements, while alleviating land use and location problems. This paper investigates the potential in reducing the heating and cooling energy demand of underground buildings compared to aboveground buildings. Monthly calculations based on EN-ISO 13790 are performed to obtain the annual heating and cooling energy demand of aboveground and underground buildings for various climates, building functions and underground depths. Uncertainty of input parameters is considered in the calculation, and sensitivity analysis is carried out. Energy reduction is achievable for all climates and functions when underground and aboveground buildings, but the magnitude is related to the combination of different design elements. Results show that 11% of cases analysed can be considered near zero-energy buildings (annual energy demand less than 10 kWh/m2y). Sensitivity analysis indicates that the most influential parameters depend on the climate and building function. As expected, building functions with high internal gains perform better in cold climates, and the ones with low internal gains perform better in hot climates.