How the Calculator Works
The engine is a deterministic client-side module (js/math.js) written as vanilla ES modules. Every evaluation runs entirely in your browser: there are no network requests and no tracking. Internal arithmetic uses full IEEE-754 double precision, and results are displayed to two decimal places. That rounding is a display convention of the model, not a statement about physical measurement precision.
The tool computes the propagation speed of a small-amplitude acoustic wave relative to a stationary medium. It does not model fluid particle velocity, shock waves, or projectile Mach numbers.
Simple and Advanced Modes
| Mode | Inputs exposed | Model |
|---|---|---|
| Simple | Temperature value and unit (C, F, K) |
Dry air, , |
| Advanced | Material selector (air, gas, liquid, rod), model-specific properties, and secondary units (, ) |
Dry air, custom ideal gas, Newton-Laplace liquid, slender rod |
Switching between modes preserves the values you have entered.
Input Ranges
| Input | Min | Max | Default | Step | Active for |
|---|---|---|---|---|---|
temperature |
air, gas |
||||
gamma () |
gas |
||||
molarMass () |
gas |
||||
modulus |
liquid (bulk), rod (Young's) |
||||
density () |
liquid, rod |
The modulus and density sliders are logarithmic because physical values span many orders of magnitude. Changing the temperature unit converts the numerical value rather than relabeling it, so becomes or . The converted absolute temperature must be greater than .
Speed of Sound Formula for Ideal Gases
For a calorically perfect ideal gas, the acoustic wave is an isentropic process, and the speed of sound is
where is the heat-capacity ratio, is the specific gas constant in , and is absolute temperature in kelvins. The specific gas constant relates to the universal gas constant (CODATA 2017) through the molar mass: .
Sound travels at a speed set by the gas's own thermal motion, not by the pressure level. At fixed temperature and composition, changing the ambient pressure changes density and the bulk modulus by the same factor, so the ratio, and therefore , is unchanged for an ideal gas.
Speed of Sound in Air Formula
For dry, stationary air the calculator uses and :
Kelvin Scaling and the Square-Root Law
Speed is proportional to . This has a practical consequence that is easy to get wrong: multiplying the absolute temperature by 4 doubles the speed of sound, but doubling a Celsius reading does not. Always convert to kelvins first:
Near room temperature the sensitivity is approximately .
Worked Example: Dry Air at 20 °C
Convert . Then
Unit conversions, using the unrounded speed:
Dry Air Reference Values
| Temperature | Absolute | Speed (m/s) | Speed (ft/s) | Speed (km/h) |
|---|---|---|---|---|
| n/a | n/a | |||
| n/a | n/a |
The row triggers the temperature-model warning described below.
What the Air Model Excludes
The dry-air model ignores relative humidity, ambient pressure variations, wind shear, and altitude lapse rates. It is a calorically perfect gas model with constant .
Speed of Sound in Natural Gas Calculator Mode (Custom Ideal Gas)
Choosing the gas medium generalizes the relationship to any ideal gas. You supply and the molar mass in , and the engine converts to by multiplying by :
Lighter molecules move faster at the same temperature, so lower raises .
Worked Examples
Air-equivalent gas (, , ):
This equals or . It differs slightly from the dry-air result because the two models use marginally different effective gas constants ( versus ).
Light gas (, , ), for example a methane component taken alone with the stated :
That is or .
Natural Gas Caveats
Natural gas is a variable hydrocarbon mixture, predominantly methane with ethane, propane, and . The calculator gives an ideal-gas estimate from the mixture-average and you enter. It does not compute compressibility factors () or use real-gas equations of state such as GERG-2008 or AGA-8. For high-pressure pipeline metering, use a real-gas equation of state.
Speed of Sound in Liquids Calculator Mode (Newton-Laplace)
In a liquid, wave speed follows the Newton-Laplace relation using the adiabatic (isentropic) bulk modulus and mass density :
Modulus is entered in and converted to pascals () by multiplying by . Density is in .
Two scaling invariants are worth remembering: quadrupling doubles the speed, and quadrupling halves it.
Liquid Benchmarks
| Case | (GPa) | (kg/m³) | (m/s) | (ft/s) | (km/h) |
|---|---|---|---|---|---|
| Water-like default | |||||
| Integer calibration | n/a | n/a | |||
| Dense liquid |
For the default case:
The calibration case is exact:
Liquid Model Limits
Enter and at the same temperature and pressure, and use the isentropic bulk modulus rather than the isothermal one. The model does not include pipe-wall flexibility (the Korteweg correction), entrained microbubbles or gas, or acoustic attenuation and dispersion.
Speed of Sound in Solids Calculator Mode (Slender Rods)
For a long, thin, homogeneous elastic rod, the extensional longitudinal wave speed is
where is Young's modulus in (converted with ) and is density in .
Worked Example: Steel Rod
For and :
This is approximately or exactly .
Validity Boundary: Rod Versus Bulk Solid
This relation holds only for extensional waves whose wavelength is much larger than the rod's cross-sectional diameter, . In that regime the rod's sides are free to expand and contract laterally (Poisson effect).
In an unbounded three-dimensional solid, lateral strain is constrained, and the longitudinal wave is faster:
where is the shear modulus. The rod mode of this calculator is therefore not an ultrasonic bulk-inspection velocity.
Ultrasonic Velocity Formula: Choosing the Right Regime
Ultrasonic testing typically launches waves with wavelengths comparable to or smaller than component dimensions, so bulk longitudinal and shear velocities govern. The following table separates the regimes:
| Regime | Governing relation | Needs | Included here |
|---|---|---|---|
| Ideal gas | , , | Yes | |
| Liquid | , | Yes | |
| Slender rod () | , | Yes | |
| Bulk solid longitudinal | , , | No | |
| Bulk solid shear | , | No |
If you are inspecting a thick plate, weld, or casting with ultrasound, use bulk velocities from the material's data sheet or a calibration block.
Speed of Sound Measure: Calculated Versus Measured
A calculated speed is a model prediction from the properties you enter. An experimental measurement is typically a time-of-flight determination:
where is the path length and the transit time. The two agree only to the extent that the inputs and model assumptions match reality (humidity, composition, boundary conditions, temperature gradients). Use the calculator to predict an expected value and to sanity-check an instrument reading.
Unit Conversions for the Calculator for Speed of Sound
| From | To | Operation |
|---|---|---|
| divide by | ||
| multiply by |
Reading the Results Panel
The hero output (#speed-val) shows the speed in with a subtitle identifying the active model. Two secondary cells show feet per second (#feet-val) and kilometers per hour (#kmh-val). A worked-solution card prints the active substitution. For example, at :
One-Millisecond Wavefront Graphic
The SVG graphic (#sound-visual-svg, viewBox 0 0 600 300) draws two bars on a shared adaptive linear scale. They show the distance the wavefront covers in one millisecond, , for your selected case against a fixed reference of dry air at , which is or in . The shared scale makes a liquid read as a bar about times longer than the air reference.
Advisories and Model Limits
The engine raises advisories when your inputs approach the edge of a model's validity:
| ID | Severity | Trigger | Message |
|---|---|---|---|
temperature-model |
Warning | Outside to ( or ) | Constant heat-capacity and gaseous-phase assumptions may degrade |
ideal-gas |
Info | Custom gas medium | Natural gas results are ideal-gas estimates; high-pressure pipelines need real-gas equations of state |
liquid-properties |
Info | Liquid medium | Enter isentropic bulk modulus and density at matching states; wall flexibility and aeration are excluded |
rod-wave |
Info | Rod medium | Valid only for slender rods (); differs from bulk ultrasound speeds |
At the calculator returns and displays the temperature-model warning, since real air's heat capacity varies over such a range and the constant- result becomes less reliable.
Quick Reference: Which Model to Select
| Situation | Medium | Key inputs |
|---|---|---|
| Room-temperature air, quick answer | Simple mode (air) |
Temperature |
| Helium, hydrogen, or other pure gas | gas |
, , |
| Fuel-gas mixture estimate at low pressure | gas |
Mixture and |
| Water, oil, or other liquid | liquid |
, |
| Long steel, aluminium, or glass rod | rod |
, |
Frequently Asked Questions
Does humidity change the result? Not in this calculator. The dry-air model excludes relative humidity. Humid air is slightly less dense, which raises the speed of sound, but that effect is outside the model.
Why does doubling Celsius temperature not double the speed? Because . Only a fourfold increase in absolute temperature doubles .
Is the rod result the same as ultrasonic velocity in a block of steel? No. The rod formula assumes . A bulk solid has constrained lateral strain and supports a faster longitudinal wave plus a shear wave.
Can I use this for pressurized natural gas? Only as an ideal-gas estimate. It does not include compressibility or a real-gas equation of state.
Does the tool send my data anywhere? No. All computation is local to your browser.
Read the formula definitions, supported input ranges, and limitations before using this estimate.