A sterol occurring naturally across bacteria, yeasts, fungi, algae, higher plants and animals. On exposure to ultraviolet radiation it converts into vitamin D2 (ergocalciferol), a potent anti-rachitic substance. It also serves as a chemical marker of fungal contamination in grains, since mould growth raises ergosterol levels. UV irradiation of ergosterol is the industrial route to vitamin D2 for supplements and fortified foods. Because ergosterol is absent from healthy grain but abundant in fungal membranes, grain buyers use it as a quantitative index of mould damage — high levels predict mycotoxin risk and downgrade milling quality.