Gas Density Calculator: rho = P M / (R T)

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

Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.

How this calculator works

Choose which quantity you want to find.

Enter the other values in the units shown.

The calculator gives the answer with the formula, the substituted numbers, and the answer in other units.

Formulas used

  • \rho = \frac{PM}{RT}
  • M = \frac{\rho RT}{P}

Worked example

With the default numbers in the calculator above:

  1. The formula, arranged to find the density: density = (1 / R x absolute pressure x molar mass) / (temperature)
  2. Put the values in (every value in its SI unit): density = (1 / R x 101325 x 0.02897) / (293.15)
  3. The answer: density: 1.20432 kg/m3
  4. The same answer in other units: 1.20432 g/L

Change the numbers in the calculator to see the full working, every step, for your own case.

A second worked example

A different case, with these numbers: What do you want to find? Molar mass; Density (leave it as it is if this is what you are finding) 1.2043176 kg/m3; Absolute pressure (leave it as it is if this is what you are finding) 101325 Pa; Temperature (leave it as it is if this is what you are finding) 293.15 K.

  1. The formula, arranged to find the molar mass: molar mass = (density x temperature) / (1 / R x absolute pressure)
  2. Put the values in (every value in its SI unit): molar mass = (1.20432 x 293.15) / (1 / R x 101325)
  3. The answer: molar mass: 0.02897 kg/mol
  4. The same answer in other units: 28.97 g/mol

Common questions

What is the density of air?

About 1.204 kg/m3 at 20 C and 101.325 kPa, and 1.293 kg/m3 at 0 C.

How does density change with temperature?

The density falls as the gas warms, in proportion to one over the absolute temperature.

How do I find the molar mass from the density?

Rearrange: M = rho R T / P.

Related calculators

Got a question about this? Ask an engineering question and get a plain-language answer with references.

Further reading: Any physics or chemistry text (the ideal gas law).

Need a calculator we do not have?

Tell us what you would like to calculate. We read every request and build the most asked-for ones.

We store your request (and your email if you give it) to decide what to build. We do not store the numbers you type into calculators.

Embed this calculator on your own page

Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.

Need this drawn, designed or checked?

Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.

Need help with a real project?

Talk to Drafting Central →

← All engineering calculators