Molar Mass of Gas Calculator
How it Works
01Pressure & Temperature
Pick from 10 pressure units & 4 temp scales
02Volume & Mass
Volume of gas + mass of the same sample
03Apply PV = nRT
Rearranged: M = mRT / PV (R = 8.314 J/mol·K)
04Identify the Gas
Closest match against 14 common gases
What is the Molar Mass of Gas Calculator?
Why is this useful? In the lab, you can measure pressure with a manometer, temperature with a thermometer, volume with a graduated cylinder or burette, and mass with a balance. From these four routine measurements you can identify an unknown gas — its molar mass uniquely fingerprints small molecules. A reading of ~28 g/mol points to N₂, CO, or an isobaric mix; ~32 g/mol points to O₂; ~44 g/mol points to CO₂. The calculator highlights the closest match against 14 common gases.
Built for chemistry students, lab researchers, instructors writing problem sets, and analytical chemists doing gas characterization. Free, fast, mobile-friendly, fully client-side.
Pro Tip: The tool also reports gas density (kg/m³) — useful for cross-checking your identification or for buoyancy / compressibility calculations.
How to Use the Molar Mass of Gas Calculator?
How is gas molar mass calculated?
The ideal gas law: PV = nRT. Substituting n = m/M (moles = mass ÷ molar mass) gives PV = (m/M)RT, which rearranges to M = mRT / PV. Provide P, T, V, m, and you compute M.
R is the universal gas constant. In SI units: R = 8.314462618 J/(mol·K). Other common units: 0.08206 L·atm/(mol·K), 62.36 L·Torr/(mol·K). The calculator uses SI throughout.
Calculation Math — Step by Step:
Convert all inputs to SI units:
- Pressure → pascals (Pa)
- Temperature → kelvins (K)
- Volume → cubic meters (m³)
- Mass → grams (g)
Mixing units (atm and L) requires the right R value. SI normalization avoids that.
With SI units:
- m in grams
- R = 8.314 J/(mol·K)
- T in kelvins
- P × V in joules (Pa × m³ = J)
Result M is in g/mol. Units cancel: g·J / J = g/mol.
From mass and molar mass:
- n = m / M
- n is in moles
- Useful for stoichiometry
Or directly: n = PV / (RT) — same answer, doesn't need M.
Mass per unit volume:
- ρ = m / V
- Convert m to kg, V to m³
- Result in kg/m³
Air at STP ≈ 1.225 kg/m³. CO₂ ≈ 1.84. H₂ ≈ 0.0899.
Common Gas Molar Masses (Reference):
- Hydrogen (H₂): 2.016 g/mol
- Helium (He): 4.003 g/mol
- Methane (CH₄): 16.04 g/mol
- Ammonia (NH₃): 17.03 g/mol
- Water vapor (H₂O): 18.02 g/mol
- Neon (Ne): 20.18 g/mol
- Nitrogen (N₂): 28.01 g/mol
- Carbon monoxide (CO): 28.01 g/mol
- Air (avg): 28.97 g/mol
- Oxygen (O₂): 32.00 g/mol
- Argon (Ar): 39.95 g/mol
- Carbon dioxide (CO₂): 44.01 g/mol
- Sulfur dioxide (SO₂): 64.07 g/mol
- Chlorine (Cl₂): 70.90 g/mol
Standard Conditions:
100 kPa, 0°C
1 mole of ideal gas = 22.71 L at IUPAC STP. The modern definition.
1 atm (101.325 kPa), 0°C
1 mole of ideal gas = 22.414 L. Still common in many textbooks.
~101 kPa, 20–25°C
Real lab measurements happen at room temperature, not 0°C. Always use your actual measured T and P, not assumed STP.
When the Ideal Gas Law Breaks Down:
Molecular volume becomes non-negligible. Real gases compress less than ideal gases at high P. Use Z (compressibility factor): PV = ZnRT.
Near the gas's boiling point, intermolecular attractions matter. Real gases liquefy; ideal gases never do. Use van der Waals: (P + a/V²)(V − b) = RT.
Real Lab Scenarios
Sample calculations using the ideal gas law:
| Scenario | P | T | V | m | M (g/mol) |
|---|---|---|---|---|---|
| O₂ at STP | 101.325 kPa | 0°C | 22.414 L | 32.00 g | 32.00 (O₂ ✓) |
| CO₂ at room T | 101 kPa | 25°C | 1 L | 1.798 g | 44.0 (CO₂ ✓) |
| Air at STP | 1 atm | 0°C | 22.414 L | 28.97 g | 28.97 (Air ✓) |
| Helium balloon | 100 kPa | 20°C | 10 L | 1.643 g | 4.00 (He ✓) |
| Unknown low-MW gas | 98 kPa | 25°C | 500 ml | 0.81 g | ~40.6 (Ar?) |
| High-pressure tank | 10 bar | 25°C | 5 L | 14 g | ~6.93 (H₂ + non-ideal?) |
The first 4 rows give clean matches against textbook gases. The last two need additional context — either an unfamiliar gas, an isotope, or non-ideal behavior at high pressure.
Who Should Use the Molar Mass of Gas Calculator?
Technical Reference
Key Takeaways
Frequently Asked Questions
What is the ideal gas law?
How do I calculate molar mass of a gas?
- Measure pressure (P), temperature (T), volume (V), and mass (m) of the gas sample
- Convert to SI units: P in Pa, V in m³, T in K, m in g
- Plug into M = m·R·T / (P·V) with R = 8.314 J/(mol·K)
- Result is M in g/mol
This calculator handles all unit conversions automatically.
Why must temperature be in kelvins?
What is R, the gas constant?
How accurate is the ideal gas law?
- Pressure is very high (molecular volume becomes significant)
- Temperature is near liquefaction (intermolecular attractions matter)
- Gas has strong dipole interactions (water vapor, ammonia at low T)
What if my answer doesn't match a known gas?
- Mixture: the sample is a mixture of multiple gases (calculator gives weighted-average molar mass)
- Measurement error: P, T, V, or m measured imprecisely
- Non-ideal conditions: high P or low T — use real gas corrections
- Unusual gas: outside the 14-common-gas reference (e.g., noble gas mixture, specialty industrial gas)
Can I use it to find moles instead?
How is gas density related?
What is STP?
Is air's molar mass really 28.97?
Can I use this for liquid solutions or solid compounds?
Does this work for water vapor?
Is my data private?
Disclaimer
The ideal gas law assumes negligible particle interactions and zero molecular volume — accurate for most gases at standard conditions but breaks down at high pressure or temperatures near liquefaction. For real-gas conditions, apply a compressibility factor (Z) or use the van der Waals equation.