How Far Away Is a Storm?
A lightning discharge gives an observer two signals: a flash and a sound. The flash arrives essentially at once; the thunder does not. That disparity turns the delay between them into a range estimate.
The governing idea is simple. Light travels so fast that, over terrestrial distances, its travel time is negligible for ordinary observation. Sound travels much more slowly, so the thunder takes measurable time to arrive. A larger delay therefore means a larger distance. The observable quantity is the time gap between seeing the lightning and hearing the thunder.
If the discharge occurs at distance $d$, then the arrival times of the flash and thunder are
\[t_{\mathrm{opt}}=\frac{d}{c}, \qquad t_{\mathrm{ac}}=\frac{d}{v_s},\]where $c$ is the speed of light and $v_s$ is the local speed of sound. The observed lag is therefore
\[\Delta t=t_{\mathrm{ac}}-t_{\mathrm{opt}} =\frac{d}{v_s}-\frac{d}{c} =d\left(\frac{1}{v_s}-\frac{1}{c}\right).\]This is the key relation: under fixed propagation speeds, the delay is proportional to distance.
Solving for $d$ gives the exact inversion formula
\[d=\frac{\Delta t}{\frac{1}{v_s}-\frac{1}{c}} =\frac{v_sc}{c-v_s}\,\Delta t.\]Since $c\gg v_s$, this simplifies sharply. Rewriting,
\[d=v_s\Delta t\cdot \frac{1}{1-v_s/c}.\]Now $v_s/c$ is extremely small. With $v_s\approx 343\ \mathrm{m\,s^{-1}}$ and $c\approx 3\times 10^8\ \mathrm{m\,s^{-1}}$,
\[\frac{v_s}{c}\approx 1.1\times 10^{-6}.\]Hence
\[\frac{1}{1-v_s/c} =1+\frac{v_s}{c}+O\!\left(\frac{v_s^2}{c^2}\right),\]so
\[d =v_s\Delta t\left(1+\frac{v_s}{c}+O\!\left(\frac{v_s^2}{c^2}\right)\right) \approx v_s\Delta t.\]The optical correction is therefore smaller than the leading term by about one part in a million. For storm-scale distances, it is negligible. To leading order,
\[d\approx v_s\Delta t.\]That is the entire method: the flash marks the initial time, the thunder marks the later arrival, and the difference between them converts directly into distance through the sound speed.
For practical use, it is convenient to express the estimate in miles. Taking
\[v_s\approx 343\ \mathrm{m\,s^{-1}}\approx 0.213\ \mathrm{mi\,s^{-1}},\]one obtains
\[d\approx 0.213\,\Delta t \quad \text{miles}.\]Equivalently,
\[\frac{1}{0.213}\approx 4.7,\]so sound travels about one mile in 4.7 seconds. For mental arithmetic, this rounds to the field rule
\[d\approx \frac{\Delta t}{5}\quad \text{miles}.\]This is the version worth remembering: every 5 seconds of delay is about 1 mile. Thus
\[5\ \mathrm{s}\to 1\ \text{mile},\qquad 10\ \mathrm{s}\to 2\ \text{miles},\qquad 15\ \mathrm{s}\to 3\ \text{miles},\qquad 30\ \mathrm{s}\to 6\ \text{miles}.\]The more precise leading-order values are
\[5\ \mathrm{s}\quad \mapsto \quad d\approx 0.213(5)=1.07\ \text{mi},\] \[10\ \mathrm{s}\quad \mapsto \quad d\approx 0.213(10)=2.13\ \text{mi},\] \[15\ \mathrm{s}\quad \mapsto \quad d\approx 0.213(15)=3.20\ \text{mi},\] \[30\ \mathrm{s}\quad \mapsto \quad d\approx 0.213(30)=6.39\ \text{mi}.\]The “divide by five” rule is simply a rounded version of these calculations: not exact, but accurate enough for immediate use.
A modest refinement comes from temperature dependence. In dry air, near standard conditions, the sound speed may be approximated by
\[v_s \approx 331+0.6T_C \quad \mathrm{m\,s^{-1}}.\]Using
\[T_C=\frac{5}{9}(T_F-32),\]this becomes
\[v_s \approx 320.3+0.333\,T_F \quad \mathrm{m\,s^{-1}}.\]Thus a more refined estimate is
\[d\approx \frac{320.3+0.333\,T_F}{1609}\,\Delta t \quad \text{miles}.\]At $68^\circ!F$, this reproduces $v_s\approx 343\ \mathrm{m\,s^{-1}}$, the standard value used above. Across ordinary outdoor temperatures, this correction is modest and does not materially change the field rule.
The essential point is that the estimate uses two physical inputs from the same discharge: first the flash, then the thunder. The measurable quantity is their arrival-time difference,
\[\Delta t=t_{\mathrm{ac}}-t_{\mathrm{opt}},\]and that difference is, to an excellent approximation, proportional to the distance. See the flash, count the seconds to the thunder, and divide by 5: that is the miles estimate, and the mathematics behind it is precisely the travel-time relation above.