Convert pressure to density for air or another ideal gas from absolute pressure and temperature, or solve density to pressure; common gas presets included.

Prefilled with standard sea-level pressure (101.325 kPa). Gauge pressure must first be converted to absolute pressure.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Gas densityFinds the density of an ideal gas from its pressure and temperatureRequires absolute pressure, gas temperature and the gas
Absolute pressureFinds the absolute pressure of an ideal gas from its density and temperatureRequires gas density, gas temperature and the gas
TemperatureFinds the temperature of an ideal gas from its pressure and densityRequires absolute pressure, gas density and the gas

The gas is chosen by molar mass: dry air 28.965 g/mol, carbon dioxide 44.0095, helium 4.002602, nitrogen 28.0134, oxygen 31.9988, hydrogen 2.01588, methane 16.0425, argon 39.948, or a custom molar mass. Pressure can be in Pa, kPa, bar, psi or atm, temperature in °C, K or °F, and density in kg/m³ or lb/ft³. The pressure field starts at 101.325 kPa, standard sea-level pressure.

Pressure to Density Formulas

ρ = p × M ÷ (R × T) [1]
ρGas density (kg/m³)
pAbsolute pressure (Pa)
MMolar mass of the gas (kg/mol)
RMolar gas constant, 8.314462618 J/(mol·K) [2]
TAbsolute temperature (K)

This is the ideal gas law written for density. It is often written p = ρ × Rs × T, where Rs is the constant for one particular gas, equal to R divided by its molar mass [1]. For dry air the calculator reports Rs as 287.052 J/(kg·K).

Gas density

Dry air at 101.325 kPa and 25 °C (298.15 K) has a density of 101,325 × 0.028965 ÷ (8.314462618 × 298.15) = 1.183917 kg/m³. Carbon dioxide at 1 atm and 0 °C comes to 1.963485 kg/m³. The result also shows specific volume, which is 1 ÷ ρ.

Absolute pressure

p = ρ × R × T ÷ M

Dry air with a density of 1.2 kg/m³ at 20 °C (293.15 K) is at 1.2 × 8.314462618 × 293.15 ÷ 0.028965 = 100,979 Pa, or 100.979 kPa absolute.

Temperature

T = p × M ÷ (ρ × R)

Dry air at 101.325 kPa with a density of 1.2 kg/m³ is at 101,325 × 0.028965 ÷ (1.2 × 8.314462618) = 294.154 K, which is 21.004 °C.

The temperature in these formulas has to be absolute [1], so the calculator converts with K = °C + 273.15 and K = (°F − 32) × 5 ÷ 9 + 273.15. Pressures are converted with 1 atm = 101,325 Pa, 1 bar = 100,000 Pa and 1 psi = 6,894.757 Pa, and 1 lb/ft³ is 16.01846 kg/m³ [3]. A gauge reading must be changed to absolute pressure before it is entered, by adding the surrounding atmospheric pressure.

Limits of This Estimate

  • The formula holds for an ideal gas, or a real gas that behaves like one [1]. At high pressure or close to the point where the gas condenses, the real density can differ substantially. No compressibility factor is applied.
  • It does not apply to liquids. The density of a liquid barely changes with pressure, so it cannot be found this way.
  • The preset molar masses are conventional values for the pure dry gas. Humid air is lighter than dry air, and a gas mixture needs its own average molar mass entered as a custom value.

Sources

  1. NASA Glenn Research Center, Equation of State: the ideal gas equation in its density form, absolute temperature and the ideal-gas limit
  2. NIST, CODATA value of the molar gas constant: the value of R
  3. NIST, Guide to the SI (Special Publication 811), Appendix B.8: pressure, density and temperature unit conversions