Ideal Gas Density Calculator
Free calculate gas density from pressure, temperature, and molecular weight using the ideal gas law.
Input Parameters
Air: 28.97 g/mol, H₂: 2.016 g/mol, O₂: 32.00 g/mol
Results
Enter values to calculate density
What is Ideal Gas Density?
Ideal gas density is the mass per unit volume of an ideal gas. Unlike liquids, gas density is highly dependent on pressure and temperature, making it a variable property rather than a constant.
The density of an ideal gas increases with pressure and decreases with temperature. This is why balloons expand at high altitudes (lower pressure) and why hot air rises (lower density than cold air).
Ideal gas density calculations assume the gas behaves ideally, meaning molecules have no volume and no intermolecular forces. This approximation works well for most gases at moderate pressures and temperatures.
Ideal Gas Density Formula
Where:
- • ρ = Gas density (kg/m³)
- • P = Absolute pressure (Pa)
- • M = Molar mass (kg/mol)
- • R = Universal gas constant (8.314 J/(mol·K))
- • T = Absolute temperature (K)
How to Calculate Ideal Gas Density
-
1
Convert temperature to Kelvin
If given in °C, add 273.15. If in °F, convert: T(K) = (T(°F) + 459.67) × 5/9
-
2
Convert pressure to Pascals
Convert all pressure units to Pascals (Pa) for consistent calculations.
-
3
Convert molecular weight to kg/mol
Divide grams per mole by 1000 to get kg/mol.
-
4
Apply the formula
Calculate ρ = (P × M) / (R × T) using R = 8.314 J/(mol·K)
Practical Examples
Example 1: Air at STP
Calculate the density of air at standard temperature and pressure (0°C, 1 atm). M_air = 28.97 g/mol.
Solution:
P = 101,325 Pa, T = 273.15 K, M = 0.02897 kg/mol
ρ = (101,325 Pa × 0.02897 kg/mol) / (8.314 J/(mol·K) × 273.15 K)
ρ = 1.293 kg/m³
Example 2: Hydrogen at High Pressure
Calculate hydrogen density at 10 bar and 25°C. M_H₂ = 2.016 g/mol.
Solution:
P = 1,000,000 Pa, T = 298.15 K, M = 0.002016 kg/mol
ρ = (1,000,000 Pa × 0.002016 kg/mol) / (8.314 × 298.15)
ρ = 0.813 kg/m³
Applications
Aerospace
Critical for aircraft design, altitude calculations, and understanding lift forces at different air densities.
Chemical Engineering
Essential for process design, gas storage calculations, and flow rate determinations in pipelines.
Meteorology
Used to understand atmospheric density variations with altitude and temperature for weather modeling.
Laboratory
Important for gas chromatography, mass spectrometry, and precise gas mixture calculations.
Frequently Asked Questions
Why does gas density change with pressure and temperature?
Gases are compressible. Increasing pressure compresses the gas (more molecules per volume), increasing density. Increasing temperature makes molecules move faster and spread out, decreasing density.
What is the difference between ideal and real gas density?
Ideal gas law assumes no molecular volume or interactions. Real gases deviate at high pressures and low temperatures. For most applications, ideal gas law is accurate within 1-2%.
How does altitude affect air density?
At higher altitudes, atmospheric pressure decreases, so air density decreases. At 5,500 m (18,000 ft), air density is about half that at sea level.
Can I use this for gas mixtures?
For mixtures, use the average molecular weight: M_avg = Σ(x_i × M_i), where x_i is the mole fraction of component i.
What is standard temperature and pressure (STP)?
STP is defined as 0°C (273.15 K) and 1 atm (101,325 Pa). At STP, 1 mole of ideal gas occupies 22.414 L.