Molar Mass of a Gas Calculator
The molar mass of a gas from its mass, volume, pressure and temperature — the ideal gas law rearranged.
From PV = nRT and n = m/M, the molar mass is M = mRT/(PV).
How the molar mass of a gas calculator works
From PV = nRT and n = m/M, the molar mass is M = mRT/(PV). Weighing a known volume of gas at a known temperature and pressure is one of the oldest ways to identify it.
The method assumes ideal behaviour, which is good to about 1% for common gases at ambient conditions and degrades near the boiling point or at high pressure.
Formula: M = mRT / (PV)
Worked examples
| Inputs | Molar mass | Note |
|---|---|---|
| 1.25 g in 1 L at STP | 28.0175 g/mol | 28.0 g/mol — nitrogen |
| 1.96 g in 1 L at STP | 43.9314 g/mol | 43.9 — carbon dioxide |
| Hydrogen | 2.0173 g/mol | 2.02 g/mol |
FAQFrequently asked questions
How do I find a gas's molar mass?
Weigh a known volume at a known pressure and temperature, then apply M = mRT/PV.
What is the molar volume at STP?
22.41 L/mol at 0 °C and 101.325 kPa; 24.79 L/mol at 25 °C.
How accurate is this?
Within about 1% for common gases near ambient conditions. It degrades near the boiling point and at high pressure, where real gases stop behaving ideally.
Why do nitrogen and carbon monoxide give the same answer?
Because both are 28.01 g/mol. Molar mass alone cannot distinguish them — you would need a spectroscopic method.
What is relative density?
The gas density divided by air's. Above 1 the gas settles in low spaces, which is a serious safety consideration for propane and carbon dioxide.
Where these figures come from
- IUPAC — Standard atomic weights (2021 conventional values) — the molar-mass table
- NIST — CODATA 2018 fundamental physical constants — Avogadro constant, gas constant, speed of light
- NIST Chemistry WebBook — thermochemical data
- Royal Society of Chemistry — the UK chemistry professional body
Last checked: September 2026. Atomic masses are the IUPAC conventional values; constants are CODATA 2018; equations are the standard textbook forms.