You see the lightning, you count to six, you hear the thunder. About two kilometres away. We all learn that trick as children, and it works because sound is slow compared with light. But how slow, and what decides the number? The answer has a nice historical twist.
Newton got it wrong, by a lot
Newton argued that sound is a pressure disturbance and its speed should be √(P/ρ). With P = 1.013×10⁵ Pa and ρ = 1.293 kg/m³ at 0 °C you get about 280 m/s. The measured value is about 331 m/s. He was off by around 15 percent, which is large for Newton. The mistake was an assumption: he treated the compressions and rarefactions as isothermal, meaning the temperature stayed constant while air was squeezed.
Laplace fixed it
Sound vibrations are too fast for heat to flow between the hot compressed regions and the cool stretched regions. The process is adiabatic, not isothermal. Then the pressure changes faster, the medium is stiffer, and a factor γ (the ratio of specific heats, 1.4 for air) enters:
Check: 280 × √1.4 ≈ 331 m/s. It matches the experiment. In the second form, R = 8.314 J/mol·K, T is the absolute temperature and M = 0.02897 kg/mol is the molar mass of air.
What changes it, and what does not
Temperature changes it, as the √T tells you. Pressure on its own does not. If you compress air at constant temperature, pressure and density go up together, and the ratio P/ρ stays the same. That is a favourite trick question. Humidity helps a little, because water vapour is lighter than the nitrogen and oxygen it replaces, so moist air carries sound slightly faster. Frequency does not matter at all for ordinary audio: bass and treble from a band reach you at the same time.
Why this matters beyond textbooks
Organ pipes and wind instruments go sharp on a warm stage, because the same pipe length gives a higher frequency when v rises. Musicians retune for that. And echo-ranging with a clap against a far wall works only if you use the right v for the day. At 343 m/s a clap that returns in 0.6 s means the wall is about 103 m away, since the sound travelled there and back.
A last point on the lightning trick: light arrives almost instantly, so each second you count is about 343 m. Three seconds is roughly one kilometre, which is the rule of thumb behind it.
