On this page
You see a flash over the rooftops, start counting, and nine seconds later the thunder rolls in. That count tells you how far away the lightning struck. Here is the method, the physics behind it, and a predict-then-check exercise you can run as a simulation on paper or on screen.
How do you calculate the distance of lightning from thunder?
NOAA's lightning safety guidance gives the rule: count the seconds from flash to thunder, then divide by 5 to get miles, or by 3 to get kilometres (NOAA JetStream). The US National Weather Service says the same thing: thunder travels about a mile every 5 seconds, so 10 seconds means about 2 miles (National Weather Service).
The rule is just distance = speed × time. The speed of sound in dry air is about 344 m/s at 20°C (HyperPhysics). At that speed, sound needs about 2.9 seconds to cover one kilometre, which rounds to "divide by 3". Here is a worked example:
You count 9 seconds between the flash and the first sound of thunder.
Distance = 344 m/s × 9 s = 3,096 m, or about 3.1 km.
Check with the rule: 9 ÷ 3 = 3 km. Close enough.
Now test your count. If you started counting half a second late, the true delay was 9.5 s and the distance about 3.3 km. Half a second of hesitation moves the answer by about 170 m.
Stop counting at the first sound you hear, not at the loudest boom. The long rumble after it comes from different parts of the lightning channel, which our explainer on why thunder rumbles instead of making a single bang covers.
Why is the travel time of light ignored?
The speed of light in vacuum is exactly 299,792,458 m/s (NIST). Over 3.1 km, light takes about 10 microseconds (3,096 ÷ 299,792,458 ≈ 0.00001 s). Sound takes 9 seconds over the same path.
So light's share of the delay is about one part in a million. If you write the full equation, the measured delay t is the difference of two travel times: t = d/v(sound) − d/c. Solve it for d and the answer agrees with d = v(sound) × t in every digit you could measure.
The same two-delay idea turns up in exam numericals, such as finding the depth of a well from the sound of a dropped stone. The skill is deciding which delay is too small to matter. If you want to check your method on numericals like these, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning.
Does temperature change the answer?
NASA's beginner's guide gives the speed of sound as a = √(γRT): it depends on the gas and its absolute temperature (NASA Glenn Research Center). Since the speed goes as the square root of absolute temperature, start from HyperPhysics's 331.5 m/s at 0°C (HyperPhysics). On a hot pre-monsoon evening at 35°C (308 K), our calculation gives 331.5 × √(308.15/273.15) ≈ 352 m/s.
Your 9-second count then means 3.17 km instead of 3.10 km, a difference of about 70 m. That is smaller than the error from a half-second slip, so "divide by 3" works from a cool December night to a hot May storm.
How do you turn it into a simulation?
A simulation is most useful when you predict first and press play second. Use the speed of sound from HyperPhysics, 344 m/s in dry air at 20°C, and try this plan, either with a simulation or by sketching expanding circles on graph paper:
Place the storm 2 km away. Predict the delay: 2,000 ÷ 344 ≈ 5.8 s.
Raise the temperature to 35°C. Predict whether the delay grows or shrinks. (It shrinks, to about 5.7 s.)
Run it: flash at t = 0, a sound wavefront spreading at 344 m/s, and you standing at 2 km. Count aloud and compare.
Move the storm to 10 km. Predict first, then check: about 29 seconds.
Write one sentence explaining any gap between your prediction and the result.
If the expanding wavefront is hard to picture, the Fermi Simulation Lab has interactive simulations for ideas that are easier to see than to read. The predict-first habit works there too.
What does the count mean for your safety?
The count tells you the distance, not whether you are safe. NOAA says that if you can hear thunder, you are within striking distance, and lightning can strike more than 10 miles from where the rain is falling (NOAA JetStream). The National Weather Service notes that you can normally hear thunder about 10 miles from a strike (National Weather Service).
To see where the flash itself comes from, read how lightning forms inside a thundercloud, then try the count at the next storm.



