Intermediate

Ideal Gas Density Calculator — ρ = PM / (RT)

Find the density of any ideal gas — air, nitrogen, CO₂, hydrogen, helium or any pure gas — from its pressure, temperature and molar mass. The calculator applies ρ = PM / (RT) derived from the ideal gas law and returns density in kg/m³, g/L and g/cm³, plus the molar volume at those conditions.

Pa

1 atm = 101 325 Pa; 1 bar = 100 000 Pa; 1 kPa = 1 000 Pa

K

0 °C = 273.15 K; 25 °C = 298.15 K

g/mol

Air ≈ 28.97; O₂ = 32.00; CO₂ = 44.01; H₂ = 2.016; He = 4.003
Gas density (ρ)
1.292498kg/m³

Density of the ideal gas at the given pressure and temperature

Density (g/L)
1.292498 g/L
Density (g/cm³)
0.001292 g/cm³
Molar volume (Vm = RT/P)
22.414 L/mol
Molar concentration (P/RT)
44.615 mol/m³
Gas constant R
8.314 462 618 J/(mol·K)
Gas molecules in motion — density increases with pressure and molar mass, decreases with temperature
Step by step
  1. 1

    Molar mass (kg/mol)

    M = 28.97 ÷ 1 000 = 0.02897
    Convert g/mol to kg/mol so units are consistent with Pa and J/(mol·K).
  2. 2

    Denominator R × T

    8.314462618 × 273.15 = 2,271.0955
  3. 3

    Density ρ = P × M / (R × T)

    101,325 × 0.02897 ÷ 2,271.0955 = 1.292498
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Ideal gas density ρ = PM / (RT), where P is pressure in Pa, M is molar mass in kg/mol, R = 8.314 J/(mol·K) and T is temperature in kelvin. Air at STP (0 °C, 1 atm, M ≈ 28.97 g/mol) gives ρ ≈ 1.293 kg/m³. Density scales with pressure and molar mass and falls as temperature rises.

Formula
ρ = P × M / (R × T) where R = 8.314 J/(mol·K)
How this is calculated

The ideal gas law PV = nRT links pressure P, volume V, amount n, the universal gas constant R = 8.314 462 618 J/(mol·K) and absolute temperature T in kelvin. Dividing both sides by V gives P = (n/V) × RT. Since density ρ = mass/V = (n × M)/V where M is the molar mass in kg/mol, substituting gives ρ = PM/(RT). This is the simplest model of gas density and is accurate within a few tenths of a percent for most common gases at moderate pressures (roughly below 10 bar) and temperatures well above the boiling point.

The formula shows three key relationships: density is proportional to pressure (doubling P doubles ρ), inversely proportional to temperature (doubling T halves ρ), and proportional to molar mass (heavier gases are denser). Air at standard conditions (1 atm, 0 °C) has density ≈ 1.293 kg/m³; at 25 °C it is ≈ 1.184 kg/m³. CO₂ (M = 44 g/mol) is about 1.5 times denser than air (M ≈ 29 g/mol) at the same conditions.

Important limitation: the ideal gas model assumes gas molecules have no volume and no intermolecular forces. Real gases deviate at high pressures or near the critical point. For accurate engineering work at high pressure, use equations of state such as van der Waals, Peng–Robinson or NIST data.

Frequently asked questions

At standard temperature and pressure (0 °C = 273.15 K, 1 atm = 101 325 Pa) dry air (M ≈ 28.97 g/mol) has density ≈ 1.293 kg/m³ by the ideal gas formula — close to the measured value of 1.292 kg/m³.

Because 1 g/L = 1 g / (1000 cm³) = 1 g / (10⁻³ m³) = 1000 g/m³ = 1 kg/m³. The units are the same numerically, which makes gas densities easy to express — air is about 1.29 kg/m³ = 1.29 g/L.

1 atm = 101 325 Pa; 1 bar = 100 000 Pa; 1 kPa = 1 000 Pa; 1 psi ≈ 6 894.76 Pa. For gauge pressure, add atmospheric pressure (≈ 101 325 Pa) to get absolute pressure before entering it.

APA

TG we-Calculate Editorial Team. (2026). Ideal Gas Density Calculator — ρ = PM / (RT) [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/ideal-gas-density-calculator

Chicago

TG we-Calculate Editorial Team. "Ideal Gas Density Calculator — ρ = PM / (RT)." TG we-Calculate. 2026. https://we-calculate.com/calculator/ideal-gas-density-calculator.

IEEE

TG we-Calculate Editorial Team, "Ideal Gas Density Calculator — ρ = PM / (RT)," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/ideal-gas-density-calculator

BibTeX

@misc{wecalculate_ideal_gas_density_calculator, title = {Ideal Gas Density Calculator — ρ = PM / (RT)}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/ideal-gas-density-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?