I'm sorry to have to be so vague, but the answer to your question is "it depends!" The reason we can't be more
specific is that it all depends on what the speed of sound is through a substance under certain conditions. Now if
you had asked how fast is Mach 2 in the standard atmosphere at sea level, the answer could be found by simply
looking up the speed of sound at sea level in a standard atmospheric table and multiplying it by two. Since the
speed of sound through the standard atmosphere is 761 mph (1,223 km/h) at sea level, Mach 2 then follows as
1,522 mph (2,447 km/h). If you were to ask how fast is Mach 2 at an altitude of 30,000 ft (9,150 m), we would
use the same methodology to find out that it is only 1,356 mph (2,180 km/h) because the speed of sound generally
decreases as altitude increases.

So your next logical question is why does the speed of sound change? To understand this concept, we must understand
the physical mechanism of how sound travels. In a solid material, sound waves propogate through vibration. The
molecules of a solid are very closely packed together and physically connected to each other. A passing sound wave
vibrates one molecule, and that molecule induces a vibration in its neighbors, and those molecules induce further
vibrations in their neighbors, and so on until the sound wave runs out of energy. A similar process occurs is a
gas, like air. The only difference is that the molecules of air are not physically connected to each other, but
they do still vibrate under the influence of a sound wave. As a molecule vibrates, it collides with other molecules
thereby transmitting some of its kinetic energy to those particles. These energetic gas molecules also continue
moving about randomly colliding with new particles and transferring some of their excess kinetic energy.

In relation to our discussion, the speed of sound is directly related to the frequency at which these molecular
collisions occur, and that frequency is directly related to the density of how those molecules are packed. Sound
travels fastest through a solid and slowest through a gas. In the days of train travel, people used to hold their
ears against the railroad tracks because they could hear the rumble of an oncoming train through the densely-packed
molecules of the steel tracks long before the sound waves arrived through the air. Similarly, sound travels faster
through a liquid, like water, than it does through the air due to the liquid's increased density. Sound also
travels faster through harder solids, like metals, than through softer materials, like wood, because of the density
of the molecules that make up the substance. The same principle holds true of the atmosphere. As discussed in a
previous question on air density, the density of the atmosphere decreases as
altitude increases, so we would expect the speed of sound through the air to decrease as well.

While this is indeed the case up to about 36,000 ft (11,000 m), the speed of sound eventually reaches a constant,
then starts rising again, reaches a new constant, starts decreasing again, reaches a new constant, then starts
rising yet again! The reason for this odd behavior is that the speed of sound depends on more than just density,
but also on atmospheric pressure and (by extension) temperature. While I could easily bore you further with a
detailed mathematical derivation to explain this, the simple explanation is that the atmosphere is made up of zones
where atmospheric properties vary wildly. You may have heard of terms like the Troposphere, Stratosphere,
and Tropopause. Based on experimental data, scientists have measured the atmospheric properties in each of these
regions and defined how these properties vary, as illustrated below.

Variation of temperature through the layers of the atmosphere

These defined relationships constitute the "standard atmosphere" we have already spoken of. The key variable in
this standard atmosphere is temperature as all other basic properties can be computed from it. Since the speed of
sound is a function of density and pressure and both density and pressure are functions of temperature, we end
up with a simple relationship for speed of sound as a funtion of temperature:

where

a = speed of sound [ft/s or m/s]
γ = specific heat ratio, which is usually equal to 1.4
R = specific gas constant, which equals 1716 ft-lb/slug/°R in English units and 287 J/kg/K in Metric
units
T = atmospheric temperature in degrees Rankine (°R) in English units and degrees Kelvin (K) in Metric
units

By merely looking up the temperature at a specified altitude in a standard atmosphere chart (in degrees Rankine),
one can then easily compute the speed of sound. We can make the process even easier for you since this method is
also used in our Atmospheric Properties Calculator when a user
enters nothing more than the altitude. Furthermore, a speed at that altitude can also be input to compute the
associated Mach number, or a Mach number can be entered to calculate the associated true airspeed.
- answer by Jeff Scott, 30 December 2001