It has been theorized for decades that mitochondria act as the biological clock of ageing, but the evidence is incomplete. Here we show a strong coupling between mitochondrial function and ageing by in vivo visualization of the mitochondrial flash (mitoflash), a frequency-coded optical readout reflecting free-radical production and energy metabolism at the single-mitochondrion level. Mitoflash activity in Caenorhabditis elegans pharyngeal muscles peaked on adult day 3 during active reproduction and on day 9 when animals started to die off. A plethora of genetic mutations and environmental factors inversely modified the lifespan and the day-3 mitoflash frequency. Even within an isogenic population, the day-3 mitoflash frequency was negatively correlated with the lifespan of individual animals. Furthermore, enhanced activity of the glyoxylate cycle contributed to the decreased day-3 mitoflash frequency and the longevity of daf-2 mutant animals. These results demonstrate that the day-3 mitoflash frequency is a powerful predictor of C. elegans lifespan across genetic, environmental and stochastic factors. They also support the notion that the rate of ageing, although adjustable in later life, has been set to a considerable degree before reproduction ceases.