Gas Molar Mass & Molecular Weight Calculator
Calculate a gas compound's molar mass from its formula. Enter each element and atom count for molecular weight in grams per mole and a calculation breakdown.
Gas Molar Mass Calculator
Element Composition
Result
Calculation:
Molecular Visualization
Documentation
What Is a Gas Molar Mass Calculator?
A gas molar mass calculator finds the molar mass of a gas compound from its chemical formula. Molar mass is the mass of one mole of a substance, measured in grams per mole (g/mol). A mole is a fixed count of particles: 6.02214076 × 10²³ of them, a number called the Avogadro constant. To use the calculator, a person picks each element in the compound and enters how many atoms of it appear in the formula. The tool adds up the atomic masses and shows the total.
Molar mass matters for gases because it links the mass of a sample to the number of molecules in it. That link is needed for lab measurements, stoichiometry (calculating amounts in chemical reactions), and predicting how a gas behaves under pressure and temperature changes.
Molar Mass Formula
Molar mass is the sum of each element's atomic mass, multiplied by how many atoms of that element are in the formula:
- is the molar mass of the compound, in g/mol.
- is the number of atoms of element in the formula.
- is the atomic mass of element , in g/mol, taken from the periodic table.
Atomic masses on the periodic table are averages. They account for the natural mix of isotopes of each element, so the result reflects a real sample rather than one idealized atom.
How to Calculate Molar Mass: Step-by-Step Example
Carbon dioxide, CO₂, has one carbon atom and two oxygen atoms. Using standard atomic masses of 12.011 g/mol for carbon and 15.999 g/mol for oxygen:
The subscript after oxygen means there are two oxygen atoms, so their atomic mass is counted twice. Forgetting to multiply by a subscript is a common source of errors.
Two more worked examples, using the same method:
- Water vapor (H₂O): (2 × 1.008) + (1 × 15.999) = 18.015 g/mol
- Methane (CH₄): (1 × 12.011) + (4 × 1.008) = 16.043 g/mol
Methane's low molar mass, well under the roughly 29 g/mol average for air, is why natural gas leaks rise and collect near ceilings, a fact used in gas detector placement.
How to Use This Calculator
- Select the first element from the dropdown menu.
- Enter its atom count in the proportion field.
- Click "Add Element" for each additional element in the formula.
- Use "Remove" to delete an unwanted row.
- Read the molecular formula and molar mass, which update as values change.
The calculation breakdown below the result shows each element's contribution, so every step can be checked by hand. The "Copy Result" button copies the formula and molar mass as text.
Why Molar Mass Matters for Gases
Molar mass affects three things chemists and engineers care about:
- Density. At the same temperature and pressure, a gas with a higher molar mass is denser. The ideal gas law can be rearranged to , where is density, is pressure, is the gas constant, and is temperature. Helium (about 4.0 g/mol) is far lighter than air (about 29 g/mol), which is why helium balloons float.
- Diffusion and effusion rate. Lighter gases spread out and escape through small openings faster than heavier ones. Graham's law states that this rate is inversely proportional to the square root of molar mass.
- Moles-to-mass conversion. Stoichiometry problems give reaction amounts in moles, but lab measurements are made in grams. Molar mass converts between the two. For example, 0.5 mol of ammonia (NH₃, molar mass 17.031 g/mol) has a mass of 0.5 × 17.031 ≈ 8.52 g.
Common Gas Molar Masses
| Gas | Formula | Molar Mass (g/mol) |
|---|---|---|
| Hydrogen | H₂ | 2.016 |
| Oxygen | O₂ | 31.998 |
| Nitrogen | N₂ | 28.014 |
| Carbon dioxide | CO₂ | 44.009 |
| Methane | CH₄ | 16.043 |
| Ammonia | NH₃ | 17.031 |
| Water vapor | H₂O | 18.015 |
| Sulfur dioxide | SO₂ | 64.058 |
| Carbon monoxide | CO | 28.010 |
| Nitrous oxide | N₂O | 44.013 |
| Ozone | O₃ | 47.997 |
| Hydrogen chloride | HCl | 36.458 |
| Ethane | C₂H₆ | 30.070 |
| Propane | C₃H₈ | 44.097 |
| Butane | C₄H₁₀ | 58.124 |
Frequently Asked Questions
What is the difference between molar mass and molecular weight? The two are numerically the same but describe different scales. Molar mass (g/mol) is the mass of one mole of a substance. Molecular weight (measured in atomic mass units, or daltons) is the mass of a single molecule. For CO₂, both numbers are 44.009.
Does temperature or pressure change a gas's molar mass? No. Molar mass depends only on which atoms make up the molecule, not on temperature, pressure, or volume. Those conditions change a gas's density and behavior, but not its molar mass.
How is the molar mass of a gas mixture calculated? For a mixture, multiply each component's molar mass by its mole fraction, then add the results: . Dry air, roughly 78% nitrogen and 21% oxygen with small amounts of argon and other gases, has an average molar mass of about 28.97 g/mol.
Why do some atomic masses have decimals instead of whole numbers? Atomic masses are weighted averages of an element's naturally occurring isotopes. Chlorine, for example, is a mix of mostly chlorine-35 and some chlorine-37 atoms, giving an average atomic mass of 35.45 g/mol rather than a whole number.
Does this calculator work for isotopically labeled compounds? No. It uses standard atomic masses based on natural isotope abundance, so it treats deuterium (²H) as ordinary hydrogen (1.008 g/mol) rather than its true mass of about 2.014 g/mol. Isotope-labeled compounds, such as heavy water (D₂O) used in nuclear magnetic resonance work, need to be calculated by hand with isotope-specific masses.
Can this calculator be used for charged particles (ions)? Yes, for practical purposes. An electron's mass, about 0.00055 g/mol, is small enough to ignore in most calculations, so an ion's molar mass can be approximated the same way as a neutral molecule.
History of the Molar Mass Concept
The idea of atomic and molar mass grew out of 19th-century chemistry. John Dalton proposed relative atomic weights in 1803. Amedeo Avogadro suggested in 1811 that equal volumes of gas, at the same temperature and pressure, contain equal numbers of molecules, though the idea was not widely accepted at the time. Stanislao Cannizzaro clarified the difference between atomic and molecular weights in 1858, which let chemists build a consistent table of atomic masses. The discovery of isotopes in the early 20th century explained why those atomic masses were not whole numbers: they are averages across an element's isotopes. In 2019, the mole was redefined using a fixed value of the Avogadro constant, replacing an older definition tied to carbon-12. The change did not affect everyday calculations.