Ideal Gas Density Calculator
Use the ideal gas equation to estimate gas density at a given pressure and temperature.
where ρ = density, P = absolute pressure, M = molar mass, Z = compressibility factor, R = 8.314462618 J/(mol·K), and T = absolute temperature.
What is gas density?
Gas density is the mass of a gas per unit volume. It tells you how much matter is packed into a specific space, usually reported as kg/m³ or g/L. Engineers, students, and technicians use gas density in ventilation design, process calculations, combustion analysis, leak behavior studies, and lab work.
How this calculator works
This tool uses the ideal gas relationship between pressure, temperature, and molar mass:
- Higher pressure usually increases density.
- Higher temperature usually decreases density.
- Heavier molecules (higher molar mass) create higher density at the same conditions.
The optional Z factor corrects for non-ideal behavior. If you are in moderate conditions and using a common gas, setting Z = 1 is often a good first estimate.
Units and conversion notes
Pressure
The calculator accepts Pa, kPa, MPa, bar, atm, and psi, then converts internally to pascals (Pa).
Temperature
Temperature is converted to Kelvin before calculation. Remember: gas laws require absolute temperature, so values at or below 0 K are physically invalid.
Density outputs
Results are shown in both kg/m³ and g/L. These are numerically equal: 1 kg/m³ = 1 g/L.
Example calculation
Suppose you want air density at approximately room conditions:
- Pressure = 101.325 kPa
- Temperature = 25°C
- Molar mass = 28.965 g/mol
- Z = 1
The calculator will return about 1.18 kg/m³, which agrees with typical textbook values for dry air near room temperature.
When ideal gas estimates are less accurate
The ideal gas model is fast and useful, but real gases can deviate from it. Accuracy may decrease when:
- Pressure is very high.
- Temperature is very low (near condensation points).
- The gas is strongly interacting or near critical conditions.
In those cases, use an equation of state or measured Z-factor data for improved precision.
Practical applications
- Sizing fans, ducts, and gas handling systems
- Estimating mass flow from volumetric flow
- Comparing buoyancy effects between gases
- Planning lab gas usage and storage
- Preliminary safety and dispersion studies
Quick FAQ
Do I need absolute pressure or gauge pressure?
Use absolute pressure. If you only have gauge pressure, add local atmospheric pressure first.
What if I do not know molar mass?
Use the gas preset list or look up the chemical molecular weight and enter it in g/mol.
Why include Z if this is an ideal gas calculator?
Z lets you apply a simple correction when real-gas behavior matters, while keeping the tool easy to use.