Density CalculatorMeasure mass. Define volume.

Density calculators / Gas, air & temperature

A clear measure of matter.

Ideal Gas Density Calculator

Calculate ideal gas density from absolute pressure, temperature and supplied molar mass and Z.

Your measurements & units

kPa absolute
K
g/mol
ratio

Starting values are editable examples. Confirm the sample, measurement basis and units. Dimension switching converts only the labelled geometry fields; other unit selectors describe the numbers you enter.

Reset

Your result

Ready to calculate

Enter your values and press Calculate. The result will open on the calculation page.

Published references · Clear assumptions · No sign-up

The method

Formula and calculation steps

ρ=p M/(Z R T); R=8.31446261815324 J/(mol·K), M in kg/mol.

Calculate ideal gas density from absolute pressure, temperature and supplied molar mass and Z.

  1. Confirm the sample, reference state, measurement basis and units.
  2. Enter actual measurements and compatible reference values.
  3. Submit the form, then interpret the result with the assumptions and limits below.

Z=1 is an ideal-gas example. No real-fluid equation of state or phase check. Natural gas uses an editable methane-like molar mass and does not establish the composition of an actual supply.

Ideal Gas Density: method and interpretation

Calculate ideal gas density from absolute pressure, temperature and supplied molar mass and Z. Z=1 is an ideal-gas example. No real-fluid equation of state or phase check. Natural gas uses an editable methane-like molar mass and does not establish the composition of an actual supply.

Gas density changes with absolute pressure, absolute temperature, composition and nonideal behavior. Gauge pressure must first be converted using the actual atmospheric reference. A supplied compressibility factor is not automatically a real-gas property calculation.

Standard atmosphere describes a reference profile rather than observed weather. Water and moist-air equations have explicit temperature and pressure boundaries. Cryogenic liquids, steam tables, salinity and supercritical properties cannot be inferred from an ideal-gas or pure-water relation.

Check the numbers

Ideal Gas Density Calculator: calculated examples

These scenarios are computed with the same method as the form. They are not product recommendations, code design values or complete standards tables.

Worked example with stated inputs

Absolute gas pressure = 101.325 kPa absolute; Gas temperature = 293.15 K; Gas molar mass = 28.9655 g/mol; Compressibility factor Z (supplied) = 1 ratio.

OutputComputed result
Gas density for supplied p, T, M and Z1.204129 kg/m³
Molar mass28.96546 g/mol
Specific gas constant287.047491 J/(kg·K)
Absolute pressure101.325 kPa absolute
Mass density0.001204 g/cm³ or g/mL
Mass density0.075171 lb/ft³
Mass density4.350191e-5 lb/in³
Mass density0.010049 lb/US gal
Mass density0.012068 lb/Imperial gal

How the stated input changes the result

ScenarioChanged input / basisResult
50.6625 kPa absoluteAbsolute gas pressure0.602064 kg/m³
75.9938 kPa absoluteAbsolute gas pressure0.903097 kg/m³
101.325 kPa absoluteAbsolute gas pressure1.204129 kg/m³
126.656 kPa absoluteAbsolute gas pressure1.505161 kg/m³
151.988 kPa absoluteAbsolute gas pressure1.806193 kg/m³
202.65 kPa absoluteAbsolute gas pressure2.408258 kg/m³

Unchanged inputs use: Absolute gas pressure = 101.325 kPa absolute; Gas temperature = 293.15 K; Gas molar mass = 28.9655 g/mol; Compressibility factor Z (supplied) = 1 ratio. Results retain the model limitations described above.

Common questions

What gas conditions does STP mean here?

There is no hidden STP preset. Enter the absolute pressure and Kelvin temperature for your stated convention, along with compatible molar mass and Z. Different standard-condition conventions can differ.

Can I calculate liquid nitrogen or supercritical CO₂ density here?

No. Those states need an appropriate real-fluid property model. This supplied-Z gas relation does not detect phase boundaries or calculate liquid properties.

How do I use this ideal gas density calculator?

Calculate ideal gas density from absolute pressure, temperature and supplied molar mass and Z. ρ=p M/(Z R T); R=8.31446261815324 J/(mol·K), M in kg/mol.

Which units should I enter?

Use the unit printed beside each input or chosen in its selector. The dimension-unit switch converts only the length or area fields that carry it. Other quantities retain their printed units. Mass density has dimensions M L⁻³; a ratio, number per area or probability density is a different quantity.

Are starting values measured material or reference data?

They are editable worked-example inputs unless a specific source and reference condition are explicitly identified. Measure or obtain the properties appropriate to the actual sample, temperature and method.

Can I export the result to Excel?

After calculating, Export CSV saves numerical results and submitted inputs. CSV is a text table, not an Excel formula workbook or a certified test report.

Where are the formula sources?

Full source addresses are printed below as ordinary text. The equations, worked examples and comparison tables are contained in these pages and do not require an online data service.

Formula sources and references

References support the underlying methods and units. Chosen example inputs are not universal recommendations, supplier ratings, market prices or code limits.

  • NASA Glenn: Equation of State, ideal gas lawhttps://www1.grc.nasa.gov/beginners-guide-to-aeronautics/equation-of-state/
  • NIST Guide to the SI: conversion factorshttps://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors
  • Penn State: Z-factor definition and PV=ZnRThttps://courses.ems.psu.edu/png520/node/1945