Real Gas Density Calculator

Turn pressure and temperature into reliable density values. Pick a model, then enter gas properties. Get Z factor, density, and downloadable results in seconds.

Calculator

Use absolute pressure for best accuracy.
C and F are converted to Kelvin internally.
Example: CO₂ is 44.01 g/mol.
Cubic EOS is useful near high pressure or non-ideal regions.
For gases, vapor root is typical.
1 kg/m³ equals 1 g/L.
Use a value from charts, tables, or simulation.
Tip
When Z is known, density is direct with ρ = P·M / (Z·R·T).
CO₂ Tc ≈ 304.13 K.
CO₂ Pc ≈ 73.77 bar.
CO₂ ω ≈ 0.225 (set 0 if unknown).
EOS note
Peng–Robinson solves a cubic in Z. Near saturation, multiple Z roots can occur; choose vapor or liquid to select a root consistently.

Example Data Table

These examples are illustrative. Use your own properties for best results.

Gas P T M Model Inputs for model Expected note
CO₂ 10 bar 25 °C 44.01 g/mol Peng–Robinson Tc 304.13 K, Pc 73.77 bar, ω 0.225 Non-ideal Z < 1 at moderate pressure.
N₂ 1 atm 20 °C 28.013 g/mol Ideal Z = 1 Often close to ideal near ambient conditions.
Propane 20 bar 40 °C 44.097 g/mol Known Z Z from chart/table, e.g., 0.80 Use data sources appropriate for your region.

Formula Used

The calculator uses the real-gas form of the ideal gas relationship:

ρ = (P · M) / (Z · R · T)
ρ is density, P is absolute pressure, M is molar mass, T is absolute temperature, R is the universal gas constant, and Z is the compressibility factor.

When the Peng–Robinson option is selected, Z is computed by solving the EOS cubic and choosing a root based on the phase selection.

How to Use This Calculator

  1. Enter pressure, temperature, and molar mass with units.
  2. Select a Z method: EOS, known Z, or ideal.
  3. If using EOS, provide Tc, Pc, and ω for the gas.
  4. Choose vapor or liquid root when near saturation.
  5. Press Submit to view results above the form.
  6. Download the CSV or PDF report for documentation.

FAQs

1) What is real-gas density?

It is gas density corrected for non-ideal behavior using the compressibility factor Z, which accounts for intermolecular forces and finite molecular size at given P and T.

2) When should I avoid the ideal assumption?

Avoid Z = 1 at elevated pressures, low temperatures near condensation, or for strongly non-ideal gases. Under these conditions, EOS or a known Z improves accuracy.

3) What does the compressibility factor Z mean?

Z compares real behavior to ideal behavior. Z < 1 often indicates attractive forces dominate, while Z > 1 suggests repulsive effects dominate at the selected conditions.

4) Why does the EOS have vapor and liquid roots?

Near saturation, cubic equations can yield multiple Z solutions that correspond to different phases. Selecting vapor chooses the largest root; selecting liquid chooses the smallest.

5) What inputs are required for Peng–Robinson?

You need critical temperature Tc, critical pressure Pc, and an acentric factor ω. These are tabulated for common gases in property databases and engineering handbooks.

6) What units does the calculator use internally?

Pressure is converted to pascals, temperature to kelvin, and molar mass to kg/mol. Density is first computed in kg/m³ and then converted to your chosen output unit.

7) Can I use this for gas mixtures?

This version targets a single pure component. For mixtures, you typically need mixing rules and component interaction parameters to compute EOS parameters consistently.

8) Why might my results differ from another tool?

Different tools may use different EOS models, root-selection strategies, or property sources. Ensure Tc, Pc, ω, and pressure basis (absolute vs gauge) match before comparing results.

Built for quick checks, teaching, and lightweight reporting.

Related Calculators

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.