We report inelastic mean free paths (IMFPs) of Si3N4 and LiF for electron energies from 50 eV to 200 keV that were calculated from their optical energy‐loss functions using the relativistic full Penn algorithm including the correction of the bandgap effect in insulators. Our calculated IMFPs, designated as optical IMFPs, could be fitted to a modified form of the relativistic Bethe equation for inelastic scattering of electrons in matter from 50 eV to 200 keV. The root mean square (RMS) deviations in these fits were less than 1% for Si3N4 and LiF. The IMFPs were also compared with the relativistic version of our predictive Tanuma–Powell–Penn (TPP‐2M) equation. We found that IMFPs calculated from the TPP‐2M equation are systematically larger than the optical IMFPs for both LiF and Si3N4. The RMS differences between IMFPs from the TPP‐2M equation and the optical IMFPs were 49.3% for LiF and 17.3% for Si3N4 for energies between 50 eV and 200 keV. These RMS differences are much larger than those for most of the inorganic compounds in our previous IMFP calculations where the average RMS difference was 10.7% for 42 inorganic compounds. We also report the development of an improved predictive IMFP formula, which we designate as the JTP equation. This formula is a refinement of the TPP‐2M equation and is based on the recent IMFP calculations for 100 materials including the present IMFPs for Si3N4 and LiF (41 elemental solids, 45 inorganic compounds, and 14 organic compounds) for 83 electron energies between 50 eV and 200 keV. Our predictive JTP equation gave satisfactory results in comparisons of optical IMFPs and IMFPs calculated from the JTP equation. The RMS difference between the 8300 optical IMFPs used for optimization and the IMFPs calculated from the JTP equation was 10.2%. This value is appreciably less than the RMS difference of 16.0% found in a similar comparison of the optical IMFPs and IMFPs from the TPP‐2M equation. Furthermore, IMFPs from the JTP equation were compared with measured IMFPs for energies between 50 eV and 200 keV for 16 elemental solids and 37 inorganic compounds. We found that the JTP equation gave satisfactory results that were comparable with previous comparisons of the optical IMFPs and measured IMFPs. We believe that the JTP equation will be applicable to a wider range of materials than the TPP‐2M equation.