Speed of Sound Calculator – Temperature, Humidity, Altitude and Other Gases
The speed of sound is not a constant. It is a property of the gas the wave is passing through, and it moves with that gas's temperature, its composition and its water-vapour content. This speed of sound calculator makes those dependencies explicit: enter a temperature and it returns c by the classroom linear fit, by the full ideal-gas relation, and by a humidity-corrected mixture model, then uses the answer to give you the wavelength of any tone, the flight time over any distance, the echo round trip, the local air density and the acoustic impedance.
The two formulas, and why they differ
The shortcut most people meet first is c = 331.3 + 0.606 · T with Tin degrees Celsius. At 20 °C it gives 343.42 m/s. The physically correct expression is the ideal-gas relation
c = √(γ · R · T / M)
where γ is the heat capacity ratio Cp/Cv, R = 8.314462618 J/(mol·K) is the universal gas constant, T is the absolute temperature in kelvin and Mis the molar mass in kg/mol. For dry air — γ = 1.400 and M = 0.0289644 kg/mol — that returns 343.24 m/sat the same 20 °C. The linear form is simply this square root linearised about the freezing point, which is why it holds to about 0.1 % between −20 °C and 50 °C and then drifts.
Why pressure does not appear in the answer
Writing the wave speed as c = √(γp/ρ) makes it look pressure-dependent, and this is the single most common misconception about sound. Raising the pressure at fixed temperature raises the density in exact proportion, so the ratio p/ρ = RT/M is untouched. The extra stiffness and the extra inertia cancel. Pressure enters this calculator for two other reasons only: it fixes how much water vapour a given relative humidity actually represents, and it fixes the density used for ρc.
6 m/snear room temperature — about 1.7 %. Doubling the atmospheric pressure adds nothing at all. If a sound-speed figure changes with altitude, it is changing because the air up there is colder, not because it is thinner.Humid air travels faster, not slower
Water vapour has a molar mass of 18.0 g/molagainst dry air's 29.0 g/mol. Replacing some nitrogen and oxygen with H₂O therefore makes the mixture lighter, and c goes as 1/√M. The humid-air model here computes the saturation vapour pressure from the Buck/Magnus curve, converts relative humidity into a mole fraction x_w = (RH/100) · p_sat / P, and mixes the molar masses and heat capacities properly — adding molar heat capacities rather than averaging γ values, which is where simpler calculators go wrong. The correction is small: around +0.7 m/s at 20 °C and saturation, but near +2 m/sat 30 °C, because saturation vapour pressure climbs steeply with temperature.
Altitude, Mach number and the standard atmosphere
The altitude mode takes temperature and pressure from the 1976 US Standard Atmosphere: a constant 6.5 K/km lapse through the troposphere, then an isothermal 216.65 K layer above the 11 km tropopause. Local Mach 1 falls from 343.2 m/s at 20 °C sea level to 295.1 m/s at the tropopause and then stops falling, because the temperature stops falling. That is why the same true airspeed corresponds to a higher Mach number at cruise altitude.
Other gases: what γ and M each do
Helium is monatomic, so γ = 5/3, the ideal-gas maximum, and its molar mass is seven times lower than air's: sound travels about 1007 m/sat 20 °C, roughly 2.9× the speed in air. Because your vocal tract's resonances scale directly with c, that shifts your formants up — your vocal cords are vibrating at exactly the same pitch. CO₂ does the opposite: γ drops to about 1.29 and Mrises to 44 g/mol, so c falls to roughly 267 m/s. Argon shows the two effects competing — it shares helium's high γ but is ten times heavier, and ends up slower than air.
Everyday uses of the number
- Speaker delay alignment— a 10 °C change in hall temperature shifts arrival time by about 1.7 %, which is audible on long throws.
- Wavelength and room modes —
λ = c/fgives 17 m at 20 Hz and 17 mm at 20 kHz, the reason bass behaves like pressure in a room and treble behaves like light. - Ultrasonic ranging— sensors time the round trip, so
d = c · t / 2; using a fixed 343 m/s instead of the local value costs roughly 0.17 % per degree. - Thunder distance— about 2.9 s of delay per kilometre, or 4.7 s per mile, between the flash and the bang.
Every result on this page shows its substituted formula, so you can reproduce it by hand, and every figure is carried at full double precision internally with rounding applied only for display.