Calculate gas density using ρ = PM/(RT). Find density of any gas from pressure, temperature, and molar mass with built-in gas database and unit conversions.
The **Ideal Gas Density Calculator** determines the density of any gas using the ideal gas law rearranged to ρ = PM/(RT). Gas density depends on three factors: pressure, temperature, and the molecular weight of the gas. This relationship is fundamental to atmospheric science, chemical engineering, combustion analysis, and HVAC system design.
Understanding gas density is essential in numerous applications. Lighter-than-air gases like hydrogen and helium float because their low molar mass gives them lower density than air. Hot air rises because heating decreases density. Industrial gas handling, pipeline design, and combustion calculations all require accurate density data at specific conditions.
This calculator includes a database of common gases with their molar masses, provides density in multiple unit systems, and computes derived quantities including specific volume, number density, mean free path, and speed of sound. Compare densities of different gases side by side at your specified conditions. Check the example with realistic values before reporting.
Gas density calculations are needed constantly in chemical engineering, atmospheric science, combustion analysis, and HVAC design. This calculator provides instant results for any gas at any conditions, with a built-in database eliminating the need to look up molar masses separately.
The comparison charts make it easy to see relative densities of different gases at your specified conditions — useful for gas mixture analysis, leak behavior prediction, and buoyancy calculations.
Gas Density: ρ = PM / (RT) Where: - ρ = density (kg/m³) - P = pressure (Pa) - M = molar mass (kg/mol) - R = universal gas constant = 8.31446 J/(mol·K) - T = temperature (K) Specific Volume: v = 1/ρ (m³/kg) Number Density: n = P/(k_B·T) (molecules/m³)
Result: 1.1839 kg/m³
Air (M = 28.97 g/mol) at 25°C (298.15 K) and 101.325 kPa: ρ = (101325 × 0.02897) / (8.31446 × 298.15) = 1.1839 kg/m³. Slightly less than the standard density of 1.225 kg/m³ at 15°C because warm air is less dense.
The ideal gas density formula ρ = PM/(RT) is a direct rearrangement of PV = nRT. By substituting n = m/M and rearranging, we get ρ = m/V = PM/(RT). This elegant formula shows that density depends only on pressure, temperature, and the molecular identity of the gas.
For gas mixtures like air, we use the average molar mass weighted by mole fractions. Air's effective molar mass of 28.97 g/mol reflects its composition: 78% N₂ (28.01), 21% O₂ (32.00), and 1% Ar (39.95). Humid air is actually slightly less dense than dry air because water vapor (M = 18.02) replaces heavier N₂ and O₂ molecules.
**Combustion:** Fuel-air ratios and flame temperatures depend critically on air density. At altitude, engines produce less power because less dense air delivers fewer oxygen molecules per cylinder volume.
**Pipeline Design:** Gas pipeline pressure drops and flow rates require accurate density at operating conditions. Natural gas density varies with composition (methane content), pressure, and temperature along the pipeline.
**Balloon and Airship Design:** The lifting force equals the weight of air displaced minus the weight of the enclosed gas. Helium (ρ = 0.164 kg/m³ at STP) provides about 1.0 kg of lift per cubic meter compared to air.
The ideal gas law assumes no intermolecular forces and zero molecular volume. Real gases deviate from this, especially near their critical points. The compressibility factor Z = PV/(nRT) quantifies the deviation: Z = 1 for ideal behavior, Z < 1 when attractive forces dominate, and Z > 1 when molecular volume matters. For air at atmospheric conditions, Z ≈ 0.9997 — the ideal gas assumption is excellent.
Standard Temperature and Pressure: 0°C (273.15 K) and 101.325 kPa (1 atm). At STP, air density is 1.292 kg/m³. Some references use 25°C as standard, giving 1.184 kg/m³.
Both pressure and temperature decrease with altitude, but pressure drops faster. Net effect: air density decreases by roughly 12% per 1,000 m of altitude gain. At 5,500 m, air density is about half of sea level.
Fan performance, duct sizing, and heat transfer calculations all depend on air density. At high altitude or temperature, air is less dense, requiring larger equipment for the same mass flow rate.
At high pressures (>10 atm for most gases) or low temperatures (near liquefaction), real gas behavior deviates significantly. Use the van der Waals equation or other equations of state for these conditions.
Among common gases, sulfur hexafluoride (SF₆, M = 146) is extremely dense — about 6 kg/m³ at STP, five times denser than air. Xenon (M = 131) and uranium hexafluoride (UF₆, M = 352) are also very dense.
Hydrogen has the lowest molar mass of any gas (2.016 g/mol), making it about 14 times less dense than air. This is why it was originally used for lighter-than-air flight before being replaced by helium for safety.