Ideal gas density calculator

The Ideal gas density calculator computes ideal gas density from the relation density = P M / (R T). It takes 3 inputs (pressure in Pa, molar mass in kg/mol, temperature in K) and returns the density in kg/m^3. These calculators are for chemistry students, laboratory technicians and anyone working through solution preparation, reaction quantities or the properties and structure of a compound, where the result decides how much of a substance to weigh out, what volume to make a solution up to, or what a given set of conditions implies for the substances involved. Enter your values below and the result updates instantly, and you can share a permalink that pre-fills the exact calculation. Get the units consistent before entering anything (moles against grams, mL against L, absolute temperature wherever a gas relationship calls for it), and where your inputs come from measurement, report the answer to the significant figures the least precise of them actually supports rather than every digit displayed. For example, with pressure = 100000 Pa, molar mass = 0.028 kg/mol, temperature = 300 K, the density works out to 1.122542 kg/m^3, and the worked example further down the page shows every step so you can follow the arithmetic and reproduce it by hand. Reference data is from NIST Chemistry WebBook; the relation itself is a standard result of chemistry, and the figure above each result carries the date it was last verified. Many of the relationships here hold only under ideal or well-behaved conditions, so results can depart from bench reality with concentrated solutions, non-ideal gases, incomplete reactions or impure reagents, and no calculated figure replaces careful measurement and safe handling of the chemicals themselves.

With Pressure = 100000 Pa, Molar mass = 0.028 kg/mol, Temperature = 300 K, the result is 1.122542 kg/m^3.

Formula: density = P M / (R T). Source: NIST Chemistry WebBook, as at 2026-07-09.

Density1.122542 kg/m^3

Applies to: any numeric inputs. Method source: NIST Chemistry WebBook, checked 2026-07-09.

The formula

density = P M / (R T)

Worked example

With Pressure = 100000 Pa, Molar mass = 0.028 kg/mol, Temperature = 300 K:

  1. density = P M / (R T)
  2. Density = 1.122542 kg/m^3

This worked example is one of the automated golden-value tests this calculator must pass before it can publish.

What this assumes

  • Inputs are real numbers in the units shown.
  • The result is the exact value of density = P M / (R T); general information, not professional advice.

Frequently asked questions

What formula does this use?

density = P M / (R T). This is a standard result of chemistry; reference data is from NIST Chemistry WebBook.

Does the result ever change over time?

No. This is a pure formula with no external rate, so the same inputs always give the same result.

Official sources and verification

Reviewed by the CalculatorHub team, edited by James Graham, 2026-07-09. See our methodology. General information, not professional advice.