A heat exchanger for a transformer including 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. A first temperature measurement device measures a temperature of a feed flow of the heat exchanger medium and a second temperature measurement device measures a temperature 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.