FireCADCalc

Ideal Gas Law: Moles, Mass and Density of a Gas

Amount, mass, density and normal volume of a gas in a vessel from its pressure, temperature, volume and molar mass by pV = ZnRT.

Refinery and petrochemicalChemical and fertiliserTank and drumAir compressor and receiver

Inputs

Examples: Air receiver 2 m³ at 8 bar(a), 30 °CCO2 cylinder 50 L at 60 bar(a), 20 °C, Z 0.68Nitrogen bank 10 m³ at 200 bar(a), 25 °C, Z 1.05

Results

Amount of gas0.63479kmol
Mass of gas18.383kg
Density9.1917kg/m³
Volume at normal conditions (0 °C, 1.01325 bar)14.228m³

Download PDF CSV Link to this result Compare another case

Log in to save calculations to your dashboard.

Worked example

Example: Air receiver 2 m³ at 8 bar(a), 30 °C. The inputs, in the units selected above:

InputValue
Pressure (absolute)8.0000 bar
Temperature30.000 °C
Volume2.0000 m³
Molar mass28.960 kg/kmol
Compressibility factor (1 = ideal gas)1.0000 -

Applying the formula below gives:

ResultValue
Amount of gas0.63479 kmol
Mass of gas18.383 kg
Density9.1917 kg/m³
Volume at normal conditions (0 °C, 1.01325 bar)14.228 m³

Open this example in the calculator and change any input.

Formula

\(p V = Z n R T\)

\(m = n M, \quad \rho = m / V\)

\(V_n = n\, V_{m,n} \ (0\ °C,\ 1.01325\ \text{bar})\)

Variables

Symbol Meaning SI unit
\(p\) absolute pressure Pa
\(T\) temperature K
\(V\) volume m³
\(M\) molar mass kg/kmol
\(Z\) compressibility factor -
\(R\) gas constant 8.314 J/(mol·K) J/(mol·K)
\(V_{m,n}\) molar volume at normal conditions m³/mol
\(n\) amount of gas mol
\(m\) mass kg
\(\rho\) density kg/m³
\(V_n\) volume at normal conditions m³

Method and standards

The ideal gas law with a compressibility factor; R is the exact CODATA 2018 value.

Where it is used

  • Gas inventories in receivers and cylinders.
  • Densities for flow calculations.
  • Purge and leak-test calculations.

Common mistakes

  • Using gauge pressure or °C.
  • Ignoring Z for CO₂ or high-pressure gases.
  • Mixing kmol and mol.

Assumptions and limits

  • Single phase gas; Z supplied for non-ideal behaviour.

References

  • Ideal gas law with compressibility factor
  • CODATA 2018 gas constant

Questions and answers

How much air is in a 2 m³ receiver at 8 bar(a) and 30 °C?

About 18.4 kg, or 635 mol and 14.2 Nm³.

When is the ideal gas law not enough?

At high pressure or near condensation: enter a compressibility factor Z from a chart or equation of state.

Absolute or gauge pressure?

Always absolute.

Method and article reviewed by FireCAD engineering on 12 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.

Related calculators

Free engineering calculators: every page computes in SI and converts to your units. Results are for engineering estimation; verify critical designs against the referenced standards.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.