Use measured gas mass, pressure, volume, and temperature to find molar mass and moles with automatic unit conversions.
How to use our Molar Mass of Gas Calculator
- Enter Gas mass (g) for the gas only, then choose the matching Pressure unit, Volume unit, and Temperature unit.
- Type the measured values for Pressure, Gas volume, and Temperature, and make sure pressure is absolute pressure, not gauge pressure.
- Pick a Result unit if your class wants the answer in g/mol or kg/mol, then click Calculate.
- Read Molar mass first, then check Amount of gas and Formula used to make sure the setup matches your homework.
- Do a quick sanity check: if the value looks extremely large or tiny, recheck unit choices and confirm the temperature was entered in the right scale so it converts to Kelvin correctly.

Definitions
Gas mass: The mass of the gas sample only, measured in grams.
Pressure: How hard the gas pushes on its container walls. For gas laws, use absolute pressure, not gauge pressure.
Gas volume: The space taken up by the gas sample.
Temperature: How hot or cold the gas is. The ideal gas law uses absolute temperature in Kelvin, so Celsius or Fahrenheit must be converted first [4].
Amount of gas: The number of moles, written as n, found from pressure, volume, and temperature.
Molar mass: The mass of 1 mole of a substance, usually shown in g/mol.
Ideal gas law: The relationship among pressure, volume, amount, and temperature, written as P*V = n*R*T [1].
Common mistakes and quick fixes
Mistake: Entering the mass of the flask plus gas in Gas mass instead of the gas sample alone.
Fix: Use only the gas sample's mass in Gas mass (g) .
Mistake: Choosing Pressure unit as atm but typing a kPa value into Pressure .
Fix: Make the Pressure unit match the number you measured before calculating.
Mistake: Typing 250 for Gas volume but leaving Volume unit on L when the measurement was 250 mL.
Fix: Change Volume unit to mL or convert the number first.
Mistake: Entering a Celsius or Fahrenheit value while Temperature unit is set to K.
Fix: Pick the real temperature scale you used so the calculator converts correctly and gives the right Amount of gas .
Mistake: Using gauge pressure or typing 0 for Pressure .
Fix: Enter absolute pressure in Pressure ; if your reading was gauge pressure, convert it before using the calculator.
Mistake: Comparing the answer to a reference table in g/mol after setting Result unit to kg/mol.
Fix: Check the selected Result unit before interpreting Molar mass .
Limitations & Key Assumptions / Boundary Conditions
- This calculator uses the ideal gas law, so it works best when the gas behaves close to an ideal gas.
- Inputs must describe the same gas sample at the same moment. Mixing values from different trials gives the wrong molar mass.
- Pressure must be absolute pressure. Gauge pressure must be converted before use.
- Temperature must be above 0 K after conversion. Values at or below 0 K are physically invalid and are rejected.
- Very large or very small results often mean a unit mismatch, such as mL entered as L or Celsius entered while K is selected.
- The result can still be off if the measured mass includes moisture, leaked gas, or container mass.
- Real lab results may differ slightly because of measurement error, gas impurities, or non-ideal gas behavior.
Methodology
Core idea
The calculator first finds the number of moles from the ideal gas law, then divides the gas mass by that mole amount to get molar mass [1].
P*V = n*R*T
n = (P*V)/(R*T)
M = m/n
M = (m*R*T)/(P*V)
How units are handled
The calculator converts pressure to pascals, volume to cubic meters, and temperature to Kelvin before using the SI form of the gas constant.
R = 8.314462618 Pa*m^3/(mol*K)
1 atm = 101325 Pa
1 bar = 100000 Pa
1 mmHg = 133.322387415 Pa
1 kPa = 1000 Pa
1 L = 0.001 m^3
1 mL = 0.000001 m^3
K = C + 273.15
K = (F - 32)*5/9 + 273.15
Worked mini-example
Suppose you enter Gas mass = 2.50 g, Pressure unit = atm, Pressure = 1.00, Volume unit = L, Gas volume = 1.00, Temperature unit = C, and Temperature = 25.
First convert the measurements: pressure becomes 101325 Pa, volume becomes 0.001 m^3, and temperature becomes 298.15 K.
Then find moles:
n = (101325 * 0.001)/(8.314462618 * 298.15) = 0.04087 mol
Now divide the sample mass by the mole amount:
M = 2.50/0.04087 = 61.16 g/mol
So the main answer is a molar mass of about 61.16 g/mol, and the supporting amount of gas is about 0.04087 mol.
Checks used by the calculator
The calculator requires Gas mass, Pressure, and Gas volume to be greater than 0. It also converts temperature to Kelvin and rejects any value at or below 0 K because absolute temperature must be positive [4].
If the computed result is extremely large or extremely small, the warning note tells you to recheck your unit choices and temperature scale. This does not always mean the math is wrong, but it often points to a setup mistake.
Assumptions used
The method assumes one gas sample, matched units after conversion, and ideal-gas behavior. Real lab data can differ because of measurement error, wet gas, leaks, impurities, or non-ideal behavior.
Sources
- 9.2 Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law - Chemistry 2e - Openstax
- Pressure and Ideal Gas Laws (M5Q1) - UW-Madison Chemistry 103/104 Resource Book - Unizin
- Ideal gas law | Definition, Formula, & Facts | Britannica - Encyclopedia Britannica
- Kelvin temperature scale | measurement | Britannica - Encyclopedia Britannica