The determination of the centre-of-mass energies for all LEP 2 running is presented. Accurate knowledge of these energies is of primary importance to set the absolute energy scale for the measurement of the W boson mass. The beam energy between 80 and 104 GeV is derived from continuous measurements of the magnetic bending field by 16 NMR probes situated in a number of the LEP dipoles. The relationship between the fields measured by the probes and the beam energy is defined in the NMR model, which is calibrated against precise measurements of the average beam energy between 41 and 61 GeV made using the resonant depolarisation technique. The validity of the NMR model is verified by three independent methods: the flux-loop, which is sensitive to the bending field of all the dipoles of LEP; the spectrometer, which determines the energy through measurements of the deflection of the beam in a magnet of known integrated field; and an analysis of the variation of the synchrotron tune with the total RF voltage. To obtain the centre-of-mass energies, corrections are then applied to account for sources of bending field external to the dipoles, and variations in the local beam energy at each interaction point. The relative error on the centre-of-mass energy determination for the majority of LEP 2 running is 1.2 × 10 −4 , which is sufficiently precise so as not to introduce a dominant uncertainty on the W mass measurement.To be submitted to Eur. Phys. J. C.