Gas Density Calculator

Enter a gas's molar mass, absolute pressure, and temperature to calculate its density using the ideal gas law (ρ = PM/RT). Choose from common preset gases like Air, Methane, CO₂, or Propane, or enter a custom molar mass. Results include gas density in kg/m³ and a comparison to air density.

Select a common gas or choose Custom to enter your own molar mass.

g/mol

Molar mass of the gas. Auto-filled when a preset is selected.

Pa

Standard atmospheric pressure = 101,325 Pa (1 atm).

Select the unit your pressure value is in.

°C

Enter temperature in °C. Standard conditions = 0°C or 15°C.

Results

Gas Density

--

Gas Density

--

Air Density (same conditions)

--

Relative Density vs Air

--

Molar Density

--

Temperature (Kelvin)

--

Gas Density vs Air Density (kg/m³)

Frequently Asked Questions

What is gas density?

Gas density is the mass of a gas per unit volume, typically expressed in kg/m³ or g/L. Unlike solids and liquids, the density of a gas is highly variable and depends strongly on both temperature and pressure. As pressure increases, gas density increases; as temperature increases, gas density decreases.

What formula is used to calculate gas density?

Gas density is calculated using the ideal gas law rearranged as ρ = PM / (RT), where P is absolute pressure in Pascals, M is the molar mass of the gas in kg/mol, R is the universal gas constant (8.314 J/mol·K), and T is temperature in Kelvin. This gives density in kg/m³.

Is natural gas heavier than air?

No — natural gas (mainly methane, molar mass ≈ 16.04 g/mol) is lighter than air (molar mass ≈ 28.97 g/mol). At standard conditions (15°C, 1 atm), methane has a density of about 0.668 kg/m³ compared to air's 1.225 kg/m³, giving a relative density of roughly 0.55. This is why natural gas rises when leaked.

What is standard temperature and pressure (STP) for gas density?

There are two common standards. STP (IUPAC) is defined as 0°C (273.15 K) and 100,000 Pa (1 bar). The older standard condition is 0°C and 101,325 Pa (1 atm). Another widely used reference is 15°C and 101,325 Pa, common in the gas industry. Always check which standard applies when comparing density values.

How does temperature affect gas density?

Gas density is inversely proportional to temperature (in Kelvin). As temperature rises, gas molecules move faster and expand, occupying more volume for the same mass — so density decreases. For example, air at 0°C is denser than air at 100°C at the same pressure.

How does pressure affect gas density?

Gas density is directly proportional to absolute pressure. Doubling the pressure (at constant temperature) doubles the density, because the same number of molecules are compressed into half the volume. This is why compressed gases in tanks have much higher density than atmospheric gas.

What is relative density (specific gravity) of a gas?

Relative density, or specific gravity, of a gas is the ratio of its density to the density of air at the same temperature and pressure. A value less than 1 means the gas is lighter than air (e.g. methane ≈ 0.55, hydrogen ≈ 0.07), while a value greater than 1 means it is heavier (e.g. CO₂ ≈ 1.52, propane ≈ 1.52).

Is the ideal gas law accurate for all gases?

The ideal gas law is accurate for most gases at low to moderate pressures and temperatures well above the gas's boiling point. At very high pressures or temperatures close to the condensation point, real-gas equations (like van der Waals or the AGA8 equation for natural gas) provide more accurate results.

More Physics Tools