How far away is the lightning?
Seconds between flash and thunder in, distance out. If you can hear thunder, go indoors.
Change the unit first, then type the temperature. Sound is slower in cold air and faster in hot air.
Why counting works
Light from a lightning flash reaches you in a few millionths of a second. Thunder, the sound of the superheated air along the channel, travels at the speed of sound: 343 meters per second (1,126 feet per second) in dry air at 20 °C (68 °F). Whatever delay you count between the two is therefore the time sound needed to cover the distance, so distance = delay × speed of sound. The National Weather Service turns this into a rule anyone can use without arithmetic: count the seconds and divide by 5 to get miles.
The formula
Distance (m) = seconds × c, where c is the speed of sound in air, c = √(γ R T / M) with γ = 1.4, R the gas constant, M the molar mass of air and T the absolute temperature. At 20 °C that gives 343.2 m/s. In miles, distance = seconds × 1,126 ÷ 5,280. The rule of 5 seconds per mile assumes about 1,056 ft/s, a little slower than real air at room temperature, and the metric rule of 3 seconds per kilometer assumes about 333 m/s.
Worked example
You see a flash and count ten seconds before the thunder. At 68 °F the speed of sound is 1,126 ft/s, so the strike was 11,260 feet away, which is 2.13 miles or 3.43 kilometers. The NWS rule gives 10 ÷ 5 = 2 miles; the two agree to within a tenth of a mile. If you count 30 seconds, the strike was 6.4 miles away. The same storm on a 32 °F day gives a slightly smaller distance for the same delay, because sound is slower and covers less ground in each second: in freezing air a mile takes 4.86 seconds, against 4.69 on a 68 °F day.
Limits of this method
Thunder is a stretched-out sound. A bolt is a long channel, and the first sound to reach you comes from its nearest part, while the rolling comes later from farther parts. Count to the first rumble, not the loudest one. Several flashes confuse the count. If you cannot tell which flash belongs to which thunder, the distance is only a rough guess for the nearest storm. Hearing range is short. The NWS says thunder is heard from only about 10 miles away, so a silent storm can still be dangerous nearby. Distance is not safety. NWS Melbourne notes that lightning can strike more than 10 miles from the center of a thunderstorm, so a count of several miles does not make you safe.
Safety
This is an estimate, not a safety device. The NWS guidance is not to wait for a short count: when thunder roars, go indoors, and wait until 30 minutes after the last thunder before going out again. Use the calculator to follow how the storm moves (the delay shrinking means it is coming closer), not to decide how long you can stay outside.
Questions
How do I tell how far away lightning is?
Count the seconds from the flash to the first rumble of thunder and divide by 5 for miles (the National Weather Service rule) or by 3 for kilometers. Light reaches you almost instantly, but sound takes about 4.7 seconds per mile in 68 °F air. A ten-second gap, for example, means about 2.1 miles (3.4 km).
What is the 30-30 rule?
It is a popular rule of thumb: if the gap between flash and thunder is 30 seconds or less, the storm is about 6.4 miles away or closer, so seek shelter; then wait 30 minutes after the last thunder before going back out. The National Weather Service pages we checked do not use the name. They give a simpler rule that does not depend on counting: when you hear thunder, go indoors, and stay there until 30 minutes after the last thunder. If thunder reaches your ears, lightning is close enough to strike you.
How far can thunder be heard?
The NWS says thunder can be heard only about 10 miles from the lightning, and often less because wind, terrain and buildings muffle it. Lightning can still strike beyond that range, so no thunder does not always mean no risk: the rule is to act on the first thunder and on a darkening sky, not to wait until the count is short.
Does the temperature change the answer?
Slightly. Sound travels faster in warm air: 331 m/s (1,087 ft/s) at 0 °C (32 °F), 343 m/s (1,126 ft/s) at 20 °C and 352 m/s at 35 °C. One mile takes 4.86 s in freezing air and 4.57 s at 95 °F. Next to your reaction time in starting and stopping the count, that is a small effect, which is why the simple 5-seconds-per-mile rule works. See the speed of sound calculator for the formula.
Why is the rule 5 seconds when sound needs about 4.7?
At 20 °C sound covers a mile in 4.69 seconds, so 5 seconds is a rounded figure. Counting 5 seconds per mile gives a distance about 6 percent smaller than the calculated one, which puts the storm slightly closer than it is, and that is the safer error. The difference is a few hundred feet at a mile. The calculator shows both numbers so you can see them.
When is it safe to go back outside?
The NWS advises staying in a safe shelter for at least 30 minutes after the last sound of thunder. Its overview page words it as 30 minutes after the last lightning or thunder. The back edge of a storm can still produce strikes several minutes after the rain has stopped, so a clear patch overhead does not end the wait. Restart the 30 minutes every time you hear another rumble.
What counts as a safe shelter?
The NWS describes a substantial building with electricity or plumbing, or an enclosed vehicle with a metal top and the windows up. NWS Melbourne adds that carports, open garages, covered patios and pavilions are not adequate shelter.
Sources: National Weather Service, "Lightning Science: Thunder" (divide the seconds by 5 for miles; thunder is heard up to about 10 miles), "Lightning Safety Overview" (30 minutes after the last lightning or thunder) "Lightning Tips" (shelter at least 30 minutes after the last thunder; if you hear thunder, lightning is close enough to strike) and the NWS Melbourne lightning pages (shelter types, strikes beyond 10 miles), weather.gov, read October 27, 2026. The speed of sound follows the ideal-gas formula for dry air (see the speed of sound calculator). Related: wind chill calculator, heat index calculator, stopping distance calculator. How we check our calculators.