Gas Density Calculator

ρDensityCalcsDensity calculators & reference tools
Interactive calculator

Gas Density Calculator

Calculate gas density from absolute pressure, temperature and molar mass using the ideal-gas relationship, or include a compressibility factor for real-gas estimates. Gas presets and charts show why pressure and temperature cannot be ignored.

Created by QudoosUpdated Oct 8, 2026Formula-first, source-backed
Calculator

Enter your values

Gas equations require absolute pressure, not gauge pressure.

ResultEnter values and calculate.
✓ Formula shown✓ Unit-aware✓ Mobile friendly✓ Sources & assumptions listed
Live visualization

Gas Density Calculator chart

The graph updates from the calculator result so you can compare the answer visually instead of staring at one lonely number like civilization intended.

Key terms

Gas density

Mass per unit volume of a gas at stated pressure and temperature.

Molar mass

Mass of one mole of gas, usually expressed in g/mol or kg/mol.

Compressibility factor Z

Dimensionless correction representing deviation from ideal-gas behavior.

Absolute pressure

Pressure measured relative to vacuum, required by gas equations.

Ideal gas density formula

Starting from PV=nRT and using molar mass M, ideal-gas density is:

ρ = PM/(RT)

Pressure must be absolute and temperature must be in kelvins. The formula works best when the gas is sufficiently dilute and far from condensation.

Real gas density and compressibility factor

A common engineering form includes the compressibility factor Z:

ρ = PM/(ZRT)

When Z differs from 1, an ideal-gas calculation can be materially wrong. High pressure, low temperature and proximity to the critical region are warning signs that a validated equation of state may be necessary.

How to use the gas density calculator

Choose Ideal Gas or Real Gas with Z, select a gas preset or enter molar mass, then enter absolute pressure and temperature. The calculator reports density and compares the result visually with familiar gases.

Absolute pressure vs gauge pressure

Gas laws require absolute pressure. If a gauge reads zero at atmospheric conditions, that is not zero absolute pressure. Convert gauge pressure to absolute by adding local atmospheric pressure in compatible units.

How pressure and temperature affect gas density

At approximately fixed temperature, increasing pressure generally raises density. At approximately fixed pressure, increasing temperature generally lowers density. Real-gas departures become more important as molecules interact more strongly.

Gas mixtures and molecular weight

For an ideal mixture, calculate mixture molar mass from mole fractions, then use the same density relationship. Natural gas and flue gas can require detailed composition and a real-gas model for accurate work.

Gas density vs air

Relative gas density can be expressed as the ratio of gas density to air density at the same conditions. Helium and hydrogen are much lighter than air; carbon dioxide is heavier than air at comparable conditions.

Convert gas density to mass or volume

Once state conditions and density are known, m=ρV and V=m/ρ can convert between gas mass and volume. Remember that the volume of a compressible gas changes if pressure or temperature changes.

When not to use a simple gas formula

Use specialized property models for high-pressure hydrogen, supercritical CO₂, saturated refrigerants or other conditions where phase behavior is important. The site provides dedicated tools for several of these cases.

Common gas reference values

At low pressure, common gases can be compared approximately by molar mass at the same temperature and pressure. Hydrogen and helium are light; methane is lighter than air; carbon dioxide is heavier. A reference table should always name the state conditions because gas density is not portable from one pressure-temperature pair to another.

Worked gas-density example

For dry air approximated as an ideal gas at 20°C and 1.01325 bar absolute with molar mass 28.965 g/mol, the equation gives a density close to 1.20 kg/m³. Increase pressure while holding temperature constant and density rises; increase temperature at fixed pressure and density falls.

Common gas-density mistakes

The most damaging mistakes are entering gauge pressure as absolute pressure, using °C directly instead of kelvins, using molar mass in g/mol where kg/mol is required internally, and applying an ideal-gas formula at a high-pressure state where Z differs materially from 1.

Frequently asked questions

How do I calculate the density of a gas?

For an ideal gas use ρ=PM/(RT), with absolute pressure and absolute temperature.

Is gas density higher than liquid density?

Usually gases are much less dense than liquids under ordinary conditions, though compressed or supercritical fluids can become much denser.

What is the densest gas?

The answer depends on temperature, pressure and whether you mean a stable gas at a particular condition. State conditions before comparing.

Which gases are lighter than air?

Hydrogen and helium are well-known examples at comparable conditions.

How do I calculate gas weight?

Calculate density at the relevant state, multiply by volume for mass, then multiply by gravity if force is required.

Sources & references

We prefer standards bodies, government/scientific agencies and primary technical references. Reference values can vary with conditions, grade, composition or measurement method.

Related calculators & guides

Q
Created by

Qudoos

Qudoos creates and maintains the calculator experience, formulas, explanations and reference structure for DensityCalcs. Each tool is built around transparent equations, visible assumptions, source-backed reference values and reproducible steps. Professional credentials are never invented.

Review framework: Methodology · Editorial policy · Corrections

DensityCalcs · [email protected]