Chemistry · Formula

Density of an ideal gas

The density of a gas from its molar mass, pressure and temperature.

Chemistry librarySymbols definedWorked example
Formula
d = PM / RT

The density of a gas from its molar mass, pressure and temperature.

What the symbols mean

  • d — density, in g/L when P is in kPa and M in g/mol
  • P — pressure
  • M — molar mass
  • R — gas constant
  • T — absolute temperature

What it means

Density rises with pressure and molar mass and falls with temperature. The units of R must match the pressure and volume units used.

Worked example

Example

Air with M ≈ 29 g/mol at 101.3 kPa and 273 K has density ≈ 1.29 g/L.

Apply it

The live calculator applies this relationship with your own numbers and shows the substituted working.

Open the calculator

Related formulas

These relationships often appear alongside the density of an ideal gas in the same problems.

Frequently asked questions

What is the density of an ideal gas formula?

The relationship is d = PM / RT. The density of a gas from its molar mass, pressure and temperature.

When should I use the density of an ideal gas formula?

Density rises with pressure and molar mass and falls with temperature. The units of R must match the pressure and volume units used.

How do I avoid unit mistakes?

Write each quantity with its unit before substituting, convert to the units the formula expects, and check that the result's unit matches the quantity you are solving for. Angles must be in radians for calculus-based expressions unless the page says degrees.

Sources and standards

The equation form, symbols and expected units on this page are checked against the reference works below.

How these are used: sources and standards.

Reviewed November 2026 · Educational reference. See the disclaimer and methodology.