Gas Density and Molar Mass

Deriving density and molar mass from the ideal gas law

Lesson 1696 of 4,500 · States of Matter: Gases and Liquids

Learning objectives

Introduction

Gas density is not a single fixed number for a substance. The same gas can be compressed or warmed, changing mass per unit volume. The ideal-gas equation connects density with pressure, temperature and molar mass. That connection also lets an experiment estimate the molar mass of an unknown gas from its measured mass, volume, pressure and temperature.

Core explanation

Density is ρ = m/V, where m is sample mass. Amount of gas is n = m/M, where M is molar mass. Substitute n = m/M into PV = nRT: PV = (m/M)RT. Divide by V and rearrange to obtain P = (m/V)(RT/M) = ρRT/M, so ρ = PM/(RT). The inverse expression is M = ρRT/P. These equations apply under the same ideal-gas assumptions as PV = nRT.

At fixed P and T, density is proportional to molar mass. If two gases behave ideally and have equal pressure and temperature, the gas with twice the molar mass has twice the mass per litre. This does not mean each molecule occupies twice as much physical space; ideal gases at matching P and T have the same number density, and heavier particles make each unit volume more massive. Gas identity enters density through M even though total ideal P-V-n-T behavior is independent of identity.

For one gas at fixed T, increasing pressure increases density proportionally in the ideal model. Compression places the same mass in less volume. At fixed P, raising Kelvin temperature lowers density because the gas expands under a movable boundary. A quoted density therefore needs state conditions. Comparing an air density measured on a cold day with one measured on a warm day without accounting for pressure and temperature can mislead.

Unit compatibility is essential. If P is in kPa, V in L and R = 8.314 kPa·L mol⁻¹ K⁻¹, use ρ in g/L and M in g/mol. The units of PM/(RT) become (kPa)(g/mol)/[(kPa·L/mol/K)(K)] = g/L. If using SI pressure in Pa and R in Pa·m³ mol⁻¹ K⁻¹, a density in kg/m³ pairs naturally with M in kg/mol. Mixing g/L with kg/mol without conversion gives a factor-of-1000 error.

An unknown gas's molar mass can be estimated by measuring mass of a known gas volume at known absolute pressure and kelvin temperature. The sample must be reasonably pure, dry or corrected for water vapour, and accurately weighed. If gas is collected over water, total pressure includes water-vapour pressure, so use the dry gas's partial pressure in the ideal-gas calculation. If a sample is a mixture, the derived M is an average molar mass, not necessarily the molar mass of one compound.

The relation can compare gases without using R if P and T match. Since ρ₁/ρ₂ = M₁/M₂ under equal P and T, a gas with density 1.5 times another's has molar mass 1.5 times as large in the ideal limit. If their conditions differ, include pressure and temperature factors rather than using this shortcut.

Real gases can deviate from ρ = PM/RT. A compressibility factor Z modifies the relation to ρ = PM/(ZRT). At low or moderate pressures where Z is near one, the ideal estimate may be good. At high pressure or near condensation, interactions and finite molecular size matter, and the simple molar-mass inference may be biased.

Step-by-step reasoning

1. Identify whether the gas is pure or a mixture and record P, T, mass and volume. 2. Convert P to absolute pressure, T to kelvin and density to units matching R and M. 3. Use ρ = m/V and either M = ρRT/P or ρ = PM/RT. 4. Check the final units and whether a dry-gas pressure correction is needed. 5. Compare the answer with plausible molar masses and assess ideal behavior.

Visual explanation

Draw two equal-volume boxes at the same P and T, each with the same number of particle dots. Make one dot type visibly heavier by a mass label, not by a larger drawn size. The heavier-gas box has greater total mass and density. Under the drawing show PV = (m/M)RT leading to ρ = PM/RT.

Real-world analogy

Two boxes can contain the same number of objects yet have different total masses if one set of objects is heavier. At matching gas P and T, equal volumes contain equal ideal particle counts, so molar mass controls their mass density. Molecules are not static objects in a box, but the counting idea is useful.

Real-world example

A laboratory can weigh an evacuated flask, fill it with a dry gas at measured P and T, then weigh it again to find gas mass. Knowing flask volume gives density. The ideal equation then estimates molar mass, which can help identify a candidate gas when other chemical evidence is available.

Why?

Why is density proportional to pressure for one ideal gas at fixed T? Higher pressure at fixed temperature means more gas particles per unit volume according to n/V = P/RT. Each particle has the same average molar mass for that gas, so mass per volume rises with particle number density.

Common misconception

“A gas has one density regardless of conditions.” Gas density changes with P and T. A tabulated value must include conditions, and a molar-mass calculation from density needs those same conditions.

Worked example

A dry gas has density 1.25 g/L at 100 kPa absolute and 300 K. Estimate molar mass using R = 8.314 kPa·L mol⁻¹ K⁻¹. M = ρRT/P = (1.25×8.314×300)/100 ≈ 31.2 g/mol. Units cancel to g/mol. A value near 32 g/mol might be consistent with oxygen, but density alone does not establish chemical identity; other gases or mixtures can have similar average molar mass.

Quick check

1. At the same P and T, how do ideal densities compare for gases with molar masses 20 and 40 g/mol? Answer: The 40-g/mol gas has twice the density of the 20-g/mol gas.

Exam focus

Derive or recall ρ = PM/RT and write conditions with any density. Use compatible g/L–g/mol or kg/m³–kg/mol units. Correct for water vapour or mixture composition when a problem supplies that information.

Advanced insight

For a gas mixture, the effective molar mass in ρ = PM̄/(RT) is mole-fraction-weighted: M̄ = ΣxᵢMᵢ under ideal behavior. This connects density measurements with mixture composition, but one density measurement usually cannot determine every unknown component fraction without further data.

Summary

Combining density ρ = m/V, amount n = m/M and PV = nRT gives ρ = PM/RT. Gas density depends on state and molar mass, and measured density can estimate molar mass under appropriate purity, pressure and ideality assumptions.

Practice questions

1. A gas has M = 28 g/mol at 100 kPa and 300 K. Estimate ideal density. Answer: ρ = 100×28/(8.314×300) ≈ 1.12 g/L. 2. What happens to one ideal gas's density if absolute pressure doubles at fixed T? Answer: Density doubles according to ρ = PM/RT. 3. Why can a gas collected over water need a pressure correction before finding M? Answer: Measured total pressure includes water vapour; the dry gas's partial pressure belongs in the gas equation for that gas.