Earthworms (Oligochaeta, Lumbricidae) form a significant component of the food web and are the staple diet of many higher‐trophic‐level predators, such as invertebrate‐feeding birds and mammals. Their almost complete digestion in the predator's gut hampers their detection or quantification in faeces or pellets except through labour‐intensive microscopic examination. As a result, the evaluation of earthworms as a component of diet has been neglected in most studies based on pellet analysis. We assess whether the earthworm component of the diet of White Storks Ciconia ciconia can be estimated reliably by measuring soil mass in pellets, and whether the fact that White Storks also consume European Moles Talpa europaea (themselves consumers of earthworms) affects this relationship. We found a significantly higher density of earthworm chaetae, but less soil material, in pellets containing the remains of Moles. This may indicate the secondary origin of some chaetae from the intestines of the ingested Moles. There was a strong relationship and close fit between the number of earthworm chaetae and the mass of soil (material < 0.2 mm) retrieved from all the pellets analysed. Approximating the number of chaetae based on a soil mass of 192 mg per 1000 chaetae yielded results differing by only 4–5% from numbers of chaetae counted directly. This validates the proposed method of indirectly calculating the number of earthworms consumed from the ingested soil mass, which simplifies and shortens the time‐consuming direct counting of chaetae and could contribute to a more detailed description and analysis of diets in wild birds. Such assessments are important in order to improve the detection of changes induced by the progressive simplification and loss of primary food web resources (such as earthworms) within agro‐ecosystems as a consequence of both the rapid intensification of agricultural production and climate change.