Lightning can strike as far as 10 miles away from the rain area in a thunderstorm. That's about the distance you can hear thunder. When a storm is 10 miles away, it may even be difficult to tell a storm is coming.

IF YOU CAN HEAR THUNDER, YOU ARE WITHIN STRIKING DISTANCE. SEEK SAFE SHELTER IMMEDIATELY! The first stroke of lightning is just as deadly as the last. If the sky looks threatening, take shelter before hearing thunder.

Source: National Weather Service