Ideal Gas Density
Calculate ideal gas density using ρ = PM/RT from pressure, temperature, and molar mass. Free online physics tool with 16 gas presets, charts, and breakdowns.
About This Calculator
The Ideal Gas Density Calculator computes the density of a gas under specified pressure and temperature conditions using the ideal gas law. This tool is essential for thermodynamics students, mechanical engineers, HVAC professionals, and anyone working with gas properties in physics and engineering. The density is calculated using the formula ρ = PM/RT, where P is absolute pressure in pascals, M is molar mass in kg/mol, R is the universal gas constant (8.314 J/(mol·K)), and T is absolute temperature in kelvin.
The calculator provides presets for 16 common gases including air, hydrogen, helium, oxygen, carbon dioxide, methane, nitrogen, and steam. When you select a gas, its molar mass is automatically populated, and the specific gas constant is computed. You can also enter a custom molar mass to calculate the density of any ideal gas. The results display the density in kg/m³, along with the molar mass, specific gas constant, pressure, and temperature as individual result cards with an interactive breakdown chart.
At standard atmospheric pressure (101,325 Pa) and 15 °C (288.15 K), dry air has a density of approximately 1.225 kg/m³. The ideal gas law provides accurate results for most gases at moderate pressures and temperatures, though real gases deviate near their critical points. This calculator is suitable for educational purposes, engineering analysis, HVAC system design, and scientific research.
How the formula works
The ideal gas law PV = nRT can be rewritten in terms of density. Since the number of moles n = m/M (mass divided by molar mass), and density ρ = m/V, substituting gives ρ = PM/RT. Alternatively, using the specific gas constant Rₛ = R/M, the formula becomes ρ = P/(Rₛ·T). The specific gas constant is unique to each gas and is automatically calculated when you select a gas or enter a molar mass.
Regional Notes
Worldwide: The ideal gas law is universally applicable and uses SI units (Pa, K, kg/mol). This calculator works with any consistent unit system. For everyday applications, common gases and their molar masses are identical regardless of region. The specific gas constant for air (287.058 J/(kg·K)) is internationally recognized and used in aviation, meteorology, and engineering worldwide.
Engineering applications: In the US, pressure is often expressed in psi; convert to Pa (1 psi ≈ 6894.76 Pa) before entering. In Europe, kPa or bar are common (1 bar = 100,000 Pa). This calculator accepts pressure in pascals for consistency with the SI-derived formula.
Frequently Asked Questions
What is the ideal gas density formula?
The ideal gas density is calculated using the formula ρ = PM/RT, where P is absolute pressure in pascals, M is molar mass in kg/mol, R is the universal gas constant (8.314 J/(mol·K)), and T is absolute temperature in kelvin. The density can also be expressed as ρ = P/(Rₛ·T) where Rₛ is the specific gas constant.
What is the density of air at standard conditions?
At standard atmospheric pressure (101,325 Pa) and 15 °C (288.15 K), the density of dry air is approximately 1.225 kg/m³. Using the ideal gas density formula with air's molar mass of 28.9647 g/mol, this gives Rₛ = 287 J/(kg·K), resulting in ρ = 101325 / (287 × 288.15) = 1.225 kg/m³.
Is the density of all ideal gases the same?
No, the density of ideal gases varies significantly because each gas has a different molar mass. Hydrogen (H₂) has a density of only about 0.0838 kg/m³ at STP, while butane (C₄H₁₀) has a density of about 2.48 kg/m³ — making butane nearly 30 times denser than hydrogen under the same conditions.
When does the ideal gas law fail for density calculations?
The ideal gas law becomes inaccurate near the critical point of a gas, where compressibility effects dominate. At high pressures (above 10 atm) or low temperatures (near the boiling point), real gases deviate from ideal behavior. The compressibility factor Z quantifies this deviation, with Z = 1 for ideal gases and Z ≠ 1 for real gases.
How does temperature affect gas density?
Gas density is inversely proportional to absolute temperature when pressure is held constant. Doubling the temperature (in kelvin) halves the density, as shown by the ideal gas law. This explains why hot air rises — it is less dense than the surrounding cooler air, creating buoyancy that drives atmospheric circulation and convection.
How does pressure affect gas density?
Gas density is directly proportional to absolute pressure when temperature is held constant. Doubling the pressure doubles the density. This relationship is why compressed air tanks can store large masses of air in small volumes, and why atmospheric pressure decreases with altitude — the air density also decreases.
What gases can I calculate density for?
This calculator includes presets for 16 common gases: air, argon, butane, carbon dioxide, carbon monoxide, ethane, ethylene, helium, hydrogen, methane, neon, nitrogen, octane, oxygen, propane, and steam. You can also enter a custom molar mass to calculate the density of any other ideal gas.
How do I convert molar mass from g/mol to kg/mol for the formula?
To convert molar mass from g/mol to kg/mol, divide by 1000. For example, air has a molar mass of 28.9647 g/mol, which equals 0.0289647 kg/mol. The specific gas constant Rₛ is then calculated as Rₛ = R / M, where R = 8.314 J/(mol·K) is the universal gas constant and M is the molar mass in kg/mol.