This paper takes an overall energy system approach to analysing the mismatch problem of zero energy and zero emission buildings (ZEBs). The mismatch arises from hourly differences in energy production and consumption at the building level and results in the need for exchange of electricity via the public grid even though the building has an annual net-exchange of zero. This paper argues that, when looked upon from the viewpoint of the overall electricity supply system, a mismatch can be both negative and positive. Moreover, there are often both an element of levelling out mismatches between individual buildings and an element of economy of scale. For these three reasons mismatches should be dealt with at the aggregated level and not at the individual level of each building. Instead, this paper suggests to compensate the mismatch of a building by increasing (or decreasing) the capacity of the energy production unit. Based on historical data for the electricity supply area in western Denmark, this paper makes a first attempt to quantify mismatch compensation factors. The results indicate that such compensation factors are a little below one for buildings with photovoltaics (PV) and a little above one for buildings with wind turbines.