The MACRO detector was located in the Hall B of the Gran Sasso underground laboratories under an average rock overburden of 3700 hg/cm2. A transition radiation detector composed of three identical modules, covering a total horizontal area of 36 m2, was installed inside the empty upper part of the detector in order to measure the residual energy of muons. This paper presents the measurement of the residual energy of single and double muons crossing the apparatus. Our data show that double muons are more energetic than single ones. This measurement is performed over a standard rock depth range from 3000 to 6500 hg/cm2.