Gases and compressibility · Calculator

Mach number calculator (Ma)

Calculate the Mach number from the flow speed and the speed of sound at the same point. What you enter for the speed of sound largely decides how good the answer is.

Enter values and calculate

Ma = v / c

Result

Your inputs are calculated by your browser on this page; the operator does not receive or store them.

Why divide by the speed of sound?

How much a gas changes density as it speeds up depends on its speed relative to the speed of sound, not on the absolute speed. The same 200 m/s gives different Mach numbers in cold and warm air. The Mach number is the first check on whether compressibility matters.

Treating air as an ideal gas with γ = 1.4 and R = 287 J/(kg·K), the speed of sound is c = √(γRT). At 300 K that is √(1.4 × 287 × 300) ≈ 347 m/s. T must be an absolute temperature in kelvin. If you only have a Celsius reading, OpenStax gives the approximation c ≈ 331 m/s × √(T / 273 K); at 293.15 K it returns 343.0 m/s.

Variables and SI units

Inputs of the Mach number calculator
SymbolMeaningSI unitExample
vLocal flow speed or speed relative to the gasm/s170
cSpeed of sound in the same medium at the same temperaturem/s340

Choosing the speed of sound

What the regime labels mean

The calculator labels Ma < 0.8 subsonic, 0.8 to 1.2 transonic, 1.2 to 5 supersonic and 5 or more hypersonic. These are conventional, approximate limits that vary between references. In the transonic band the free stream is still below the speed of sound, yet the flow can locally exceed it where it accelerates, such as over the upper surface of a wing.

Ma ≈ 0.3 is a common reference when judging whether the incompressible approximation is acceptable. From the isentropic relation with γ = 1.4, the ratio of stagnation to static density at Ma = 0.3 is about 1.046. Whether that difference is acceptable depends on the accuracy you need.

Check with the example

The example uses v = 170 m/s and c = 340 m/s, so Ma = 0.5. The same 170 m/s in colder air with c = 300 m/s gives about 0.567. Remembering that the Mach number can rise while the speed stays the same avoids mistakes when comparing altitudes.

Examples that start from raw operating data

Example 1. A speed in knots divided by the sound speed at 5 000 m

Given: A propeller aircraft is assumed to fly at a true airspeed of 300 kn at 5 000 m (the speed is assumed). In the standard atmosphere at 5 000 m, T = 255.65 K and a = 320.53 m/s (Cornell Table 1.1).

Unit conversion: 300 kn × 1852 m / 3600 s = 154.33 m/s.

Calculator input: Entering v = 154.33 and c = 320.53 gives Ma = 0.4815, labelled subsonic. Dividing the same speed by the sea-level sound speed of 340.29 m/s gives 0.4535, so ignoring altitude would understate the Mach number by about 6% (0.4815 / 0.4535 = 1.062).

Judgment: Because Ma is above 0.3, parts where the flow accelerates further, such as propeller tips or engine intakes, are safer to evaluate separately with compressibility included.

Example 2. Static versus stagnation temperature at a CFD inlet

Given: A duct inlet velocity of 150 m/s and an air temperature of 400 K are assumed operating conditions. Use γ = 1.4 and R = 287 J/(kg·K).

If 400 K is the static temperature: c = √(1.4 × 287 × 400) = 400.9 m/s, so entering v = 150 and c = 400.9 gives Ma = 0.3742. The stagnation temperature is then T0 = 400 × (1 + 0.2 × 0.3742²) = 400 × 1.0280 = 411.2 K.

If 400 K is the stagnation temperature: cp = γR/(γ − 1) = 1004.5 J/(kg·K), and the static temperature is T = T0 − v²/(2cp) = 400 − 11.20 = 388.80 K. The sound speed becomes 395.2 m/s and the Mach number 0.3795.

Judgment: The two readings differ by about 1.4% in Mach number and 11 K in temperature. Before filling in the sound-speed field, confirm whether your thermometer reads close to the stagnation temperature and which temperature your solver's inlet condition expects.

What the Mach number cannot tell you

Ma alone does not locate shock waves or give pressure distributions, drag or structural margins. Check viscous effects with the Reynolds number and molecular length scales with the Knudsen number. The gas-model note explains why those checks stay separate.

Using the Mach number calculator

There is no temperature field. What goes in the sound-speed box if I only know the temperature?

For air, compute c = √(1.4 × 287 × T) first and enter that. At 20 °C (293.15 K), for example, it is 343.2 m/s. For other gases, use that gas's γ and R, or look up the value at the same temperature in a table such as OpenStax Table 17.1.

If the result says transonic, should I avoid an incompressible analysis?

The transonic label means Ma is 0.8 or more. Putting Ma = 0.8 into the estimate Δp/p ~ (γ/2)M² from the MIT 16.01 lecture notes gives 0.448, so pressure variations can exceed 40% of the static pressure. In this range, drop the constant-density assumption and use a compressible analysis that can also handle shocks that may form locally.

Can I enter a GPS-measured speed as the flow speed?

GPS speed is measured relative to the ground, so with wind it differs from the speed relative to the air. For a vehicle flying into a 20 m/s headwind, the airspeed is 20 m/s higher than the ground speed. The Mach number needs the speed relative to the air.

Related guides and calculators

Guide

Calculation notes

Related calculators

References