The major and minor element chemistry of silicate glass is commonly measured using electron probe microanalysis (EPMA). The volatile content (H2O +/- CO2) can, additionally, be quantified using "volatiles by difference" (VBD), but a review of literature data shows that this method consistently overestimates the volatile content. We propose that sub-surface charging during EPMA reduces analytical totals, consequently elevating VBD. Sub-surface charging produces an internal electric field due to trapped implanted electrons, resulting in fewer X-rays being generated and their depth of generation being shallower. The maximum electric field strength required to produce the observed overestimation of VBD is calculated to be similar to 10(-1) V.nm(-1). Crystals are often used as standards for glass analysis but, as amorphous materials have more defects in the band gap, glasses can trap more electrons resulting in greater amounts of sub-surface charging. As this is not included in matrix corrections, it causes errors for glass analyses, but not for crystal analyses. By calibrating VBD using hydrous glass standards, the effect of charging can be incorporated, and volatile contents can be determined to an accuracy of +/- 0.1 wt%, compared to overestimation by similar to 1 wt% using conventional VBD methods.