An The speed of sound in a gas is
primarily a function of its temperature. Air is a
mixture of gases and includes water vapor. The relative
humidity of air has a slight effect on the speed of
sound, while changes in air pressure have no real effect
on the speed. A simple equation can be used to
approximate the speed of sound. A more complex equation
takes into account factors and can be used with other
gases. The speed of sound in a gas is a specific
fraction of the average speed of the gas molecules at
the given temperature.
Questions you may have about sound are:

What is the approximate equation for the
speed of sound in air?

What is the equation for the speed of
sound in any gas?

What is the relationship between speed
of sound and velocity of molecules?
Speed in air
The speed of sound in air is
approximately 344 meters/second, 1130 feet/sec. or 770
miles per hour at room temperature of 20oC (70oF). This
speed is primarily a function of temperature. The only
other factor that has any effect on the speed of sound
in air is the amount of humidity in the air.
Air is a relatively fixed mixture of
gases, primarily consisting of Nitrogen, Oxygen, Argon
and Carbon Dioxide. It also includes varying amounts of
water vapor or humidity. An increase in the amount of
humidity in the air increases the speed only small
amount. Since humidity can vary so much, and since the
amount of change of speed with an extreme change in
humidity is less the 0.5%, the speed of sound in air is
usually simply measured in dry air, neglecting the
effect of humidity.
Counter to intuition, changes in air
pressure have no real effect on the speed of sound.
Sound travels slower at higher altitudes because the
temperature and relative humidity are lower, not because
the air pressure is lower higher altitudes.
The speed of sound in dry air in meters
per second (m/s) is approximately equal to:
s = 331.4 + 0.6T_{C} m/s
where
s = the speed of sound
Note that sometimes the letter c is used
for the speed of sound. We'll use s to avoid confusion
with the speed of light, which also uses c.
T_{C} is the Celsius temperature.
Thus, if T_{C} = 0oC, then s = 331.4 m/s. You can check
that answer with the calculator below.
Speed in any gas
The speed of sound in any gas is a function of
temperature, the molecular structure of the gas and its
molecular mass.
Advanced students can study the theoretical equation for
speed of sound in a gas to see what factors are involved
in making the determination. Less advanced students
should still go over the material to gain some
understanding.
The equation for the speed of sound in a gas is:
s = sqrt(γ*R*TK/M)
where
s = the speed of sound
sqrt is the square root of the number in the parentheses
(γ*R*TK/M)
Note that usually the square root is written
√(γ*R*TK/M),
but since the square root sign √ doesn't show up well on
some web pages, we'll use sqrt
γ (Greek letter gamma) is the adiabatic constant for the
gas, which is related to the type of atom or molecule,
its specific heat and its degrees of freedom when it
moves
For a gas made of single atoms, such as Argon (Ar) gas,
γ = 5/3 = 1.67
For a gas made up of molecules consisting of
two atoms,
such as Oxygen (O2), γ = 7/5 = 1.4
For a gas made up of molecules consisting of
multiple
atoms, such as Carbon Dioxide (CO2) or gaseous water
(H2O), γ = 4/3 = 1.3
R is a number called the Universal Gas Constant
R = 8.314 J/mol K (Joules/molesdegrees Kelvin)
T_{K} is the absolute temperature of the gas in degrees
Kelvin
Note that you can use T_{K} = (273.15 + temperature in
degrees C)
M is the molecular mass of the gas in kg/mol
The molecular mass is the atomic weight of the molecule
divided by 1000; For example, CO2 has an atomic weight
of 44 since the atomic weight of C is 12 and O2 is 32;
Thus M = 44/1000 = 0.044 for CO2
These values can then be used to calculate the speed of
sound for any gas at any temperature.
You can use the above equation and values to calculate
the speed of sound in air.
Since air is primarily made up of molecules consisting
of two atomsNitrogen (N2) and Oxygen (O2)then γ =
1.4.
The molecular mass of air is an average of the molecular
masses of the gases that make up air. The chart below
shows the various components of air, the percent of each
in air, and the molecular mass of the gas.
Nitrogen (N_{2}) 
78.08% 
0.028013 
Oxygen (O_{2}) 
20.95% 
0.031998 
Argon (Ar) 
0.93% 
0.039948 
Carbon Dioxide (CO_{2}) 
0.03% 
0.043999 
Total 
99.99% 
0.02895 Average 
The average molecular weight for dry air is the sum of
the Percent times the Molecular Weight for each molecule
or component of air. That would be (0.7808 X 0.028013) +
(0.2095 X 0.031998) +... and so on.
The result for air is the average M = 0.02895 kg/mol
Substituting the values:
γ = 1.4
R = 8.314 J/mol K 286 m2/s2/oK
M = 0.02895 kg/mol
into s = sqrt(γ*R*TK/M), you get
s = sqrt(1.4 * 8.314 * T_{K} / 0.02895) = sqrt(13830.74)* sqrt(T_{K})
Thus s = 20.03 * sqrt(T_{K}) = 20.03 *
sqrt(273.15 + T_{C}).
If T_{C} = 0oC, then s = 20.03 *
sqrt(273.15) = 20.03 *
16.53 = 331 m/s.
The speed of sound for various gases at 0^{o}C:
Air 
331 
Carbon Dioxide 
259 
Oxygen 
316 
Helium 
965 
Hydrogen 
1290 
An interesting characteristic of the speed of sound in a
gas is that the speed is a distinct fraction of the
average speed or velocity of the molecules or atoms
making up the gas.
The following equation shows that relationship:
s = v * sqrt(γ/3)
where
s = the speed of sound
v = the average velocity of the molecules at some given
temperature
γ = the adiabatic constant for the gas
Thus for air, s = v * sqrt(1.4/3) = 0.68v. In other
words, the speed of sound in air is 0.68 times the speed
of the air molecules at a given temperature.
The speed of sound in a gas is a function of its
temperature. Air is a mixture of gases and includes
water vapor. A simple equation can be used to
approximate the speed of sound. A more complex equation
takes into account factors and can be used with other
gases. The speed of sound in a gas is a specific
fraction of the average speed of the gas molecules at
the given temperature. 