The energy loss near edge structure of the carbon-K ionization edge in electron energy loss spectra (EELS) combined with (scanning) transmission electron microscopy is used to determine the content of sp2-hybridized carbon atoms in diamond-like carbon (DLC) films using highly ordered pyrolytic graphite as a reference material. EELS experiments are performed under magic angle conditions to eliminate orientation-dependent intensity contributions to the C–K edge of graphite. The classical two-window method is applied with the optimized settings of energy-loss integration windows for the π* and σ* states. Optimization is achieved by varying the width of integration windows taking solid state physics aspects into account. Electron-transparent specimens were prepared by the focused-ion-beam technique. It is shown that damage to the specimen is induced despite application of low-energy Ga+-ions during the final preparation stage which leads to an error in the quantification of sp2-content. A model for the correction of this damage is proposed which is validated by tests on highly ordered pyrolytic graphite and the DLC materials.