How storm distance calculator works
Light reaches you effectively instantly; thunder, being sound, crawls along at roughly 340 m/s. Counting the seconds between the flash and the first rumble therefore fixes the range, and the standard rule of thumb divides by three for kilometres (about 333 m/s effective) and by five for miles (about 322 m/s effective). Five seconds means a storm about 1.6 km away; fifteen seconds puts it near 5 km.
Enter the flash-to-bang count in seconds and the calculator returns the distance in kilometres and miles on those published rules, and flags the 30/30-rule danger zone: 30 seconds or less means the storm is within about 10 km (6 miles) — close enough for lightning to reach you even under blue sky, so the guidance is shelter immediately and wait 30 minutes after the last thunder before resuming.
The tool also runs backwards: enter a known distance in kilometres and it returns the flash-to-bang count to expect, useful for pacing a receding storm or checking whether the thunder you hear matches the radar. The rules trade a little accuracy for simplicity — real sound speed varies with temperature from about 320 to 350 m/s, so treat distances as good to within ten percent. All math runs in your browser.