Skip to main content

Gas Density Calculator

The density of any gas from pressure, temperature, and molar mass — ideal gas formula ρ = P·M / (R·T).

⚠️ Choose the right tool This tool is for gases other than air or custom molar mass. For precision air density (CIPM-2007 formula with humidity correction), use Air Density Calculator. For density unit conversion only, use Density Unit Converter.
Formula: ρ = P · M / (R · T)  with  R = 8.314462618 J/(mol·K) (exact, 2019 SI definition). P in Pa, M in kg/mol, T in kelvin.

Frequently Asked Questions (FAQ)

What is the gas density formula?
Ideal gas density is calculated with ρ = P·M / (R·T), where P = pressure (Pa), M = molar mass (kg/mol), R = 8.314462618 J/(mol·K), and T = absolute temperature (kelvin). This calculator uses the exact R value from the 2019 SI definition.
What is the density of air at standard conditions?
At 101,325 Pa and 15 °C (288.15 K), the density of dry air is 1.225 kg/m³. Select the "Dry air" preset in the calculator to reproduce this figure.
What is the density of CO₂ gas?
At 101,325 Pa and 15 °C, the density of carbon dioxide (CO₂, M = 44.0095 g/mol) is 1.861 kg/m³ — about 1.52× heavier than air under the same conditions.
Why can a helium balloon fly?
Helium (M = 4.002602 g/mol) at 101,325 Pa and 20 °C has a density of only 0.166 kg/m³ — about 13.8% of air density — so the buoyant force (Archimedes) lifts it.
When is the ρ = PM/RT formula inaccurate?
This formula assumes an ideal gas. At very high pressures or very low temperatures near the condensation point, real gases deviate and require the compressibility factor Z (ρ = P·M/(Z·R·T)). For common gases at around atmospheric pressure, the deviation is small (under 1%).
How does this tool differ from the Air Density Calculator?
This Gas Density Calculator computes ANY gas via molar mass using the ideal gas formula. The Air Density Calculator (/tools/air-density/) is for precision air using the CIPM-2007 formula including humidity correction — choose that tool for meteorology and instrument calibration.
What are the molar masses of common gases?
Dry air 28.9647; oxygen (O₂) 31.9988; nitrogen (N₂) 28.0134; carbon dioxide (CO₂) 44.0095; helium (He) 4.002602; hydrogen (H₂) 2.01588; methane (CH₄) 16.0425 g/mol. These are already presets in the calculator; other gases can be entered manually via the custom option.
How do you convert density units?
1 kg/m³ is exactly equal to 1 g/L. For imperial units: 1 kg/m³ = 0.06243 lb/ft³. Example: air 1.225 kg/m³ = 0.07647 lb/ft³.
Why must temperature be in Kelvin?
Because the formula uses absolute temperature (T in kelvin). This calculator accepts °C, °F, or K and converts automatically: K = °C + 273.15 and K = (°F − 32) × 5/9 + 273.15.

Free tool by NRTechStudio