Molar Mass Calculator

Molar mass from a chemical formula.

Show details

Enter a chemical formula and this calculator adds up the standard atomic weights of every atom to give the molar mass in g/mol — with a breakdown showing how much each element contributes, and its percentage by mass.

Loading calculator...

Molar Mass — The Quick Answer

Molar mass is the sum of the atomic masses of all atoms in a formula, in grams per mole. Water (H₂O) is 2 × 1.008 + 15.999 ≈ 18.02 g/mol. Type any formula to get its value.

Shortcut

Molar mass = Σ (number of atoms × atomic mass)

Molar masses of common compounds

CompoundFormulaMolar mass (g/mol)
WaterH2O18.02
Carbon dioxideCO244.01
Sodium chlorideNaCl58.44
GlucoseC6H12O6180.16
Sulfuric acidH2SO498.08
Calcium carbonateCaCO3100.09

Molar mass is numerically equal to molecular mass but carries the unit g/mol, connecting the microscopic world of atoms to weights you can measure on a balance: one mole of any substance contains 6.022 × 10²³ particles (Avogadro's number).

How It Works

1
Type a chemical formula using element symbols and digit subscripts (H2O, C6H12O6)
2
Use brackets for repeated groups — Ca(OH)2 means one calcium plus two OH groups
3
The calculator counts each atom and multiplies by its standard atomic weight
4
It sums the contributions to give the molar mass in g/mol
5
A table shows each element's atom count, mass contribution, and percentage

The Method

Adding up atomic weights

Formula

M = Σ (nᵢ × Aᵢ) where nᵢ = atoms of element i, Aᵢ = its atomic weight

Variables

n

Subscript

How many atoms of that element appear in the formula. In H2O, hydrogen has n = 2 and oxygen n = 1.

A

Atomic weight

The standard atomic mass of the element in g/mol, from the IUPAC conventional values (e.g. C = 12.011, O = 15.999).

M

Molar mass

The sum, in grams per mole — the mass of one mole of the substance.

Note: Brackets multiply everything inside: Ca(OH)2 = Ca + 2 × (O + H). If a formula has water of crystallisation, add the water separately (e.g. CuSO4·5H2O).

Last updated: October 6, 2026

Tufail Ahmed

Creators

Tufail Ahmed

Computer Scientist & Developer Tools Author

Reviewers

Khizar Nadim

Technical Reviewer

Quick Facts

CategoryScience
Cost Free
Last updated2026-10-06

Privacy Guaranteed

Your data never leaves your browser. All calculations are 100% private.

Frequently Asked Questions

How do I calculate molar mass?

Add up the atomic masses of every atom in the formula. For water, H2O: 2 × 1.008 (hydrogen) + 15.999 (oxygen) = 18.015 g/mol. This calculator does that automatically for any formula you type.

What is the difference between molar mass and molecular mass?

They're the same number, but different units. Molecular mass is measured in atomic mass units (u), while molar mass is in grams per mole (g/mol). Numerically they match because one mole contains Avogadro's number of particles.

How do I enter brackets like in Ca(OH)2?

Just type them as written: Ca(OH)2. The digit after the bracket multiplies everything inside, so Ca(OH)2 means 1 calcium, 2 oxygen, and 2 hydrogen atoms. Square brackets [ ] work too.

Why does the calculator give small differences from my textbook?

Atomic weights have a small range depending on the sample's isotopic composition. This tool uses the IUPAC conventional values (e.g. C = 12.011 rather than exactly 12), which is standard practice — tiny differences of a few hundredths of a g/mol are normal.