Abstract The performance of a boiler with a built-in thermal storage unit is presented. The thermal storage unit is an insulated water tank that absorbs surplus heat from the boiler. The stored heat in the thermal storage unit makes it possible to heat even when the boiler is not operating, thus increasing the heating efficiency. A system with three components is described. The model of the system and the mathematical model were made using the TRNSYS program package and a test reference year (TRY). The degree of efficiency, which optimizes the thermal storage volume and the heating power of the boiler, was determined. The thermal storage must also ensure that the heat is stored at the highest possible exergy level, and complete mixing of the water is a condition for optimizing the thermal storage. The matching of the boiler’s heating capacity with the thermal storage unit ensures a supply of heat even when the boiler is not operating.