This paper presents the methodology for conducting a cost-optimal energy performance calculation of a solar hot water system, used for space heating and domestic hot water needs. The calculation is based on dynamic hourly methods, according to the new Energy Performance of Buildings’ (EPB) set of standards EN 15316:2017, and a revision of the standard EN 15316-5:2017 from the year 2021, dealing with storage-tank water temperature calculations. The paper provides proposals for modifications to these newly introduced standards, in order to overcome the observed ambiguities and shortcomings. The calculation of annual energy performance of a building was performed on an hourly basis over a year for the reference of an nZEB multi-apartment building, for a climate area of the city of Zagreb, taking into account water temperature change in the layers of the storage tank connected to solar collectors and hot water boilers. The cost-optimal solution was then determined by varying individual parameters of the building technical system. The influence of these parameters on the energy efficiency of the building was analyzed in detail. Furthermore, the results were compared against those obtained by the Croatian calculation algorithm based on the previous set of EPB standards, EN 15316:2008, currently used EU-wide for the energy performance certification of buildings. The results indicated that the calculation methods of the present algorithm underestimated the consumption of building primary energy by 12%. The energy delivered by solar collectors was underestimated by 18%.