According to the increasing worldwide attention to energy and environmental performances of the building sector, the exploitation of renewable energy sources (RESs) represents a key strategy toward sustainable buildings. However, which is the ‘best’ mix of RES systems in new or existing buildings? This paper proposes a novel methodology, aimed to optimize the design of the mix of renewable energy systems for the integration of building energy demand in terms of energy uses for space heating/cooling, domestic hot water and electric devices. More in detail, a multi-objective optimization is performed by considering two contrasting objectives to be minimized: primary energy demand and investment cost. The global cost is investigated too, as further criterion, in order to detect the cost-optimal solution. Moreover, the fulfillment of the minimum levels of RES integration – as provided by Italian regulations – is taken into account as constraint. The optimization procedure is based on a genetic algorithm, which is performed by employing EnergyPlus and MATLAB®. As case study, the methodology is applied in order to optimize the renewable energy mix for a typical new Italian residential building, located in Naples (Mediterranean area). Thermal solar systems, photovoltaic panels and efficient heat pumps are investigated as RES systems.