Inputs
Formula Used
Ideal gas density is derived from the ideal gas law PV = nRT. Using molar mass M and mass m = nM, density becomes:
- ρ = m/V = (nM)/V
- n/V = P/(RT)
- ρ = (P·M)/(R·T)
The calculator also reports number density using n/V = P/(kBT), where kB is the Boltzmann constant and P is in pascals.
How to Use This Calculator
- Enter pressure and select the correct pressure unit.
- Enter temperature and select its unit for conversion.
- Pick a gas preset, or switch to custom molar mass.
- Click Calculate Density to view results immediately.
- Use the download buttons to save CSV or PDF results.
Example Data Table
| Gas | Pressure | Temperature | Molar Mass | Density (kg/m³) |
|---|---|---|---|---|
| Air (dry) | 101.325 kPa | 20 °C | 28.9652 g/mol | 1.204 |
| Carbon Dioxide | 101.325 kPa | 25 °C | 44.0095 g/mol | 1.799 |
| Helium | 101.325 kPa | 25 °C | 4.002602 g/mol | 0.164 |
| Nitrogen | 200 kPa | 30 °C | 28.0134 g/mol | 2.208 |
| Oxygen | 500 kPa | 15 °C | 31.9988 g/mol | 6.687 |
Values are approximate and assume ideal behavior.
Professional Notes on Ideal Gas Density
1) What this calculation delivers
This tool estimates gas density from pressure, temperature, and molar mass using the ideal gas relation. It returns density (kg/m³), specific volume (m³/kg), and number density (1/m³), so you can move between mass-based and molecule-based descriptions without extra conversions.
2) Core equation and constants
The main model is ρ = (P·M)/(R·T) with R = 8.314462618 J/(mol·K). For number density it uses n/V = P/(kBT) with kB = 1.380649×10-23 J/K. Pressure must be absolute, and temperature must be absolute in kelvin.
3) Unit handling and best practices
The calculator accepts Pa, kPa, MPa, bar, atm, psi, and torr, and converts internally to pascals. Temperature supports K, °C, and °F and is converted to kelvin. To reduce mistakes, confirm gauge-to-absolute conversion when using compressors or vacuum systems.
4) Reference densities at common conditions
At 101.325 kPa and 20 °C, dry air is about 1.204 kg/m³. At the same pressure and 25 °C, carbon dioxide is about 1.799 kg/m³, while helium is about 0.164 kg/m³. These benchmarks help validate inputs and quickly detect unit mix-ups.
5) Sensitivity to temperature and pressure
Density scales linearly with pressure and inversely with temperature. Doubling pressure doubles density. Raising temperature from 300 K to 330 K reduces density by roughly 9.1% when pressure and molar mass stay fixed. This sensitivity matters in HVAC sizing, wind tunnels, and buoyancy work.
6) Choosing the right molar mass
Presets cover common gases (air 28.9652 g/mol, nitrogen 28.0134 g/mol, oxygen 31.9988 g/mol, CO₂ 44.0095 g/mol). For mixtures, compute an effective molar mass from composition and use custom mode. Even small composition shifts can change density in process controls.
7) When ideal assumptions break down
Real gases deviate at high pressures, low temperatures, and near phase boundaries. If you are above several MPa, near saturation, or working with strongly interacting gases, consider a compressibility factor Z and adjust to ρ = (P·M)/(Z·R·T).
8) Practical applications and reporting
Density informs mass flow conversion, buoyancy and lift, storage capacity, and safety ventilation calculations. The CSV export supports logging and audits, while the PDF report provides a compact record of inputs, units, and computed outputs for lab notebooks and engineering reviews.
FAQs
1) Should I use gauge or absolute pressure?
Use absolute pressure. If you have gauge pressure, add local atmospheric pressure before calculating to avoid underestimating density.
2) Why does temperature need conversion to kelvin?
The ideal gas relations require an absolute temperature scale. Celsius and Fahrenheit must be converted to kelvin to keep proportionality correct.
3) How do I compute density for a gas mixture?
Use a composition-weighted molar mass, then enter it in custom mode. For higher accuracy at pressure, include a compressibility factor Z.
4) What is number density used for?
Number density estimates molecules per cubic meter. It is useful for kinetic theory, mean free path calculations, and plasma or vacuum applications.
5) Why do my results differ from a handbook table?
Handbooks often assume specific humidity, altitude, or non-ideal corrections. Ensure the same pressure basis, temperature, and composition as the reference.
6) Can this calculator handle very high pressures?
It can compute a value, but ideal assumptions may fail. For several MPa and above, consider using Z-corrected density from an equation of state.
7) What output should I use for mass flow conversions?
Use density ρ to convert volumetric flow to mass flow. Specific volume is the inverse and is handy for quick checks and thermodynamic tables.
Accurate inputs yield reliable density outputs for decisions everywhere.