The math and sources behind thunder timing

Updated · 12 min read

This map times thunder with the Cramer (1993) speed-of-sound equation, a harmonic-mean integration along the sound path, haversine slant range, and a wind-advection term. Each constant traces to a published source, and every value is checked against a reference figure in an automated test.

What is the full calculation from flash to thunder?[1]

Five steps: locate the strike, measure the path from it to you, work out how fast sound travels through that air, adjust for wind, then divide distance by speed. Each step has its own equation and its own error, and one of them dominates all the others.

The pipeline runs in a fixed order. Time-of-arrival triangulation gives a strike position. The haversine formula converts two coordinate pairs into a ground distance. Any height difference turns that into a slant range. The Cramer equation gives the local speed of sound from temperature, pressure, humidity and CO₂. Wind is projected onto the path and added. Travel time is the slant range divided by that final speed.

Worth knowing before any of the detail below: the location error swamps everything else. A 5.6 km position uncertainty is worth about 16 seconds of arrival-time uncertainty, while switching from a crude speed formula to a research-grade one buys back a tenth of a second. The precision is not there because it dominates the answer. It is there because it is free once the harder parts are done, and because being wrong on purpose is a bad habit.

1. Locate
time-of-arrival triangulation across GPS-synchronized stations
2. Measure
haversine ground distance, then slant range for any height offset
3. Speed
Cramer (1993) from temperature, pressure, humidity, CO₂
4. Advect
project the wind vector onto the path and add it
5. Divide
travel time = slant range ÷ ground-relative speed

How is the speed of sound actually calculated?[1][2]

With the Cramer (1993) equation, a sixteen-coefficient polynomial in temperature, pressure, water-vapor mole fraction and CO₂ concentration. It is accurate to about 300 parts per million between 0 and 30 °C, roughly thirty times better than the textbook approximation in humid air.

The familiar classroom formula is 331.3 + 0.606t, linear in temperature and blind to everything else. It is fine for homework. At 20 °C and 100% humidity it returns 343.42 m/s where the Cramer equation gives 344.61 m/s, an error of 1.2 m/s. Over a 10 km path that is about 100 milliseconds.

Cramer's formula appeared in the Journal of the Acoustical Society of America, volume 93 issue 5, pages 2510-2516, with the interpolating equation on page 2514. It is the reference standard for precise acoustic work in air, and it is what this site evaluates for every strike rather than assuming a fixed 343 m/s.

Humidity is the term most people find surprising. Water has a molecular mass of 18, lighter than the nitrogen (28) and oxygen (32) it displaces, so humid air is less dense and carries sound faster. The effect is real but small: 1.25 m/s between bone-dry and saturated air at 20 °C.

Getting humidity into the equation takes two supporting pieces, both from Davis (1992). Saturation vapor pressure comes from a four-term exponential fit, and an enhancement factor corrects for water vapor not behaving as an ideal gas in air. Relative humidity is converted to a mole fraction before Cramer's polynomial ever sees it.

ConditionsCramer 1993Naive 331.3+0.606tDifference
0 °C, dry331.45 m/s331.30 m/s0.15 m/s
20 °C, dry343.36 m/s343.42 m/s0.06 m/s
20 °C, saturated344.61 m/s343.42 m/s1.19 m/s
30 °C, saturated351.47 m/s349.48 m/s1.99 m/s

Why average the speed of sound along the path?[1]

Because air cools with height, so sound is slower higher up. When the path rises, the correct average is the harmonic mean, meaning total distance divided by total time, rather than the arithmetic mean. Averaging speeds directly would give the wrong travel time.

The distinction matters whenever the two ends of the path sit at different heights, which happens with intra-cloud flashes and with terrain. The site integrates the reciprocal of sound speed, called slowness, along the path using Simpson's rule over twenty intervals. Integrating slowness gives time directly, and inverting the mean slowness gives the speed that reproduces it.

Temperature along the path follows the International Standard Atmosphere lapse rate of 6.5 K per kilometer, with pressure from the barometric formula using the standard exponent of 5.25588. For a 2 km apex in 20 °C air the ground speed of 344.11 m/s becomes an effective 340.07 m/s over the whole path, a 4 m/s reduction that a ground-only calculation would miss entirely.

For a purely horizontal path the integration collapses back to the ground-level speed exactly, so the general case costs nothing in the common case.

How does wind change thunder arrival time?

Sound is carried by the air it moves through, so wind adds directly to propagation speed. Only the component along the strike-to-observer path counts. Over 10 km, a 10 m/s tailwind delivers thunder 0.82 seconds early, which is larger than every humidity and pressure correction combined.

The wind vector is projected onto the path with a cosine of the angle between them. The bearing from strike to observer comes from the standard forward-azimuth formula, and the meteorological wind direction is flipped 180 degrees first, because weather reports name the direction wind comes from while the physics needs where it is going.

A pure crosswind projects to nearly zero and barely changes arrival time. A pure tailwind projects to the full wind speed. The result is added to the sound speed, with a floor at half the still-air speed: a headwind never actually stops sound reaching you, it refracts the rays upward instead, so allowing the arithmetic to run to zero would produce nonsense.

Wind also skews how far thunder carries. Downwind, rays bend back toward the ground and the audible range extends; upwind, refraction lifts them away sooner. The site scales the audibility limit by a wind factor clamped between 0.5 and 1.6 rather than treating the range as a fixed circle.

Why is the wavefront drawn as a band instead of a ring?[3]

Because the strike position itself is uncertain by several kilometers, and that uncertainty is the single largest error in the whole calculation. A published study of Blitzortung data found a mean location error near 5.6 km, which at 343 m/s is about 16 seconds of arrival-time uncertainty.

Drawing a single hairline ring would imply a precision the data does not support. The band's inner edge sits one location-error inside the nominal radius. Its outer edge sits one location error plus a channel-extent term outside, because the flash reaches beyond the point that gets plotted.

That asymmetry is deliberate. A lightning flash is not a point source: it is a branching network kilometers across. Thunder arrives first from whichever part of the channel is nearest, which can be several kilometers closer than the located ground termination. The site computes a separate first-thunder bound from a channel extent of 4 km, which is the conservative end of what LMA-measured flash footprints and 10 to 30 second natural thunder durations imply.

For a strike 10 km away in 20 °C air, the main clap arrives at 29.1 seconds but first thunder can arrive at 17.4 seconds, with ±16.3 seconds of location-driven uncertainty around both. Reporting only the 29.1 figure is what makes thunder seem to arrive impossibly early.

How is loudness estimated?

From a 170 dB reference at 10 meters, reduced by geometric spreading and atmospheric absorption. Spreading follows the inverse-square law at 20 dB per decade of distance, or 6 dB per doubling, and absorption removes a further 0.4 dB per kilometer.

Absorption is deliberately modeled as a small constant. Thunder's acoustic energy sits mostly below 100 Hz, where ISO 9613-1 absorption coefficients are genuinely small. The high frequencies that would be stripped fastest are gone within the first few kilometers, which is exactly why distant thunder rumbles rather than cracks.

The output is a rough guide, not a measurement. Terrain, buildings, ground cover and the storm's own rain all change what actually reaches a listener, and none of that is modeled.

DistanceEstimated SPLCharacter
1 km130 dBPainfully loud, sharp crack
5 km114 dBVery loud clap
10 km106 dBLoud, clear thunder
16 km100 dBNear the usual audible limit
25 km92 dBOnly under an inversion

Why is audibility a probability rather than a cutoff?

Because the roughly 16 km limit is statistical, not physical. Whether a given listener hears a given strike depends on refraction, terrain, background noise and rain. The site uses a logistic curve centered on the wind-adjusted limit: about 98% close in, 50% at the limit, a few percent beyond.

The curve has a width of 2.5 km, chosen to match how gradually reports of hearing thunder fall off in the audibility literature rather than switching off at a single radius. The maximum is capped at 98%, because even thunder directly overhead goes unheard indoors or in heavy rain.

The underlying physics is refraction. Air normally cools with height, so sound travels slower higher up, bending the wavefront upward and away from the ground. Past roughly 16 km the sound passes over your head, creating an acoustic shadow zone. A temperature inversion reverses this and can carry thunder 25 km or more, which is why distant storms sometimes sound close on calm nights.

How is a strike's position determined?

By time-of-arrival triangulation. Lightning emits a very low frequency radio pulse that travels at nearly light speed, and stations with GPS-synchronized clocks timestamp its arrival. The differences between those timestamps constrain the source position, and solving across many stations yields a fix.

Each pair of stations turns one arrival-time difference into a hyperbola of possible source positions, since a fixed difference in distance to two fixed points defines a hyperbolic curve. A third station adds a second hyperbola, and the intersection gives a two-dimensional position. More stations overdetermine the system, and the solver fits the position that best satisfies all of them at once.

The timing precision required is severe. Radio waves cover about 300 meters per microsecond, so a one-microsecond clock error moves the answer 300 meters. This is why GPS discipline is not optional: ordinary network time synchronization is thousands of times too coarse. It is also why the strike timestamps this site receives are expressed in nanoseconds.

Strikes shown here are typically detected by 15 to 40 stations simultaneously. Each solution carries the list of contributing stations, and the map can draw the exact set that produced any given fix.

VLF pulse
the discharge radiates a broadband burst that propagates thousands of km
GPS timestamp
each station records arrival time to nanosecond precision
Hyperbolic fit
each station pair constrains the source to one hyperbola
Overdetermined solve
15 to 40 stations fit one position that best satisfies all timings
Quality metrics
circular gap and deviation span grade the resulting fix

What makes one strike position better than another?[3]

Station geometry, more than station count. If every detecting station sits on one side of a strike, the position is poorly constrained no matter how many there are. The maximum circular gap measures this: a gap above about 180 degrees means the strike fell outside the ring of stations.

The intuition is that hyperbolas from stations clustered in one direction all cross at shallow angles, so their intersection smears out along one axis. Stations surrounding the strike produce hyperbolas crossing at steep angles and a tightly pinned intersection. This is the same dilution-of-precision effect that governs GPS accuracy.

Two quality numbers travel with every strike. The maximum circular gap is the largest angular gap in station coverage as seen from the strike. The maximum deviation span reflects how well the timing residuals agree once a position is fitted. Both are exposed in the strike detail panel rather than hidden, because a fix with a 200-degree gap deserves less trust than one with stations all around it.

Commercial networks with denser coverage and tighter station calibration reach a few hundred meters. Community networks trade that for global reach at no cost, which is a reasonable bargain as long as the resulting uncertainty is shown honestly rather than hidden behind a confident-looking dot.

Why do strikes appear a few seconds after they happen?

Because triangulation takes time. Stations must report their timestamps to a central server, the solver has to fit a position, and the result then travels to your browser. Strikes typically appear 3 to 8 seconds after the flash, with the youngest observed here around 3.2 seconds.

This has a practical consequence for anything that animates a strike as it arrives. The flash effect on this map keys off when the strike was received, not when it occurred, because a strike whose timestamp is already 5 seconds old would otherwise never trigger an animation that only looks at the last second.

It also matters for safety. A strike drawn as happening now actually struck several seconds ago, and a fast storm covers real ground in that time. No live lightning map is truly instantaneous, and treating one as a real-time hazard display is a mistake.

Where do the constants come from?[1][2]

Every constant traces to a published source, and each is checked against a reference value in an automated test that runs on every change. The test suite verifies 44 numerical properties, including dry-air sound speed at 0 °C reproducing the published 331.45 m/s.

The verification matters more than the sourcing. A single transposed digit in a sixteen-coefficient polynomial produces answers that look plausible and are quietly wrong, and no amount of code review reliably catches that. Checking computed output against independently published values does.

Alongside the reference values, the suite asserts properties that must hold regardless of coefficients: slant range is never shorter than ground range, audibility falls monotonically with distance, a tailwind raises the chance of hearing a strike, and a zero-height path reduces exactly to the ground-level speed.

Cramer (1993)
JASA 93(5) 2510-2516, interpolating equation p2514. Speed of sound, ~300 ppm accuracy 0 to 30 °C
Davis (1992)
saturation vapor pressure and the enhancement factor for non-ideal water vapor in air
ISA
6.5 K/km environmental lapse rate and the 5.25588 barometric exponent
ISO 9613-1
atmospheric absorption; thunder's sub-100 Hz energy justifies the 0.4 dB/km figure
LMA flash studies
median flash footprint supporting the 4 km channel-extent bound
Blitzortung accuracy study
the ~5.6 km mean location error that sets the uncertainty band

References

  1. The variation of the specific heat ratio and the speed of sound in air with temperature, pressure, humidity, and CO2 concentrationJournal of the Acoustical Society of America 93(5), 2510-2516, 1993 · doi:10.1121/1.405827
  2. Equation for the Determination of the Density of Moist Air (1981/91)Metrologia 29(1), 67-70, 1992 · doi:10.1088/0026-1394/29/1/008
  3. Characteristics of the Blitzortung.org Lightning Location Catalog in JapanAtmosphere 14(10), 1507, 2023 · doi:10.3390/atmos14101507

Related guides

All guides