Skip to content

Molar Mass Calculator

Type a chemical formula and get its molar mass in g/mol, a table of what each element contributes, and the addition written out so you can check it against your own. It reads nested brackets, hydrates such as CuSO4·5H2O, and ions. Free, no sign-up.

Case matters: Co is cobalt, CO is carbon monoxide. Join a hydrate with · or *, and write a charge as Fe^3+ or SO4^2-.

Try an example

Results

180.156 g/mol

Molar mass

C6H12O6

Formula

24

Atoms per formula unit

Mass of each element

ElementAtomsAtomic weight (g/mol)Subtotal (g/mol)Mass %
Carbon (C)612.01172.06640.00%
Hydrogen (H)121.00812.0966.71%
Oxygen (O)615.99995.99453.28%

The working

6 × 12.011 + 12 × 1.008 + 6 × 15.999

Σ = 72.066 + 12.096 + 95.994 = 180.156 g/mol

How to Use the Molar Mass Calculator

  1. 1. Type the formula. Write it the way a textbook does: H2O, Ca(OH)2, Al2(SO4)3. Subscripts can be plain digits or Unicode (H₂O). Capital letters matter, because Co is cobalt and CO is carbon monoxide.
  2. 2. Add hydrates and charges if you need them. Join a hydrate with a dot, an asterisk or ·, as in CuSO4·5H2O or CuSO4*5H2O. Write a charge with a caret, as in SO4^2- or Fe^3+, or use superscripts (SO₄²⁻).
  3. 3. Choose the rounding. The answer can be shown to two, three or four decimal places. The working always uses the full atomic weights.
  4. 4. Read the table and the working. Each element's count, atomic weight, subtotal and share of the total are listed, followed by the sum, so you can match it line by line against your own calculation.

What Molar Mass Is and How It Is Calculated

The molar mass of a substance is the mass of one mole of it, in grams per mole (g/mol). One mole is exactly 6.02214076 × 10²³ particles — the value fixed by the 2019 redefinition of the SI. Numerically, a molar mass equals the substance's formula mass in atomic mass units, so one water molecule weighs about 18.015 u and a mole of water weighs about 18.015 g.

To find it, multiply the number of atoms of each element by that element's atomic weight, then add the results. A subscript counts the atom or group before it; a number outside a bracket multiplies everything inside; a coefficient in front of a hydrate's water multiplies the whole water unit.

Formula

M = Σ (atoms of element × atomic weight of element)

Brackets

Ca(OH)2 → Ca 1, O 1 × 2 = 2, H 1 × 2 = 2

Hydrates

CuSO4·5H2O → M(CuSO4) + 5 × M(H2O)

Worked Example: Glucose, C6H12O6

Glucose is the calculator's default input, and its working reads:

  • Carbon: 6 × 12.011 = 72.066 g/mol
  • Hydrogen: 12 × 1.008 = 12.096 g/mol
  • Oxygen: 6 × 15.999 = 95.994 g/mol
  • Total: 72.066 + 12.096 + 95.994 = 180.156 g/mol

Dividing each subtotal by the total gives the mass percentages: 40.00% carbon, 6.71% hydrogen and 53.28% oxygen — the Percent Composition Calculator does that in one step. A textbook that uses rounder atomic weights may print 180.16 g/mol; the difference is in the last digit only.

For a hydrate, the water counts in full. Copper(II) sulfate pentahydrate, CuSO4·5H2O, is 159.602 g/mol for CuSO4 plus 5 × 18.015 = 90.075 g/mol for the water, so 249.677 g/mol, of which water is 36.08%. That is why a sample must be heated to constant mass before you weigh the anhydrous salt.

Which Atomic Weights This Calculator Uses

The values are the abridged standard atomic weights from IUPAC's Commission on Isotopic Abundances and Atomic Weights (CIAAW), in the 2024 table, quoted to five significant figures. For elements whose isotopic make-up varies in nature — hydrogen, carbon, nitrogen, oxygen, sulfur, chlorine and a few others — IUPAC publishes an interval, and the abridged table gives the conventional single value that textbooks use: H 1.008, C 12.011, O 15.999, Cl 35.45.

Elements with no standard atomic weight

Technetium, promethium, polonium through actinium, and neptunium onward have no stable isotope with a fixed natural abundance, so IUPAC publishes no standard atomic weight for them. For those the calculator uses the mass number of the longest-lived known isotope — Tc 98, Pu 244 — and flags the result as approximate.

Common Mistakes

  • Ignoring the multiplier outside brackets. In Al2(SO4)3 the sulfate appears three times: 3 sulfur atoms and 12 oxygen atoms, not 1 and 4.
  • Mixing up capitalisation. CO is carbon monoxide; Co is cobalt. The calculator reports an unknown symbol rather than guessing.
  • Treating the hydrate dot as multiplication. The · means "together with": CuSO4·5H2O is one formula unit of CuSO4 plus five of water, and the 5 multiplies only the H2O.
  • Rounding atomic weights early. Keep every digit until the final sum, then round once; the Significant Figures Calculator shows how many digits the answer deserves.
  • Expecting a charge to change the mass. The electrons gained or lost weigh about 0.00055 g/mol each — less than the uncertainty in most atomic weights — so SO4^2- is given the same molar mass as the neutral SO4 group.

Frequently Asked Questions

How do you calculate the molar mass of a compound?
Count the atoms of each element in the formula, multiply each count by that element's atomic weight, and add the products. For water, H2O, that is 2 × 1.008 + 15.999 = 18.015 g/mol. Multiply through any brackets first, and add a hydrate's water as a separate term.
What is the difference between molar mass, molecular weight and formula mass?
They have the same number and different units. Formula mass or molecular weight is the sum of atomic weights in atomic mass units for one formula unit; molar mass is the mass of one mole, in g/mol. Use "formula mass" for ionic compounds such as NaCl, which have no discrete molecules.
Why is my answer slightly different from my textbook's?
Atomic weights are revised and rounded differently. An older book may use H = 1.01 or Cl = 35.5; this calculator uses the current IUPAC abridged values, so a result can differ in the last one or two digits. Use the weights your course specifies when marks depend on the last digit.
How do I enter a hydrate such as CuSO4·5H2O?
Type the dot as ·, , or a full stop between the parts: CuSO4·5H2O, CuSO45H2O and CuSO4.5H2O all work. Fractional coefficients are accepted too, so a hemihydrate can be CaSO4·0.5H2O or CaSO4·½H2O.
Does a charge change the molar mass?
Not at the precision of atomic weights. Each electron has a molar mass of about 0.00055 g/mol, so Fe^3+ weighs about 55.843 g/mol against 55.845 for the iron atom — a gap smaller than the ±0.002 uncertainty in the atomic weight itself. The calculator shows the charge and leaves the mass unchanged.
How do I write ions without a caret?
A trailing sign works: Na+, Cl-, NH4+, HCO3-. A digit before the sign is read as the charge after a lone element symbol (Fe3+, Cu2+) or a whole bracketed ion ([Fe(CN)6]3-), and as part of the formula otherwise (NH4+). When in doubt, use the caret: SO4^2-.

Related Tools

More in Science & Lab Calculators

See all Science & Lab Calculators