ThisCalculator

Chemistry

Molar Mass Calculator: Formula & How to Use

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Molar Mass Calculator: Formula & How to Use

A molar mass calculator works out the mass of one mole of a substance (in grams per mole, g/mol) from its chemical formula. You enter the formula (like H2O or Na2SO4) and the calculator sums the atomic masses of every element, multiplied by the number of atoms of each. The result is the molar mass, which you need to convert between grams and moles in any chemistry calculation.

Formula

The molar mass M of a compound is the sum of the atomic masses of its constituent atoms:

M = Σ (ni × Ai)

  • ni – number of atoms of element i in the formula (unitless).
  • Ai – atomic mass of element i from the periodic table (in g/mol).

For example, water (H2O) has 2 hydrogen atoms (A = 1.008 g/mol) and 1 oxygen atom (A = 16.00 g/mol). So M = 2×1.008 + 1×16.00 = 18.016 g/mol.

Worked Example

Using the default formula H2O:

  1. Identify the elements: H and O.
  2. Count atoms: 2 H, 1 O.
  3. Look up atomic masses: H = 1.008 g/mol, O = 16.00 g/mol.
  4. Multiply and add: (2 × 1.008) + (1 × 16.00) = 2.016 + 16.00 = 18.016 g/mol.

The calculator displays 18.02 g/mol (rounded to two decimals). This means 1 mole of water molecules weighs 18.02 grams.

Why Molar Mass Matters

Molar mass is the bridge between the microscopic world (atoms and molecules) and the macroscopic world (grams you can weigh on a balance). In a lab, you cannot count individual molecules, but you can weigh a sample. Molar mass lets you convert:

  • Grams → moles: divide by molar mass.
  • Moles → grams: multiply by molar mass.

This conversion is essential for stoichiometry, preparing solutions of known concentration (molarity), and calculating theoretical yields in reactions.

How to Read the Result

The molar mass is always expressed in grams per mole (g/mol). For example, 18.02 g/mol for water means that 6.022 × 1023 water molecules (Avogadro’s number) have a total mass of 18.02 grams. The same number applies to any substance: the molar mass in g/mol is numerically equal to the average mass of one molecule or formula unit in atomic mass units (amu or Da).

For ionic compounds like NaCl, the term “formula mass� is sometimes used, but the value is calculated the same way. For elements that exist as molecules (e.g., O2, N2), the molar mass refers to the molecule, not the atom. So O2 has a molar mass of 32.00 g/mol, not 16.00 g/mol.

Common Mistakes and Pitfalls

  • Forgetting subscripts – H2O has 2 hydrogens, not 1. Always multiply the atomic mass by the subscript.
  • Ignoring parentheses – In Ca(OH)2, the subscript 2 applies to both O and H. So you have 2 O and 2 H, not just 1 of each.
  • Using atomic number instead of atomic mass – The atomic number (number of protons) is not the mass. Carbon-12 has atomic number 6 but atomic mass ≈ 12.01 g/mol.
  • Rounding too early – Round only at the final step to avoid accumulating errors. For example, using 1.008 for H and 16.00 for O gives 18.016, not 18.0 if you round each product first.
  • Confusing molar mass with molecular weight – They are numerically the same, but molar mass has units of g/mol, while molecular weight is dimensionless (often in amu).

Limits of the Formula

The molar mass calculated from a formula is an average based on the natural isotopic abundance of each element. For most purposes (stoichiometry, solution prep), this average is accurate enough. However, if you are working with a specific isotope (e.g., pure 12C), the molar mass will differ slightly. Also, for large biomolecules like proteins, the molar mass is usually determined experimentally (e.g., by mass spectrometry) rather than by summing a formula, because the exact formula may be unknown or have many repeating units.

Alternatives to a Calculator

If you don’t have a calculator, you can compute molar mass by hand using a periodic table. Write the formula, count atoms of each element, multiply each atomic mass by its count, and sum. For a compound like glucose (C6H12O6):

  • C: 6 × 12.01 = 72.06
  • H: 12 × 1.008 = 12.096
  • O: 6 × 16.00 = 96.00
  • Total = 180.156 g/mol

Many periodic tables include atomic masses to four significant figures, which is sufficient for most calculations. For more precise work, use the IUPAC standard atomic weights.

Frequently Asked Questions

How do I calculate molar mass from a chemical formula?

Write the formula, count the atoms of each element, multiply each element’s atomic mass (from the periodic table) by its atom count, then add all the products. For example, for H2SO4: H (2×1.008) + S (32.06) + O (4×16.00) = 98.08 g/mol.

What is the difference between molar mass and molecular weight?

They are numerically identical, but molar mass has units of g/mol and refers to one mole of substance, while molecular weight is a dimensionless ratio (often expressed in atomic mass units, amu). In practice, chemists use the terms interchangeably.

Why is the molar mass of an element not a whole number?

Because most elements have multiple naturally occurring isotopes. The atomic mass is a weighted average of all isotopes’ masses based on their abundance. For example, chlorine has isotopes 35Cl and 37Cl, giving an average of about 35.45 g/mol.

How do I convert grams to moles using molar mass?

Divide the mass in grams by the molar mass (g/mol). For example, 36.04 g of water divided by 18.02 g/mol gives 2.00 moles. Conversely, multiply moles by molar mass to get grams.

Does molar mass change with temperature or pressure?

No. Molar mass is an intrinsic property of the substance; it depends only on the atoms present, not on physical conditions. However, the volume of a gas at a given temperature and pressure will change, but the mass of one mole remains constant.

What is the molar mass of a gas at STP?

At standard temperature and pressure (0°C, 1 atm), one mole of any ideal gas occupies 22.4 liters. The molar mass can be found by dividing the density of the gas (g/L) by (1/22.4 L/mol). For example, if a gas has a density of 1.25 g/L, its molar mass is 1.25 × 22.4 = 28.0 g/mol (which matches nitrogen, N2).

Related

Formula used
in f | Chemical formula | - | H2O | 0
out m | Molar mass | g/mol | 0 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.