Work out distance based on how long sound takes to travel — for example distance to a lightning strike, or distance from an echo/sonar measurement.
A well-known rule of thumb is to divide the number of seconds between lightning and thunder by 3 to get the distance in kilometers. That holds up well because sound travels at about 343 m/s, and 343 m/s × 3 seconds is nearly exactly 1 kilometer.
With an echo or sonar, the sound must travel a round trip — out to the object and back again — before it's registered. So we divide the result by 2 for round-trip measurements, giving the distance to the object rather than the total distance the sound traveled.
Because sound travels at about 343 m/s, and 343 m/s × 3 seconds gives nearly exactly 1,000 meters. Dividing the number of seconds by 3 is therefore a quick and good approximation for finding the distance to the lightning strike in kilometers.
With a one-way measurement (like lightning and thunder), the sound only travels one way, from the source to you. With an echo or sonar, you send out the sound yourself, and it has to travel out to the object and back again before you hear it — double the distance — so the time has to be divided by 2 to find the correct distance.
The speed of sound in air increases with temperature, because warmer air molecules move faster and transfer vibrations between each other more quickly. At low temperatures, the speed of sound drops accordingly, which makes calculations using a fixed value of 343 m/s less precise in winter.