Faeces incorporation can alter the concentration patterns of stanols, stanones, ∆⁵-sterols and bile acids in soils and terrestrial sediments. A joint quantification of these substances would give robust and specific information about the faecal input. Therefore, a method was developed for their purification and determination via gas chromatography–mass spectrometry (GC–MS) based on a total lipid extract (TLE) of soils and terrestrial sediments. Stanols, stanones, ∆⁵ -steroles and bile acids were extracted by a single Soxhlet extraction yielding a TLE. The TLE was saponified with KOH in methanol. Sequential liquid–liquid extraction was applied to recover the biomarkers from the saponified extract and to separate the bile acids from the neutral stanoles, stanones and ∆⁵ -steroles. The neutral fraction was directly purified using solid phase extraction (SPE) columns packed with 5% deactivated silica gel. The bile acids were methylated in dry HCl in methanol and purified on SPE columns packed with activated silica gel. A mixture of hexamethyldisilazane (HMDS), trimethylchlorosilane (TMCS) and pyridine was used to silylate the hydroxyl groups of the stanols and ∆⁵ -sterols avoiding a silylation of the keto groups of the stanones in their enolform. Silylation of the bile acids was carried out with N,O-bis(trimethylsilyl)trifluoroacetamide (BSTFA) containing N-trimethylsilylimidazole (TSIM). TLEs from a set of soils with different physico-chemical properties were used for method evaluation and for comparison of amounts of faecal biomarkers analysed with saponification and without saponification of the TLE. Therefore, a Regosol, a Podzol and a Ferralsol were sampled. To proof the applicability of the method for faecal biomarker analyses in archaeological soils and sediments, additional samples were taken from pre-Columbian Anthrosols in Amazonia and an Anthrosol from a site in central Europe settled since the Neolithic. The comparison of the amounts of steroids in combination with and without saponification of the TLE showed that high amounts of faecal biomarkers occur bound to other lipids and were liberated by saponification. The method was evaluated by standard addition. The standard contained 5β-stanols, 5β-stanones and their 5α-isomers together with ∆⁵ -sterols and bile acids (19 substances). The standard addition revealed mean recoveries of individual substances ≥85%. The recoveries of biomarkers within each biomarker group did not differ significantly. Precisions were ≤0.22 (RSD) and quantification limits were between 1.3 and 10 ng g⁻¹ soil. These data showed that the method can be applied for quantification of trace amounts of faecal steroids and for the analyses of steroid patterns to detect enhanced faeces deposition in soils and sediments.