Science

Gas Density Calculator

Density of an ideal gas from pressure, molar mass and temperature.

Enter your values

Enter the pressure in atm.

Enter the molar mass in g/mol (air default).

Enter the temperature in K.

Results update instantly as you type — no submit needed. Your values are remembered on this device, and the shareable link reopens the calculator with exactly these numbers.

Results
Gas density
1.1847 g/L
Gas density
1.1847 kg/m³
Molar volume
24.453 L/mol

Quick answer

Density = (P x M) / (R x T).

rho = PM/RT

At a glance

What it doesDensity of an ideal gas from pressure, molar mass and temperature.
CategoryScience
Inputs neededPressure, Molar mass, Temperature
Main outputGas density
Formularho = PM/RT
CostFree — no sign-up, no download

How to use the Gas Density Calculator

  1. 1Enter the gas pressure in atmospheres.
  2. 2Enter the gas's molar mass (air is about 28.97 g/mol).
  3. 3Enter the absolute temperature in Kelvin to find density.

Inputs explained

Pressure(atm)
Enter the pressure in atm.
Molar mass(g/mol (air default))
Enter the molar mass in g/mol (air default).
Temperature(K)
Enter the temperature in K.

Worked example

Using the values the calculator loads with:

Inputs

  • Pressure1 atm
  • Molar mass28.97 g/mol (air default)
  • Temperature298 K

Results

  • Gas density1.1847 g/L
  • Gas density1.1847 kg/m³
  • Molar volume24.453 L/mol

Frequently asked questions

Why is g/L the same number as kg/m³?

Both units scale by the same factor of 1000, so the numeric value of gas density matches in each.

Does humidity affect air density?

Yes, moist air is slightly less dense than dry air since water vapor has a lower molar mass than N2/O2.

What do I need to enter into the Gas Density Calculator?

Just 3 values: pressure, molar mass, temperature. Every field starts with a realistic example, so you can change one number at a time and watch the result update instantly.

How does the Gas Density Calculator work out the answer?

Density = (P x M) / (R x T). It applies the formula rho = PM/RT and shows the working so you can check each step by hand.

Is the Gas Density Calculator free, and do I need an account?

It is completely free with no sign-up, no download and no usage limit. Everything is calculated in your browser, so the numbers you type never leave your device.

Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.