Characteristic energies of photonic modes are a sensitive function of a nanostructures’ geometrical parameters. In the case of translationally invariant planar waveguides, the eigen-energies reside in the infrared to ultraviolet parts of the optical spectrum and they sensitively depend on the thickness of the waveguide. Using swift electrons and the inherent Cherenkov radiation in dielectrics, the energies of such photonic states can be effectively probed via monochromated electron energy-loss spectroscopy (EELS). Here, by exploiting the strong photonic signals in EELS with 200 keV electrons, we correlate the energies of waveguide peaks in the 0.5–3.5 eV range with planar thicknesses of the samples. This procedure enables us to measure the thicknesses of cross-sectional transmission electron microscopy samples over a 1–500 nm range and with best-case accuracies below ±2%. The measurements are absolute with the only requirement being the optical dielectric function of the material. Furthermore, we provide empirical formulation for rapid and direct thickness estimations for a 50–500 nm range. We demonstrate the methodology for two semiconducting materials, silicon and gallium arsenide, and discuss how it can be applied to other dielectrics that produce strong optical fingerprints in EELS. The asymptotic form of the loss function for two-dimensional materials is also discussed.