The invention relates to a heat exchanger for a transformer for a transformer comprising a heat exchanger medium, which can be introduced into a heat exchanger element via a feed element, and can be evacuated from the heat exchanging element via a discharge element. The invention involves a first temperature measurement of a feed flow of the heat exchanger medium and a second temperature measurement of a discharge flow of the heat exchanger medium. A first opening is provided in the feed element, inside of which a first temperature probe is positioned at a predetermined location inside the feed flow during operation of the heat exchanger, and a second opening is provided in the discharge element, inside of which a second temperature probe is positioned at a predetermined location in the discharge flow during operation of the heat exchanger.