A novel energy index to assess plants capable of producing electricity from a renewable source is introduced in this paper. This index allows to evaluate the bidirectional energy flows on the external power grid, due the electricity exported to the grid from a renewable-based system and the electricity imported from the grid, in comparison to the electricity demand of a building. In this paper, attention is focused on a solar photovoltaic (PV) system satisfying the energy demands of an office building. Electricity from the solar PV system is partly used to operate a ground source heat pump to meet space heating and cooling demands, and partly used for other electrical loads. An energy, economic and environmental impact analysis of the proposed system is also reported. A sensitivity analysis varying the photovoltaic system capacity (2.5–10.0 kW) and the battery storage size (3.2–9.6 kWh) is also carried out. A saving in terms of primary energy and a carbon dioxide emission reduction can be obtained by a renewable-based system compared to a conventional one consisting of a natural gas fuelled boiler for space heating, an electric chiller for space cooling and the national power grid for electricity demand.