Skip to main content

Gas Density Calculator

Calculate the density of an ideal gas from pressure, molar mass and temperature. ρ = PM/RT.

Reviewed for accuracy by the Math Ora X team Last updated

Result

About the Gas Density Calculator

The density of an ideal gas follows from the gas law: it is the pressure times the molar mass divided by the gas constant times the absolute temperature.

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

Enter pressure (Pa), molar mass (kg/mol, air is 0.02896, note kilograms) and temperature (K). R = 8.314 J/(mol·K). Density is returned in kg/m³.

How to use this calculator

  1. Enter the gas pressure, using a consistent unit such as pascals.
  2. Enter the molar mass of the gas, usually in g/mol or kg/mol, matching the gas constant units you plan to use.
  3. Enter the temperature in kelvin, because the formula requires absolute temperature.
  4. Click calculate to get the gas density . The result uses the same unit system implied by your inputs.

The formula explained

The formula computes the density of an ideal gas from its pressure , molar mass , temperature , and the gas constant . It shows that density increases with pressure and molar mass, and decreases as temperature rises.

  • \(\rho\) = gas density
  • \(P\) = pressure of the gas
  • \(M\) = molar mass of the gas
  • \(R\) = ideal gas constant
  • \(T\) = absolute temperature in kelvin

Step by step method

  1. Write the known values for , , and using compatible units.
  2. Multiply pressure by molar mass to get the numerator, .
  3. Multiply the gas constant by temperature to get the denominator, , then divide to find .

Worked example

Problem. Find the density of oxygen gas at a pressure of \(101325\,\text{Pa}\), molar mass \(0.032\,\text{kg/mol}\), and temperature \(300\,\text{K}\). Use \(R=8.314\,\mathrm{J/(mol}{\cdot}\mathrm{K)}\).

  1. Substitute into \(\rho=\frac{PM}{RT}\): \(\rho=\frac{101325\times 0.032}{8.314\times 300}\).
  2. Compute the numerator and denominator: \(101325\times 0.032=3242.4\), and \(8.314\times 300=2494.2\).
  3. Divide: \(\rho=\frac{3242.4}{2494.2}\approx 1.30\,\text{kg/m}^3\).

Answer. \(1.30\,\text{kg/m}^3\)

Tips and common mistakes

  • Use temperature in kelvin, not degrees Celsius, or the result will be wrong.
  • Make sure your molar mass units match your choice of \(R\). For example, if \(R=8.314\,\mathrm{J/(mol}{\cdot}\mathrm{K)}\), use molar mass in \(\text{kg/mol}\) for density in \(\text{kg/m}^3\).

Frequently asked questions

Why is molar mass in kg/mol here?+

To keep SI units consistent so density comes out in kg/m³. Air's 28.96 g/mol becomes 0.02896 kg/mol.

Does gas density change with temperature?+

Yes, density falls as temperature rises (hot air is less dense), which is why hot-air balloons float.

Must temperature be in kelvin?+

Yes, always use absolute temperature in this formula.

More Physics Tools

Explore related calculators in this category

You Might Also Like

Popular tools from other categories

Can't Find the Right Calculator?

Try our AI Math Solver, type any problem in plain English and get instant step-by-step solutions.

Try AI Solver

Browse All Categories

Home Physics Current Tool
Facebook Twitter WhatsApp