Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Ideal Gas Density
1.292498
kg/m³
Gas constant R 8.314462618 J/(mol·K)
Formula ρ = P·M / (R·T)

What Is the Ideal Gas Density Calculator?

This calculator finds the density of a gas treated as ideal, based on its pressure, molar mass, and absolute temperature. It is derived directly from the ideal gas law and is widely used in chemistry, thermodynamics, HVAC, and aerospace engineering for quick density estimates of air and other gases.

The Formula Explained

Starting from the ideal gas law \(PV = nRT\), and noting that mass equals moles times molar mass (\(m = nM\)) while density is mass over volume (\(\rho = m/V\)), we get:

$$\rho = \frac{P \cdot M}{R \cdot T}$$

Here \(P\) is absolute pressure in pascals (Pa), \(M\) is molar mass in kg/mol, \(R\) is the universal gas constant \(8.314462618\ \text{J/(mol}\cdot\text{K)}\), and \(T\) is absolute temperature in kelvin (K). The result is density in kg/m³. Because you usually know molar mass in g/mol, the calculator divides your input by 1000 to convert to kg/mol automatically.

Sealed container of gas particles showing how higher pressure increases density
Higher pressure packs more molecules into the same volume, raising density.
Diagram showing density equals pressure times molar mass divided by gas constant times temperature
The ideal gas density formula relates density to pressure, molar mass, and temperature.

How to Use It

Enter the gas pressure in pascals (1 atm = 101,325 Pa), the molar mass in grams per mole (air ≈ 28.97 g/mol, CO₂ ≈ 44.01 g/mol), and the temperature in kelvin (°C + 273.15). Press calculate to read the density in kg/m³.

Worked Example

Find the density of dry air at standard conditions: \(P = 101{,}325\ \text{Pa}\), \(M = 28.97\ \text{g/mol} = 0.02897\ \text{kg/mol}\), \(T = 273.15\ \text{K}\). Then $$\rho = \frac{101{,}325 \times 0.02897}{8.314462618 \times 273.15} = \frac{2935.39}{2271.10} \approx 1.2925\ \text{kg/m}^3$$ — matching the textbook value for air at 0 °C.

FAQ

Why must temperature be in kelvin? The ideal gas law requires absolute temperature; using Celsius gives wrong, even negative, densities.

Does this work for any gas? Yes, as long as the gas behaves nearly ideally — low pressure and temperatures well above the boiling point. Real gases deviate near condensation.

What pressure should I use for "atmospheric"? Use 101,325 Pa for 1 standard atmosphere, or 100,000 Pa for 1 bar.

Last updated: