Abstract A distributed energy system (DES) is recognized as a local energy system. Over the past decade, number of studies in technological fields, economizing and its regulatory aspects corroborated that an increasing attention has been paid toward the planning of these systems. However, lack of a proper planning because of simplifications in the assumptions may overshadow the potentials of the DESs hitherto. Disregarding some intrinsic characteristics of a real world like uncertainties and noises may distort results and consequently undermine its efficiency. This paper mainly focused on designing a building's energy system under demand, costs (like carbon emission cost, primary energy saving…) and prices (like fuel tariff and electricity prices…) uncertainties concerning data insufficiency by means of robust optimization. Various sustainable technologies such as photovoltaic arrays were also considered as an alternative. In order to study the probable consequences, the proposed robust model was applied to a real-world problem and the outcomes were presented, analyzed and compared to the deterministic model's results.