Category

Ideal Gas Density Calculator — Find Gas Density from the Ideal Gas Law

Calculate the density of an ideal gas from pressure, temperature and molar mass using ρ = (P·M)/(R·T). Pick a gas preset or enter a custom molar mass. Supports metric (kPa, °C, kg/m³) and American (psi, °F, lb/ft³) units, plus specific volume and molar volume.

0 calculations

Calculator Parameters

g/mol
kPa
Standard atmosphere ≈ 101.325 kPa
°C
0 °C = 273.15 K (standard conditions)

Common Gas Densities

Gas M (g/mol) ρ (kg/m³)
Hydrogen (H₂)2.0160.0899
Helium (He)4.0030.1786
Methane (CH₄)16.040.7158
Air28.961.2922
Nitrogen (N₂)28.011.2498
Oxygen (O₂)32.001.4276
Carbon dioxide (CO₂)44.011.9636
Butane (C₄H₁₀)58.122.5933
Values at 0 °C and 101.325 kPa (standard conditions).

Enter Gas, Pressure & Temperature

Select a unit system and gas, enter pressure and temperature, then click "Calculate Density"

Calculating the density of an ideal gas is not more complicated than any of its other properties. The only additional task is to express specific volume in terms of density. That's what this calculator does: it's an ideal gas law calculator with density instead of volume as the output.

If you thought the density of all ideal gases was the same, nothing could be further from reality. Ideal gas densities can be as low as 0.0899 kg/m³ (hydrogen) or as high as 2.59 kg/m³ in the case of butane. In other words, butane is about 29 times denser than hydrogen 🙀

Keep reading to learn more about finding density using the ideal gas law!

Deriving density from the ideal gas law equation

Using our calculator is the easiest way to use the ideal gas law to calculate density. Even so, knowing the equations is essential for a better understanding.

Deriving density from the ideal gas law only requires knowing the relationship between specific volume and density and using it in the ideal gas law equation. Let's remember the equation:

P·ν = R·T

where:

  • P — Absolute pressure of the gas;
  • ν — Specific volume of the gas;
  • R — Specific gas constant, different for every gas; and
  • T — Absolute gas temperature, in kelvin (K).

Specific volume measures how much space a substance occupies per unit of mass. It's the inverse of density (ρ):

ν = 1 / ρ

If we insert this density relationship into the ideal gas law:

P / ρ = R·T

and solve for ρ, we have:

ρ = P / (R·T)

The specific gas constant R is itself the universal gas constant Ru = 8.314462618 J/(mol·K) divided by the molar mass M of the gas (R = Ru / M). Substituting that in gives the form this calculator uses, where you simply pick a gas (or enter its molar mass):

ρ = (P · M) / (Ru · T)

Example: Air ideal gas density calculation

Let's find the density of dry air at 0 °C (273.15 K) and standard atmospheric pressure (101.325 kPa). Air has a molar mass of about M = 28.96 g/mol = 0.02896 kg/mol.

  1. Convert pressure to pascals: P = 101.325 kPa = 101,325 Pa.
  2. Convert temperature to kelvin: T = 0 °C + 273.15 = 273.15 K.
  3. Apply the formula:

    ρ = (101,325 × 0.02896) / (8.314462618 × 273.15) ≈ 1.292 kg/m³

That's the familiar density of air at 0 °C. Raise the temperature to 20 °C and, at the same pressure, the density drops to about 1.204 kg/m³ — warmer gas is less dense.

Reference: density of common gases

The values below assume standard conditions: 0 °C (273.15 K) and 101.325 kPa (1 atm). Densities scale directly with pressure and molar mass, and inversely with absolute temperature.

Gas Molar mass (g/mol) Density (kg/m³) Density (lb/ft³)
Hydrogen (H₂)2.0160.08990.00561
Helium (He)4.0030.17860.01115
Methane (CH₄)16.040.71580.04469
Nitrogen (N₂)28.011.24980.07803
Air28.961.29220.08067
Oxygen (O₂)32.001.42760.08912
Carbon dioxide (CO₂)44.011.96360.12258
Butane (C₄H₁₀)58.122.59330.16189

Aspects to consider when using the ideal gas law to find density

  • Use absolute temperature and pressure. Temperature must be in kelvin and pressure must be absolute (not gauge). This calculator converts your °C/°F and kPa/psi inputs automatically.
  • The ideal gas model is an approximation. It works very well for most gases at moderate pressures and temperatures well above their boiling point. Near condensation, at very high pressure, or at very low temperature, real gases deviate — use a compressibility factor (Z) for accuracy.
  • Molar mass matters most. At the same temperature and pressure, density is directly proportional to molar mass — that's why heavy gases like butane sink and light gases like hydrogen and helium rise.
  • Density tracks pressure and temperature. Doubling the absolute pressure doubles the density; doubling the absolute temperature halves it.

How to use the ideal gas density calculator

  1. Choose your unit system — Metric (kPa, °C) or American/Imperial (psi, °F).
  2. Select a gas from the list to load its molar mass automatically, or choose "Custom" and type any molar mass in g/mol.
  3. Enter the pressure and temperature of the gas. The defaults (101.325 kPa / 14.696 psi and 0 °C / 32 °F) are standard conditions.
  4. Click Calculate. You'll get the density in kg/m³, g/L, g/cm³ and lb/ft³, plus specific volume, specific gas constant, and molar volume.

FAQs

What is the density of air according to the ideal gas law?

At 0 °C and 101.325 kPa, dry air has a density of about 1.292 kg/m³ (0.0807 lb/ft³). At 15 °C it's about 1.225 kg/m³, and at 20 °C about 1.204 kg/m³. Density falls as temperature rises because the molecules spread out.

How do you find the density of a gas using the ideal gas law?

Rearrange P·V = n·R·T into ρ = (P · M) / (Ru · T), where M is the molar mass and Ru = 8.314 J/(mol·K). Put pressure in pascals and temperature in kelvin, and density comes out in kg/m³.

Why are some gases denser than others at the same conditions?

Because, at a fixed temperature and pressure, density depends only on molar mass: ρ ∝ M. Butane (58.12 g/mol) is roughly 29 times denser than hydrogen (2.016 g/mol) because its molecules are far heavier even though equal volumes contain the same number of molecules (Avogadro's law).

Does gas density change with pressure and temperature?

Yes. Density is directly proportional to absolute pressure and inversely proportional to absolute temperature. Compress a gas and it gets denser; heat it at constant pressure and it gets lighter.

What is specific volume?

Specific volume (ν) is the volume occupied per unit mass — the reciprocal of density, ν = 1/ρ, measured in m³/kg or ft³/lb. The calculator reports it alongside the density.

Calculation History

Loading...