# Molar Mass of Gas Calculator

URL: https://speedycalculator.com/calculators/chemistry/molar-mass-of-gas/
Last updated: 2026-10-30

> Find the molar mass of an unknown gas with the ideal gas law – from a weighed sample (mass, volume, pressure, temperature), from the gas density at a known pressure and temperature, or from mass and moles – and see which common gas it most likely is.

## Inputs

- Known data
- Mass of gas (g, mg, µg, kg, oz, lb)
- Volume (L, mL, µL, m³, dm³, cm³, US gal, fl oz (US))
- Gas density (g/L, kg/m³, mg/mL, g/mL, mg/L, lb/ft³)
- Pressure (atm, kPa, Pa, bar, mmHg (Torr), psi)
- Temperature (K, °C, °F) — Absolute temperature must be above 0 K
- Amount of gas (mol, mmol, µmol, nmol, kmol)

## Results

- Amount of gas n
- Molar mass of the gas
- Density at these conditions
- Density relative to air
- Molar volume at these conditions
- Closest common gas

## Formula

```
n = PV ÷ RT · M = m ÷ n = mRT ÷ (PV) · M = ρRT ÷ P · R = 0.082057 L·atm/(mol·K) = 8.314 J/(mol·K)
```

## Explanation

Weighing a gas is one of the oldest ways to identify it. The ideal gas law PV = nRT tells you how many moles of gas fill a container at a given pressure and temperature, whatever the gas. If you also know the mass of the gas, dividing the mass by the number of moles gives its molar mass – and the molar mass is often enough to tell nitrogen (28.01 g/mol) from oxygen (32.00), argon (39.95) or carbon dioxide (44.01).

Combining the two steps gives M = mRT/(PV). Since m/V is the density ρ, the same relation can be written M = ρRT/P: at 0 °C and 1 atm one mole of an ideal gas occupies 22.414 L, so the molar mass in g/mol is simply the density in g/L multiplied by 22.414. This is how the classic Dumas method determines the molar mass of a volatile liquid – vaporise it, let the vapour fill a flask of known volume, cool, weigh, and calculate.

Pick the data you have, enter them with any units, and the calculator returns the molar mass, the number of moles, the gas density at your conditions, the density relative to air and the closest common gas.

### How to use the Molar Mass of Gas Calculator

- **Known data**
- **Mass of gas**
- **Volume**
- **Gas density**
- **Pressure**
- **Temperature** — Absolute temperature must be above 0 K
- **Amount of gas**

Results update as you type, every field has its own unit menu, and everything is calculated in your browser.

### How it works

Temperatures are converted to kelvin, pressures to atm and volumes to litres, so R = 0.082057 L·atm/(mol·K) can be used directly. The calculator finds n = PV/RT (or uses your moles), then M = m/n; in density mode M = ρRT/P.

### Worked example

A 1.00 L flask at 0 °C (273.15 K) and 1.00 atm contains 1.25 g of an unknown gas. n = PV/RT = (1.00 × 1.00) ÷ (0.082057 × 273.15) = 0.04462 mol, so M = 1.25 ÷ 0.04462 = **28.02 g/mol** – consistent with nitrogen, N₂ (28.01 g/mol).

Density route: a gas has a density of 1.784 g/L at 0 °C and 1 atm. M = 1.784 × 0.082057 × 273.15 ÷ 1 = **39.99 g/mol** – argon.

### Molar masses of common gases

GasMolar mass (g/mol)Density at 0 °C, 1 atm (g/L, ideal)Hydrogen H₂2.020.090Helium He4.000.179Methane CH₄16.040.716Ammonia NH₃17.030.760Neon Ne20.180.900Nitrogen N₂ / carbon monoxide CO28.011.250Dry air (average)28.971.292Oxygen O₂32.001.428Hydrogen sulfide H₂S34.081.520Argon Ar39.951.782Carbon dioxide CO₂ / propane C₃H₈ / nitrous oxide N₂O44.011.964Butane C₄H₁₀58.122.593Sulfur dioxide SO₂64.072.858Chlorine Cl₂70.903.163Sulfur hexafluoride SF₆146.066.516

### Tips

- Always start from a balanced equation – coefficients give the mole ratio.
- Convert everything to moles first, then use the ratio, then convert back.
- Every field has its own unit menu – g, mg, mol, mmol, L and mL all work.
- Everything is calculated in your browser.

### Common mistakes to avoid

- Using mass ratios instead of mole ratios.
- Forgetting water of crystallisation in the molar mass of hydrates.
- Confusing molarity (per litre of solution) with molality (per kilogram of solvent).

### Inputs explained

FieldWhat to enterKnown dataChoose one: Mass, volume, pressure and temperature, Density, pressure and temperature, Mass and amount in molesMass of gasUnits: g, mg, µg, kg, oz, lbVolumeUnits: L, mL, µL, m³, dm³, cm³ …Gas densityUnits: g/L, kg/m³, mg/mL, g/mL, mg/L, lb/ft³PressureUnits: atm, kPa, Pa, bar, mmHg (Torr), psiTemperatureUnits: K, °C, °F. Absolute temperature must be above 0 KAmount of gasUnits: mol, mmol, µmol, nmol, kmol

### What each result means

- **Density relative to air** = [Molar mass of the gas]÷28.97
- **Molar volume at these conditions** = 0.0820573661×[Temperature]÷[Pressure]

## Worked example

Inputs — Known data: Mass, volume, pressure and temperature; Mass of gas: 1.25 g; Volume: 1 L; Pressure: 1 atm; Temperature: 273.15 K.

Results — Amount of gas n = 0.044615 mol; **Molar mass of the gas = 28.0175 g/mol**; Density at these conditions = 1.25 g/L; Density relative to air = 0.9671; Molar volume at these conditions = 22.414 L/mol; Closest common gas = Nitrogen N₂ / carbon monoxide CO (28.01 g/mol).

## Key terms

- **Ideal gas law**: PV = nRT, linking pressure, volume, amount and absolute temperature of a gas.
- **Molar volume**: Volume occupied by one mole of gas: 22.414 L at 0 °C and 1 atm, 24.465 L at 25 °C and 1 atm.
- **Gas constant (R)**: 8.314462618 J/(mol·K) = 0.082057 L·atm/(mol·K).
- **STP**: Standard temperature and pressure; here 0 °C (273.15 K) and 1 atm.

## FAQ

**How do you find the molar mass of a gas?**
Use M = mRT/(PV): weigh the gas, measure its volume, pressure and temperature, and divide. 1.25 g filling 1.00 L at 0 °C and 1 atm gives M = 28.0 g/mol – nitrogen.

**How do you get molar mass from density?**
M = ρRT/P. At STP (0 °C, 1 atm) this is M = ρ × 22.414 L/mol, so a gas with density 1.784 g/L has M = 39.99 g/mol – argon.

**What value of R should I use?**
0.082057 L·atm/(mol·K) with litres and atmospheres, or 8.314 J/(mol·K) = 8.314 Pa·m³/(mol·K) with SI units. The calculator converts all units for you.

**What is the molar mass of air?**
Dry air averages about 28.97 g/mol (78% N₂, 21% O₂, 1% Ar plus CO₂).

**Why must temperature be in kelvin?**
The ideal gas law needs absolute temperature. 25 °C is 298.15 K; using 25 instead would make the result about 12 times too small.

**How accurate is the ideal gas assumption?**
Within about 1% for most gases near room temperature and atmospheric pressure. Easily condensed gases (water vapour, butane) and high pressures cause larger errors.

**What is the Dumas method?**
A way to find the molar mass of a volatile liquid: it is vaporised in a flask of known volume at a known temperature and pressure, the flask is cooled and the condensed vapour weighed, then M = mRT/(PV).

**What formula does the Molar Mass of Gas Calculator use?**
n = PV ÷ RT · M = m ÷ n = mRT ÷ (PV) · M = ρRT ÷ P · R = 0.082057 L·atm/(mol·K) = 8.314 J/(mol·K).


## Sources

- [NIST – Fundamental physical constants (CODATA)](https://physics.nist.gov/cuu/Constants/)
- [OpenStax – Chemistry 2e](https://openstax.org/details/books/chemistry-2e)
- [LibreTexts Chemistry](https://chem.libretexts.org/)
