Much effort has been devoted by the World Health Organization (WHO) to eliminate soil-transmitted helminth (STH) infections by 2030 using mass drug administration targeted at particular risk groups alongside the availability to access water, sanitation and hygiene services. The targets set by the WHO for the control of helminth infections are typically defined in terms of the prevalence of infection, whereas the standard formulation of STH transmission models typically describe dynamic changes in the mean-worm burden. We develop a prevalence-based deterministic model to investigate the transmission dynamics of soil-transmitted helminthiasis in humans, subject to continuous exposure to infection over time. We analytically determine local stability criteria for all equilibria and find bifurcation points. Our model predicts that STH infection will either be eliminated (if the initial prevalence value, y(0), is sufficiently small) or remain endemic (if y(0) is sufficiently large), with the two stable points of endemic infection and parasite eradication separated by a transmission breakpoint. Two special cases of the model are analysed: (1) the distribution of the STH parasites in the host population is highly aggregated following a negative binomial distribution, and (2) no density-dependent effects act on the parasite population. We find that disease extinction is always possible for Case (1), but it is not so for Case (2) if y(0) is sufficiently large. However, by introducing stochastic perturbation into the deterministic model, we discover that chance effects can lead to outcomes not predicted by the deterministic model alone, with outcomes highly dependent on the degree of worm clumping, k. Specifically, we show that if the reproduction number and clumping are sufficiently bounded, then stochasticity will cause the parasite to die out. It follows that control of soil-transmitted helminths will be more difficult if the worm distribution tends towards clumping.