Speed of sound in ideal gas calculator
Enter γ = 1.4, 293.15 K and 0.0289652 kg/mol, or the values of your own gas, and get the speed of sound in metres per second and km/h. Hotter or lighter gases carry sound faster. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Adiabatic index
- 1.4
- Temperature k
- 293.15
- Molar mass kg per mol
- 0.0289652
- Speed of sound m per s
- 343.2320180945
- Speed of sound km per h
- 1,235.6352651402
- Universal gas constant j per mol k
- 8.3144626182
This calculator computes the thermodynamic speed of sound in an ideal gas from three physical properties: the adiabatic index, absolute temperature, and molar mass. It applies the standard relation c = sqrt(γRT/M), using the universal gas constant and consistent SI units. The result is useful for physics exercises, gas-system estimates, acoustics models, and quick comparisons among gases. Every calculation is deterministic, runs without external data, and reports the speed in metres per second and kilometres per hour together with the inputs and formula used.
What the ideal-gas sound-speed equation represents
Sound travels through a gas as a small pressure disturbance. For an ideal gas undergoing a rapid acoustic compression, heat has too little time to flow appreciably between neighbouring regions, so the change is treated as adiabatic. Under that assumption, the thermodynamic sound speed is c = sqrt(γRT/M).
The symbol γ is the dimensionless adiabatic index, also called the heat-capacity ratio Cp/Cv. R is the universal molar gas constant, T is absolute temperature in kelvin, and M is molar mass in kilograms per mole. The units inside the square root reduce to square metres per square second, leaving the requested speed in metres per second.
The relationship also explains the main trends: increasing temperature or adiabatic index increases the sound speed, while increasing molar mass decreases it. A light gas can therefore carry an acoustic disturbance much faster than a heavy gas at the same temperature and heat-capacity ratio. This is a general ideal-gas calculation, not a dry-air shortcut tied to a single composition.
Assumptions, appropriate uses, and practical limitations
Use this result when an ideal-gas, small-disturbance, adiabatic model matches the precision of your problem. The calculation is pure arithmetic: it does not query weather services, property databases, or composition tables, so you must supply an adiabatic index and molar mass appropriate to the gas and temperature range. Real gases can depart from this model at high pressures, near phase transitions, or wherever non-ideal equations of state become important.
Gas mixtures may also require temperature-dependent effective properties, and humidity changes the composition and sound speed of atmospheric air. Flow velocity, wind, dispersion, chemical relaxation, and boundary effects are outside this scalar thermodynamic calculation. For reliable work, keep units consistent and document where γ and M came from.
Because there is no network, random value, clock, or iterative solver, identical valid inputs always produce identical structured output suitable for reproducible tests and pipelines.
What you can do with it
Compare gases at one temperature
Evaluate how heat-capacity ratio and molar mass change acoustic propagation for several ideal-gas candidates.
Check thermodynamics coursework
Verify a hand calculation of c = sqrt(γRT/M) with explicit SI inputs and a structured numerical result.
Seed an acoustics simulation
Generate a deterministic baseline wave speed for a model whose gas is adequately represented by ideal, adiabatic behaviour.
FAQ
What formula does the calculator use?
It uses c = sqrt(γRT/M), where γ is the adiabatic index, R is the universal gas constant, T is absolute temperature, and M is molar mass.
Which units should I use for molar mass?
Use kilograms per mole. Divide a value in grams per mole by one thousand before entering it.
Does this calculator account for humidity or real-gas effects?
No. It evaluates the ideal-gas thermodynamic formula from the properties you provide; humidity, non-ideal behaviour, flow, and boundary effects are outside its scope.
Can I enter the temperature in degrees Celsius?
No, the temperature must be absolute, in kelvin. Add 273.15 to a Celsius reading before entering it; zero or negative values are rejected because the formula needs a positive absolute temperature.
Why does sound travel faster in a light gas?
Because the speed falls as molar mass rises. At the same temperature and adiabatic index, a light gas carries a pressure disturbance much faster than a heavy one, while a higher temperature or a higher index speeds sound up.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/optics/speed-of-sound-ideal-gas \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"adiabatic_index":1.4,"temperature_k":293.15,"molar_mass_kg_per_mol":0.0289652}'const res = await fetch("https://api.kit.forhosting.com/optics/speed-of-sound-ideal-gas", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"adiabatic_index": 1.4,
"temperature_k": 293.15,
"molar_mass_kg_per_mol": 0.0289652
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/optics/speed-of-sound-ideal-gas",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"adiabatic_index": 1.4,
"temperature_k": 293.15,
"molar_mass_kg_per_mol": 0.0289652
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/optics/speed-of-sound-ideal-gas", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"adiabatic_index":1.4,"temperature_k":293.15,"molar_mass_kg_per_mol":0.0289652}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"adiabatic_index":1.4,"temperature_k":293.15,"molar_mass_kg_per_mol":0.0289652}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/optics/speed-of-sound-ideal-gas", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"adiabatic_index": 1.4,
"temperature_k": 293.15,
"molar_mass_kg_per_mol": 0.0289652
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "optics.speed_of_sound_ideal_gas",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What the ideal-gas sound-speed equation represents
This calculator uses R = 8.31446261815324 joules per mole-kelvin.
How to enter values and interpret the result
Provide all three required fields as finite positive numbers. For example, 28.9652 grams per mole becomes 0.0289652 kilograms per mole. Values equal to or below zero are rejected because the formula requires positive absolute temperature, positive molar mass, and a positive heat-capacity ratio. Enter adiabatic_index as a ratio such as 1.4 for a typical diatomic-gas approximation. Enter temperature_k as an absolute kelvin temperature, not degrees Celsius or Fahrenheit; convert a Celsius temperature by adding 273.15 before calling the calculator. Enter molar_mass_kg_per_mol in kilograms per mole. This unit detail matters: a tabulated molar mass expressed in grams per mole must be divided by one thousand. The response returns speed_of_sound_m_per_s and the convenient speed_of_sound_km_per_h conversion. It also echoes each physical input, identifies the gas constant, and includes the exact symbolic formula, which makes calculation records easier to inspect. Missing values, strings, NaN, Infinity, and combinations that overflow finite arithmetic also produce an invalid_input error instead of a misleading numerical answer.
Assumptions, appropriate uses, and practical limitations
The browser version is free, while an automated API request costs $0.002.
Technical questions
Can I enter temperature in Celsius?
No. The temperature_k field requires absolute temperature in kelvin. Add 273.15 to a Celsius value first.
How much does an API calculation cost?
Each successful API request costs $0.002. The browser calculation is free, and invalid input is rejected without returning a computed result.