solution is proposed to make use of the rainwater thermal energy in highly urbanised areas. It is demonstrated that the stormwater heat represents an additional on-site renewable energy available for hot water production. The proposed solution increases multi-functionality in the urban infrastructure that is essentially used to mitigate impacts from extreme climate events. The integrated system model applications correspond to local area conditions in the north-eastern Baltic region. This study considers the optimal collection of stormwater through maximizing the water absorbed heat usage in relation to hot water consumption in different building types (residential, public and commercial). Two key parameters, `stormwater volume in storage tank' and `rainwater catchment area', are determined. A genetic algorithm finds a number of storage tank fillings corresponding to rainfall statistics and the hot water consumption of buildings. System cumulative expenses are related to the stormwater storage and the rainwater harvesting expenses.