Molecular Weight of Gas Calculator

Calculate the molecular weight of any gas using the ideal gas law — from pressure, volume, temperature, and mass measurements — or directly from its chemical formula.

Try:
Molecular Weight
0.000 g/mol
Calculation Breakdown
Element Atomic Mass Atoms Total %
Total Molecular Weight
Elements in this compound
In formula
Other elements

Quick Examples

Click any compound to calculate its molecular weight instantly.

Water
H₂O
18.015 g/mol
Carbon Dioxide
CO₂
44.009 g/mol
Sodium Chloride
NaCl
58.443 g/mol
Glucose
C₆H₁₂O₆
180.156 g/mol
Ethanol
C₂H₅OH
46.069 g/mol
Sulfuric Acid
H₂SO₄
98.077 g/mol

How to Use the Molecular Weight of Gas Calculator

To calculate the molecular weight of a gas, enter its chemical formula into the input field and click "Calculate" for a direct formula-based result. For experimental determinations, use the ideal gas law with measured pressure, volume, temperature, and mass values.

There are 2 methods to determine gas molecular weight with this tool:

Method 1: From Chemical Formula (direct calculation)

  1. Enter the gas's chemical formula (e.g., CO₂, CH₄, NH₃, SO₂) into the calculator input field.
  2. Press "Calculate." The calculator sums the standard atomic weights of all atoms in the formula to return the molecular weight in g/mol.
  3. Use this value for stoichiometry, gas density calculations, or molar volume conversions.

Method 2: From Experimental Gas Data (ideal gas law)

  1. Measure the gas mass in grams (g), pressure in atmospheres (atm), volume in liters (L), and temperature in Kelvin (K). Convert Celsius to Kelvin by adding 273.15.
  2. Apply the formula: MW = (mass × R × T) ÷ (P × V), where R = 0.08206 L·atm/(mol·K).
  3. The result gives the molar mass of the unknown gas in g/mol, which can be compared to known values for identification.

This calculator serves general chemistry students, chemical engineers working with gas mixtures, atmospheric scientists analyzing air samples, and industrial chemists monitoring process gases.

How the Molecular Weight of Gas Calculator Works

The molecular weight of gas calculator operates on 2 principles: direct formula-based summation of atomic weights, and the ideal gas law derivation that connects measurable gas properties (pressure, volume, temperature, mass) to molar mass.

The core equations and relationships:

PV
Ideal Gas Law
PV = nRT. P = pressure (atm), V = volume (L), n = moles, R = 0.08206 L·atm/(mol·K), T = temperature (K). Fundamental equation for ideal gas behavior.
MW
Molar Mass From Gas Data
MW = (m × R × T) ÷ (P × V). Rearranges PV = nRT by substituting n = m/MW. Solve for MW using measured gas properties.
ρ
Density-Based Method
MW = ρ × R × T ÷ P, where ρ = gas density in g/L. At STP: MW = ρ × 22.414. Gas density provides a shortcut to molar mass when P and T are standard.
Vm
Molar Volume at STP
One mole of any ideal gas occupies 22.414 L at STP (0°C, 1 atm) or 24.465 L at SATP (25°C, 1 bar). These constants simplify molecular weight calculations from volume data.

Worked example: A 0.500 L flask at 25°C (298.15 K) and 1.00 atm contains 0.878 g of an unknown gas. MW = (0.878 × 0.08206 × 298.15) ÷ (1.00 × 0.500) = 21.48 ÷ 0.500 = 42.96 g/mol. Comparing to known molar masses, this gas is most likely propane (C₃H₈, MW = 44.10 g/mol) or carbon dioxide (CO₂, MW = 44.01 g/mol), with CO₂ being the closer match.

Gas molecular weight calculations apply to gas chromatography-mass spectrometry (GC-MS) compound identification, industrial gas mixture analysis, environmental monitoring of atmospheric pollutants (SO₂, NO₂, O₃), and gas law problems in general and physical chemistry courses.

Common Compound Molecular Weights

Reference table of frequently searched chemical compounds.

Chemical Formula Compound Name Molecular Weight
H₂O Water 18.015 g/mol
CO₂ Carbon Dioxide 44.009 g/mol
NaCl Sodium Chloride 58.443 g/mol
NH₃ Ammonia 17.031 g/mol
CH₄ Methane 16.043 g/mol
H₂SO₄ Sulfuric Acid 98.077 g/mol
CaCO₃ Calcium Carbonate 100.086 g/mol
C₆H₁₂O₆ Glucose 180.156 g/mol
C₂H₅OH Ethanol 46.069 g/mol
HCl Hydrochloric Acid 36.461 g/mol
NaOH Sodium Hydroxide 39.997 g/mol
Ca(OH)₂ Calcium Hydroxide 74.092 g/mol
HNO₃ Nitric Acid 63.012 g/mol
KMnO₄ Potassium Permanganate 158.032 g/mol
CuSO₄ Copper(II) Sulfate 159.607 g/mol

Explore Related Chemistry Calculators

Specialized calculation tools designed for molecular biology, biochemistry, and stoichiometry.

Molecular Weight of Gas Calculator FAQs and Common Questions

Answers to common questions about calculating gas molecular weight, the ideal gas law, molar volume, gas density, and practical applications.

How do I calculate the molecular weight of a gas?
Calculate the molecular weight of a gas using the rearranged ideal gas law: MW = (mass × R × T) ÷ (P × V), where mass is in grams, R is the gas constant (0.0821 L·atm/mol·K or 8.314 J/mol·K), T is temperature in Kelvin, P is pressure in atmospheres, and V is volume in liters. This method works for any gas that behaves approximately ideally.
What is the ideal gas law and how does it relate to molecular weight?
The ideal gas law is PV = nRT, where P is pressure, V is volume, n is moles, R is the gas constant, and T is temperature. Since n = mass ÷ MW, the equation becomes PV = (mass ÷ MW) × RT. Rearranging gives MW = (mass × R × T) ÷ (P × V). This lets you determine a gas's molecular weight experimentally by measuring its physical properties.
What is molar volume and how is it related to molecular weight of a gas?
Molar volume is the volume occupied by one mole of a gas at specified conditions. At standard temperature and pressure (STP: 0°C, 1 atm), one mole of an ideal gas occupies 22.414 liters (22.414 L/mol). At STP, you can calculate MW directly: MW = density (g/L) × 22.414 L/mol. This relationship lets you find molar mass from gas density alone.
What is the molecular weight of common gases like oxygen, nitrogen, and carbon dioxide?
The molecular weights of common gases: oxygen (O₂) = 31.998 g/mol, nitrogen (N₂) = 28.014 g/mol, carbon dioxide (CO₂) = 44.009 g/mol, hydrogen (H₂) = 2.016 g/mol, helium (He) = 4.003 g/mol, methane (CH₄) = 16.043 g/mol, argon (Ar) = 39.948 g/mol, and ammonia (NH₃) = 17.031 g/mol.
How does gas density relate to molecular weight?
Gas density is directly proportional to molecular weight at constant temperature and pressure. The relationship is: density (g/L) = (P × MW) ÷ (R × T). Heavier gases are denser: CO₂ (MW = 44.01 g/mol, density = 1.96 g/L at STP) is denser than N₂ (MW = 28.01 g/mol, density = 1.25 g/L at STP). This principle explains why CO₂ sinks and helium rises in air.
When does the ideal gas law give inaccurate molecular weight results?
The ideal gas law gives less accurate results at high pressures (above ~10 atm), low temperatures (near a gas's condensation point), or for gases with strong intermolecular forces (like water vapor, ammonia, or HCl). Under these conditions, use the Van der Waals equation or other real-gas equations of state for more precise molecular weight calculations. At moderate temperatures and pressures near 1 atm, the ideal gas law is accurate to within 1–2% for most gases.