Electrons generated in matter by photons could be a fundamental basis for an adequate analysis of radiation effects and damage. We have studied separately the ‘primary electrons’ generated directly by photons from the ‘secondary electrons’ (SE) produced by electron–electron interactions. In this work, track-average linear energy transfer, , of SE in LiF:Mg,Ti and liquid water produced by twelve photon energy beams from 20 kV x-ray to 60Co gamma rays have been investigated using the EGSnrc Monte Carlo Code. The exposure of LiF:Mg,Ti in different phantom materials has been considered. Depending on the photon energy, SE represent 40%–90% of the total electron fluence (TEF) between 1 keV and 10 keV, being higher when the photon energy increases. Independent of the medium, versus mean photon energy displays a local minimum at around 40 keV, followed by a local maximum at ~80 keV–100 keV. The of SE generated by the x-ray beams are of order of 11 keV µm−1 to 19 keV µm−1 in LiF:Mg,Ti and 5 keV µm−1 to 9 keV µm−1 in liquid water which represent 3–5 times those produced by 60Co gamma rays in both media. These values were considerably greater than those of TEF, by factors of 3–8. Furthermore, of SE generated in liquid water by 20 kV–200 kV x-rays are similar to those of 76 MeV–120 MeV 3He ions. Contrary to the TEF, where were independent of the phantom material, at low photon energies of SE was found to be sensitive to the surrounding medium showing higher values within the phantom than in air. This result, which agrees with published experimental results, implies the importance of the SE ionization density for an understanding of dosimeter response induced by photon beams.