Home · Science · Heat & Thermodynamics · Gas Density Calculator
Gas Density Calculator
Density of an ideal gas from pressure, molar mass and temperature: ρ = pM/(RT). Works for any gas once its molar mass is entered in kg/mol.
What this calculator does
Density of an ideal gas from pressure, molar mass and temperature: ρ = pM/(RT). Works for any gas once its molar mass is entered in kg/mol. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
From pV = nRT with n = m/M, density ρ = m/V = pM/(RT).
Molar mass is entered in kg/mol (air ≈ 0.02897, oxygen ≈ 0.032, carbon dioxide ≈ 0.044).
Worked example
With the example inputs this page opens with (pressure p (pa) 101325, molar mass m (kg/mol) 0.029, temperature t (k) 293.15), the result is 1.21 kg/m³ — density ρ. Computed from the inputs on this page with the formula below — change any figure and every result updates.
Quick reference
| Pressure p (Pa) | Density ρ |
|---|---|
| 50662.5 | 0.60 kg/m³ |
| 81060 | 0.96 kg/m³ |
| 101325 | 1.21 kg/m³ |
| 126656.25 | 1.51 kg/m³ |
| 151987.5 | 1.81 kg/m³ |
| 202650 | 2.41 kg/m³ |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
Why does gas density fall when temperature rises?
At fixed pressure the gas expands, so the same mass occupies more volume and the density drops in proportion to 1/T.
What is the density of dry air at 20 °C and 101325 Pa?
About 1.20 kg/m³ for M = 0.029 kg/mol; using the exact air value 0.02897 kg/mol gives about 1.204 kg/m³.
How does the Gas Density Calculator work?
Density of an ideal gas from pressure, molar mass and temperature: ρ = pM/(RT). Works for any gas once its molar mass is entered in kg/mol. Pressure · Molar mass · Temperature → Density. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Gas Density Calculator need?
Pressure · Molar mass · Temperature → Density. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.