Molar Mass of Gas Calculator

Calculate the molar mass of an unknown gas using the ideal gas law (PV = nRT). Enter the mass, pressure, volume, and temperature of a gas sample to determine its molar mass, or solve for any other variable.

Quick Presets (STP conditions: 0°C, 1 atm)

Gas constant R = 0.08206 L·atm/(mol·K) (auto-selected based on pressure units)

Result

P Pressure V Volume T Temp Ideal Gas Law PV = nRT M = mRT / PV M = molar mass (g/mol) m = mass (g) P = pressure (atm) V = volume (L) T = temperature (K) R = gas constant

1. What Is the Molar Mass of a Gas?

The molar mass of a gas is the mass of one mole of that gas, expressed in grams per mole (g/mol). It is a fundamental property that helps chemists identify unknown gases, predict gas behavior, and perform stoichiometric calculations. Every element has a unique atomic mass, and the molar mass of a gas molecule is simply the sum of the atomic masses of all atoms in its molecular formula.

For example, carbon dioxide (CO₂) has a molar mass of about 44.01 g/mol, calculated as 12.01 (for carbon) + 2 × 16.00 (for two oxygen atoms). When you have a sample of an unknown gas and want to determine what it is, calculating its molar mass from measurable properties like pressure, volume, temperature, and mass is one of the most practical methods available.

2. The Ideal Gas Law (PV = nRT) Explained

The ideal gas law is one of the most important equations in chemistry and physics. It relates the four measurable properties of a gas sample in a single expression:

PV = nRT

Where:

This equation assumes that gas molecules have negligible volume, that there are no intermolecular forces between them, and that collisions between molecules are perfectly elastic. While no real gas behaves perfectly ideally, the ideal gas law provides an excellent approximation under most common laboratory conditions — especially at moderate temperatures and low pressures.

The ideal gas law is actually a combination of several earlier gas laws: Boyle's law (P ∝ 1/V at constant T), Charles's law (V ∝ T at constant P), and Avogadro's law (V ∝ n at constant T and P).

3. Deriving Molar Mass from the Ideal Gas Law: M = mRT / PV

To find the molar mass of a gas, we combine two fundamental relationships. First, from the ideal gas law, the number of moles can be expressed as:

n = PV / RT

Second, molar mass (M) is defined as mass (m) divided by the number of moles (n):

M = m / n

Substituting the expression for n from the ideal gas law into the molar mass definition, we get:

M = mRT / PV

This combined formula allows us to calculate the molar mass of any gas directly from four easily measurable quantities: the mass of the gas sample, the gas constant, the absolute temperature, and the product of pressure and volume. This is the core equation used by this calculator.

The same equation can be rearranged to solve for any of the five variables (M, m, P, V, or T) when the other four are known:

4. Step-by-Step Calculation Examples

Example 1: Finding the molar mass of an unknown gas

Problem: A 0.500 g sample of an unknown gas occupies 0.260 L at 100°C and 750 mmHg. Find the molar mass.

Step 1: Convert all units to standard form.
• T = 100°C + 273.15 = 373.15 K
• P = 750 mmHg × (1 atm / 760 mmHg) = 0.9868 atm
• V = 0.260 L, m = 0.500 g

Step 2: Apply the formula M = mRT / PV.
M = (0.500 × 0.08206 × 373.15) / (0.9868 × 0.260)
M = 15.308 / 0.2566
M ≈ 59.66 g/mol

Conclusion: The gas has a molar mass close to 60 g/mol. This could suggest it is propanol (C₃H₇OH, M = 60.10 g/mol) or a similar compound.

Example 2: CO₂ at STP verification

Problem: Verify that 2 g of gas at 1 atm, 1 L, and 273.15 K gives a molar mass close to CO₂.

Step 1: n = PV / RT = (1 × 1) / (0.08206 × 273.15) = 1 / 22.414 = 0.04461 mol
Step 2: M = m / n = 2 / 0.04461 = 44.83 g/mol

Conclusion: The result (~44.8 g/mol) is very close to the molar mass of CO₂ (44.01 g/mol), confirming the calculation method works.

5. Molar Mass vs. Molecular Weight

The terms "molar mass" and "molecular weight" are often used interchangeably in chemistry, but they have subtle differences:

Numerically, molar mass in g/mol and relative molecular mass are equal. For instance, water has a relative molecular mass of 18.015 and a molar mass of 18.015 g/mol. In practice, scientists use both terms to mean the same thing: the mass associated with one mole of a substance.

For gases, the molar mass is especially important because it directly determines the gas density at a given temperature and pressure. The relationship is: density = PM / RT, where higher molar mass gases are denser than lighter ones under the same conditions.

6. Standard Temperature and Pressure (STP) and Molar Volume

Standard Temperature and Pressure (STP) is a set of reference conditions used widely in chemistry:

At STP, one mole of any ideal gas occupies exactly 22.414 liters. This is known as the molar volume of an ideal gas. This means that regardless of the identity of the gas — whether it is helium, oxygen, nitrogen, or carbon dioxide — one mole will always take up the same volume at STP.

This relationship provides a quick shortcut: if you know the volume of a gas at STP, you can immediately determine the number of moles by dividing by 22.414 L/mol. Then, dividing the mass of the sample by the number of moles gives you the molar mass.

Note that IUPAC redefined STP in 1982 to use 1 bar (100 kPa) instead of 1 atm, which gives a molar volume of 22.711 L. However, many textbooks and this calculator use the traditional definition of 1 atm for STP.

7. Table of Molar Masses of Common Gases

Gas Chemical Formula Molar Mass (g/mol) Density at STP (g/L)
HydrogenH₂2.0160.0899
HeliumHe4.0030.1786
MethaneCH₄16.040.7157
AmmoniaNH₃17.030.7597
NeonNe20.180.9002
NitrogenN₂28.011.2506
Carbon MonoxideCO28.011.2504
OxygenO₂32.001.4290
Hydrogen SulfideH₂S34.081.5209
ArgonAr39.951.7837
Carbon DioxideCO₂44.011.9640
PropaneC₃H₈44.101.9680
Sulfur DioxideSO₂64.072.8590
ChlorineCl₂70.913.1640
XenonXe131.295.8610

8. Real Gases vs. Ideal Gases (Limitations)

The ideal gas law assumes that gas molecules are point particles with no volume and no attractive or repulsive forces between them. In reality, all gases deviate from ideal behavior to some degree. The main limitations include:

To account for these deviations, the van der Waals equation is often used:

(P + an²/V²)(V - nb) = nRT

Where a and b are experimentally determined constants unique to each gas. The constant a accounts for intermolecular attractions, and b accounts for the finite volume of the molecules.

For most laboratory conditions (around room temperature and pressures near 1 atm), the ideal gas law provides results that are accurate to within a few percent, making it entirely suitable for molar mass calculations.

9. Applications: Identifying Unknown Gases and Gas Density Calculations

Identifying Unknown Gases

One of the most important applications of the molar mass calculation is identifying unknown gases. In a typical laboratory experiment, a student collects a gas sample, measures its mass, volume, temperature, and pressure, and then calculates the molar mass. By comparing the result with known molar masses of common gases, the unknown gas can be identified.

For example, if a calculation yields a molar mass of approximately 28 g/mol, the gas is likely nitrogen (N₂) or carbon monoxide (CO), both of which have molar masses very close to 28 g/mol. Additional chemical tests can then distinguish between the two.

Gas Density Calculations

The molar mass of a gas is directly related to its density. Since density (ρ) equals mass divided by volume, and we know M = mRT/PV, we can derive:

ρ = PM / RT

This means that at a given temperature and pressure, a gas with a higher molar mass will be denser. This principle explains why carbon dioxide (M = 44 g/mol) sinks in air (average M ≈ 29 g/mol), while helium (M = 4 g/mol) rises.

Other Applications

10. Frequently Asked Questions (FAQ)

Q: What units should I use for the gas constant R?

The value of R depends on the units of pressure and volume. If pressure is in atm and volume in liters, use R = 0.08206 L·atm/(mol·K). If pressure is in Pa (or kPa) and volume in m³ (or liters), use R = 8.314 J/(mol·K). This calculator automatically selects the appropriate value of R based on your chosen pressure unit and handles all conversions internally.

Q: Why must temperature be in Kelvin?

The ideal gas law requires an absolute temperature scale. Kelvin is the SI absolute temperature scale where 0 K represents absolute zero — the point where all molecular motion ceases. Using Celsius or Fahrenheit would give incorrect results because these scales have arbitrary zero points. For conversion: K = °C + 273.15, and K = (°F - 32) × 5/9 + 273.15.

Q: Can I use this calculator for gas mixtures?

Yes, but the result will give you the average molar mass of the mixture, not the molar mass of individual components. The average molar mass is useful for density calculations and is commonly used for air (average M ≈ 28.97 g/mol). To find individual component molar masses, you would need additional information such as the composition of the mixture.

Q: How accurate is the ideal gas law for real gases?

At standard conditions (around 25°C and 1 atm), the ideal gas law is accurate to within 1–5% for most common gases. Accuracy decreases at high pressures (above ~10 atm), low temperatures (near the boiling point), and for polar or large molecules. For high-precision work, the van der Waals equation or other equations of state should be used.

Q: What is the molar volume of a gas at STP?

At STP (0°C, 1 atm), one mole of any ideal gas occupies 22.414 liters. This is called the standard molar volume. At SATP (25°C, 1 bar), the molar volume is 24.790 liters. The molar volume is independent of the gas identity for an ideal gas, as stated by Avogadro's law.

Q: How do I determine if my gas behaves ideally?

A gas behaves most ideally when it is at high temperature and low pressure relative to its critical point. Monatomic noble gases (He, Ne, Ar) behave most ideally because they have the weakest intermolecular forces. A useful rule of thumb: if the temperature is well above the boiling point and the pressure is below ~5 atm, the ideal gas approximation is typically very good.

Q: What is the difference between molar mass and atomic mass?

Atomic mass refers to the mass of a single atom, usually expressed in atomic mass units (amu). Molar mass is the mass of one mole (6.022 × 10²³ particles) of a substance in grams per mole (g/mol). For elements, the numerical value is the same (e.g., oxygen: atomic mass = 16.00 amu, molar mass = 16.00 g/mol). For molecules, you sum the atomic masses of all constituent atoms to get the molecular molar mass.