Gas Density: d = PM/RT and Molar Mass from Density
“Find the density of oxygen at 25°C” or “a gas has density 1.78 g/L at STP, find its molar mass” are favourite short questions in Class 11 and Class 12. Both come from one equation, which is the ideal gas law rearranged. Once you see where it comes from, you do not need to remember it as a separate formula. You also stop making the classic mistake of using the liquid density idea for a gas.
The formula
M = dRT/P
d is the density of the gas in g/L. P is the pressure and T is the absolute temperature in kelvin (°C + 273.15). M is the molar mass in g/mol. R must match the pressure unit: R = 0.082057 L·atm/(mol·K) when P is in atm, and R = 8.314 J/(mol·K) when P is in pascal and you want M in kg/mol.
Where it comes from
Start with PV = nRT. The number of moles is n = m/M, where m is the mass of the gas. So PV = (m/M)RT. Move V to the right side and M to the left: PM = (m/V)RT. Since m/V is the density, PM = dRT. That is all. Notice what the equation tells you: at the same T and P, the density of a gas is directly proportional to its molar mass. This is why CO2 sinks below air and hydrogen rises, and why Avogadro’s idea (equal volumes, equal numbers of molecules) leads straight to the molar mass.
Worked example 1: oxygen at 273.15 K and 1 atm
Question. Find the density of O2 at 0°C and 1.000 atm.
Step 1. M = 2 × 15.999 = 31.998 g/mol. T = 273.15 K.
Step 2. d = PM/(RT) = (1.000 × 31.998)/(0.082057 × 273.15) = 31.998/22.414 = 1.428 g/L.
Check by another route. One mole of an ideal gas occupies 22.414 L at 273.15 K and 1 atm (see the note below on 22.4 vs 22.7). Density = mass of 1 mol ÷ volume = 31.998 ÷ 22.414 = 1.428 g/L. Same answer.
Worked example 2: CO2 compared with O2 at room temperature
Question. Find the density of CO2 and of O2 at 25°C and 1.00 atm. How many times denser is CO2?
Step 1. T = 25 + 273.15 = 298.15 K, so RT = 0.082057 × 298.15 = 24.466 L·atm/mol.
Step 2. M(CO2) = 12.011 + 2(15.999) = 44.009 g/mol. d = 44.009 ÷ 24.466 = 1.799 g/L.
Step 3. M(O2) = 31.998 g/mol. d = 31.998 ÷ 24.466 = 1.308 g/L.
Step 4. Ratio = 1.799 ÷ 1.308 = 1.375. This is exactly 44.009 ÷ 31.998, the ratio of molar masses, as the equation predicts. At the same T and P you do not even need R.
Worked example 3: molar mass from a measured density
Question. A gas has density 1.78 g/L at 0°C and 1.00 atm. Find its molar mass.
Step 1. M = dRT/P = 1.78 × 0.082057 × 273.15 ÷ 1.00.
Step 2. RT = 22.414, so M = 1.78 × 22.414 = 39.9 g/mol.
Answer. About 39.9 g/mol. This matches the molar mass of argon, a monatomic gas. The match is a good sign that the working is right, but the data alone cannot prove the gas is argon, because other gases could have a similar molar mass.
Worked example 4: molar mass of a vapour above 100°C
Question. A volatile liquid sample of mass 0.560 g is completely vaporised. The vapour occupies 250 mL at 100°C and 1.00 atm. Find the molar mass.
Step 1. V = 0.250 L, T = 100 + 273.15 = 373.15 K, so density d = 0.560 ÷ 0.250 = 2.24 g/L.
Step 2. M = dRT/P = 2.24 × 0.082057 × 373.15 ÷ 1.00 = 68.6 g/mol.
Check using PV = nRT. n = PV/RT = (1.00 × 0.250)/(0.082057 × 373.15) = 0.008165 mol. M = 0.560 ÷ 0.008165 = 68.6 g/mol. Same.
This is the idea of the Victor Meyer experiment taught in some syllabuses. If your book gives pressure in mmHg, divide by 760 first to get atm.
Using SI units
If P is in pascal, keep M in kg/mol and R = 8.314 J/(mol·K). The density then comes out in kg/m3, which numerically equals g/L. As a check, CO2 at 101325 Pa and 298.15 K: d = (101325 × 0.044009)/(8.314 × 298.15) = 1.799 kg/m3, which is 1.799 g/L. If you mix kPa with R = 8.314, the numbers still work because kPa × g/mol gives g/L directly: 101.325 × 44.009 ÷ (8.314 × 298.15) = 1.799.
A note on 22.4 vs 22.7 L/mol. Many Indian textbooks use STP as 0°C and 1 atm, where the molar volume is 22.4 L (more exactly 22.414 L). The IUPAC standard since 1982 uses 1 bar (100 kPa), which gives 22.711 L at 0°C. Always use the value your syllabus or question states. Using d = PM/RT with the actual P and T avoids the question entirely.
Common mistakes
- Using °C in the formula. T must be in kelvin. 25°C is 298.15 K, not 25.
- Mixing units of R and P. R = 0.082057 goes with atm and litres. With mmHg or kPa, convert first or change R.
- Using atomic mass for a molecular gas. Oxygen gas is O2, so M = 32, not 16. The same applies to H2, N2 and Cl2.
- Quoting the density at STP for room conditions. Gas density changes with both T and P. A gas is about 8% less dense at 25°C than at 0°C at the same pressure.
- Confusing density with vapour density. Vapour density is a ratio (gas compared with hydrogen), so it has no unit. Molar mass = 2 × vapour density.
Exam relevance
| Question type | Use |
|---|---|
| Density at given T and P | d = PM/(RT) |
| Molar mass from density | M = dRT/P |
| Which gas is denser | Compare molar masses at the same T and P |
| Mass and volume of vapour given | d = m/V, then M = dRT/P |
| Density at STP | M ÷ 22.4 (or the molar volume in your book) |
Check the limits of your syllabus in the current official notification of your board or exam. The method above is the same everywhere.
Test your own gas-density numbers with the Ideal Gas Law tool.
Open the Ideal Gas Law Calculator →Previous-year CSIR-NET questions and timed quizzes to check what you just read.
More Concepts articles