To determine how far you are from lightning, use the flash-to-bang method by counting how many seconds it takes from the moment you see the lightning to when you hear the thunder. Then divide the number of seconds by five to estimate how many miles away it is.
For every five seconds counted, the lightning is about 1 mile away. Sounds travels at approximately 1,000 feet for every 1 second, making this technique fairly reliable, but it does have limitations. Since sound dissipates, this method may be limited to about 5 miles; so you may see the lightning but not hear the thunder.