The speed of sound in a gas is set by three things and no more: how springy it is (γ), how hot it is (T) and how heavy its molecules are (M), combined as v = sqrt(γRT/M). Drag the temperature, switch the gas and add humidity below, and watch two pulses race 343 m of track against a fixed dry-air reference.

The Speed of Sound

Two pulses set off together down 343 m of track. One is your gas at your temperature; the other is always dry air at 20 °C. Whatever pulls ahead or falls behind is the whole story of v = sqrt(γRT/M).

Speed of sound  v = sqrt(γRT/M)
343.2 m/s
1.00× dry air at 20 °C
Mach 1
1236 km/h
Mach 1 (mph)
768 mph
440 Hz note
78.0 cm
Time over 1 km
2.91 s
Temperature20 °C
Gasair
Humidity0% RH
Air: γ = 1.400 · M = 28.96 g/mol
No pressure control — on purpose. Squeezing a gas raises its pressure and its density together, and in v = sqrt(γRT/M) the two cancel exactly. Pressure alone does not change the speed of sound.
Tip: swap air for helium and watch the gold pulse finish first — a molar mass seven times smaller beats anything the temperature slider can do.

What Is the Speed of Sound Simulator?

The speed of sound simulator is a free interactive physics lab that runs in your browser — nothing to install and no sign-up. Drag temperature, switch gas and add humidity to watch the pulse race, with live speed and Mach 1 readouts. It reports speed of sound as you drag the sliders.

What you can change in the speed of sound simulator
ControlRangeStep
Gas temperature Celsius-80 – 60 °C1
Relative humidity , air only0 – 100 % RH1

Reading the Race: What Each Control Actually Moves

Every run sends two pulses down the same 343 m track at the same instant. The lower lane is fixed — dry air at 20 °C, always 343.2 m/s — and exists purely so the upper lane has something to beat. Whatever you change above, the gap that opens between the two dots is the entire effect of that change, converted into something you can watch rather than infer from a number.

The temperature slider is the gentle lever. Sliding it across its whole range, from −80 °C to +60 °C, moves air between roughly 275 and 372 m/s — a real change, and the reason a pulse noticeably lags the reference on a cold morning, but still only about 20 per cent end to end. Speed follows the square root of the absolute temperature, so you have to quadruple T in kelvin to double the speed, and near room temperature the curve is close to flat.

The gas buttons are the violent lever, and the contrast is the point. Press helium and the gold pulse is home in about a third of a second while the reference is still barely a third of the way down the track: molar mass drops from 28.96 to 4.00 g/mol, the adiabatic index rises from 1.40 to 1.667, and the speed nearly triples. Carbon dioxide goes the other way. Each lane prints the γ and M it is actually using, so you can see exactly which two numbers produced the gap. The humidity slider works on air alone — it reads n/a for the others — and is the subtlest of the three, worth about 1.3 m/s from dry to saturated.

What you will not find is a pressure control, and its absence is deliberate. Compressing a gas raises its pressure and its density together, and those two effects cancel exactly inside the square root, so pressure never enters the answer. Sound is not faster at sea level because the air is denser there; it is faster because the air is usually warmer. To put your own numbers through the same formula, use the speed of sound calculator, or work from a frequency and wavelength instead with the wave speed calculator. For what happens when a wave crosses from one material into another, see wave speed in different media.

Frequently asked questions

Why is there no pressure slider?

Because pressure does not change the speed of sound in a gas. Squeezing a gas raises its pressure and its density in the same proportion, and in v = sqrt(gamma R T / M) those two effects cancel exactly. The slider was left out on purpose, because expecting one is the single most common misconception about this formula.

What temperature should I use for a normal room?

Use 20 degrees Celsius, the simulator's default, which gives 343.2 m/s in dry air. That is the figure quoted in most textbooks and the one the fixed reference lane always runs at. At 0 degrees Celsius the same air carries sound at only 331.3 m/s, so a cold room really is a slower one.

Why does helium change the speed so much more than heat does?

Because speed falls as one over the square root of molar mass, and helium is about seven times lighter than air. Switching to helium roughly triples the speed to 1008 m/s, while the whole temperature slider, from -80 to +60 degrees Celsius, moves air by only about 20 percent. Molar mass is simply the bigger lever.

How do I get Mach 1 from this?

The speed the simulator shows is Mach 1 for that gas and temperature, and the panel prints it in km/h and mph beside the metres-per-second reading. To find an aircraft's Mach number, divide its speed by that value. Because sound slows in cold air, the same true airspeed counts as a higher Mach number at altitude.

Does humidity really matter?

A little, and only for air, which is why the humidity slider is disabled for the other gases. Going from bone dry to fully saturated at 20 degrees Celsius raises the speed by about 1.3 m/s, roughly 0.4 percent. Water vapour is lighter than the nitrogen and oxygen it displaces, so moist air is slightly less dense and slightly faster.

References & formula source

  • Halliday, Resnick & Walker — Fundamentals of Physics, chapter on waves and sound (speed of sound in a gas).
  • Young & Freedman — University Physics with Modern Physics, chapter on sound and hearing.
  • Kinsler, Frey, Coppens & Sanders — Fundamentals of Acoustics, chapter on sound propagation in fluids.
  • Further reading: Speed of sound — Wikipedia