count the seconds; the storm tells you how far away it is
A lightning flash and its thunder are made at the same moment, in the same place. They do not arrive together, and the reason is a plain difference of speed. Light crosses a kilometre in about three millionths of a second — for anything happening in the sky, the flash arrives when it happens. Sound needs nearly three full seconds for the same kilometre. So the silence between seeing and hearing is not the storm being slow to speak. It is the sound still travelling, and its length is the distance, measured in the only unit a traveller that slow can use: time.
The arithmetic is one multiplication. Sound moves through air at about v = 331.3 + 0.606·T metres per second, where T is the air temperature in °C — at 20 °C that is 343 m/s. Distance is just speed times the counted seconds: d = v · t. Three seconds at 20 °C is 1.03 km. That is the whole of the folk rule — divide the seconds by three for kilometres, by five for miles — except that the folk rule quietly assumes one temperature, and the slider below lets the air be colder or warmer than the rule supposes. The correction is honest and small: across a 45-degree span of weather, the same three-second gap means 0.99 km in frost and 1.06 km in a heatwave.
Two travellers, one kilometre. Light's bar is not drawn to scale — to scale it would be three millionths of the sound bar's length, far thinner than a pixel. That absence is the point: one of the two arrivals can be treated as the event itself.
Sound at 343 m/s, counted for 3 s: the strike was 1.03 km away (0.64 miles).
What the count really measures is worth naming: not the storm, but the nearest part of one bolt. A lightning channel can run for kilometres across the sky, and each part of it starts its own sound at its own distance — which is why thunder so rarely arrives as one clean crack. The first arrival is the closest point of the channel; the long rolling afterwards is the rest of the bolt, and the hills and air layers beyond it, reporting in late. A rumble that lasts ten seconds is a sound-picture of something long, drawn out in time exactly the way the whole storm announces its distance.
Checked before shipping, by executing this page's own formula: at 20 °C, 3 s gives 1.030 km and 5 s gives 1.717 km (1.07 miles — the divide-by-five rule is a good servant); the exact figures behind the folk rules are 2.91 s per kilometre and 4.69 s per mile. The formula assumes one temperature along the whole path and a straight line; in practice thunder is seldom heard beyond roughly 25 km, because sound bends upward through warming air and never comes back down. Nothing on this page knows whether tonight's storms will come — it only knows how to read them if they do.