We present an empirical determination of the mass-loss rate as a function of stellar luminosity and effective temperature , for oxygen-rich dust-enshrouded Asymptotic Giant Branch stars and red supergiants . To this aim we obtained optical spectra of a sample of dust-enshrouded red giants in the Large Magellanic Cloud , which we complemented with spectroscopic and infrared photometric data from the literature . Two of these turned out to be hot emission-line stars , of which one is a definite B [ e ] star . The mass-loss rates were measured through modelling of the spectral energy distributions . We thus obtain the mass-loss rate formula \log \dot { M } = -5.65 + 1.05 \log ( L / 10 , 000 { L } _ { \odot } ) -6.3 \log ( T _ { eff } / 3500 % { K } ) , valid for dust-enshrouded red supergiants and oxygen-rich AGB stars . Despite the low metallicity of the LMC , both AGB stars and red supergiants are found at late spectral types . A comparison with galactic AGB stars and red supergiants shows excellent agreement between the mass-loss rate as predicted by our formula and that derived from the 60 \mu m flux density for dust-enshrouded objects , but not for optically bright objects . We discuss the possible implications of this for the mass-loss mechanism .