Gas Density Calculator Formula

Understand the math behind the gas density calculator. Each variable explained with a worked example.

Formulas Used

Gas Density

density = (pressure * molar_mass) / (0.08206 * temp)

Variables

VariableDescriptionDefault
pressurePressure (P)(atm)1
molar_massMolar Mass (M)(g/mol)28.97
tempTemperature (T)(K)273.15

How It Works

Gas Density from Ideal Gas Law

Formula

d = PM / (RT)

Where:

  • d = density (g/L)
  • P = pressure (atm)
  • M = molar mass (g/mol)
  • R = 0.08206 L·atm/(mol·K)
  • T = temperature (K)
  • Derived from PV = nRT by substituting n = mass/M and d = mass/V.

    Worked Example

    Calculate the density of air (avg M = 28.97 g/mol) at 1 atm and 273.15 K.

    pressure = 1molar_mass = 28.97temp = 273.15
    1. 01d = PM / (RT)
    2. 02d = (1)(28.97) / (0.08206 × 273.15)
    3. 03d = 28.97 / 22.414
    4. 04d = 1.292 g/L

    Ready to run the numbers?

    Open Gas Density Calculator