Chemistry

Molar Mass Calculator

Work out a compound's molar mass from its chemical formula — including nested parentheses — using IUPAC's published standard atomic weights.


Molar Mass Calculator

Advertisement

Type a chemical formula and this works out its molar mass, element by element, using IUPAC’s published standard atomic weights.

How it works

Every element symbol in the formula is matched to its standard atomic weight and multiplied by how many times it appears — including inside parentheses, so a formula like (NH₄)₂SO₄ is parsed correctly as two nitrogens, eight hydrogens, one sulfur and four oxygens, not misread by treating the parenthesised group as a single unit.

What happens with an unrecognised formula

If a formula uses a symbol this calculator doesn’t recognise, has unbalanced parentheses, or starts with a lowercase letter (element symbols are always capitalised first), it declines rather than guessing or silently skipping the unrecognised part — a partial or silently wrong molar mass would be worse than no answer at all.

How to use this calculator

  1. Type the formula using standard capitalisation — H2O, not h2o or H2o.
  2. Use parentheses for repeated groups, e.g. Ca(OH)2.
  3. Read the total molar mass and the per-element breakdown.

Frequently asked questions

Why does capitalisation matter so much?

Because chemistry itself uses it to distinguish elements — Co is cobalt, while CO is carbon monoxide (carbon plus oxygen). Getting the capitalisation wrong changes which element is meant, so this calculator is strict about it rather than guessing your intent.

What elements does this calculator cover?

The 30 or so most common elements in everyday chemistry formulas. A formula using an element outside that list is declined rather than silently treated as having zero mass for that atom.

Why do the atomic weights have decimals like 12.01 instead of a whole number?

Because a naturally occurring element is usually a mix of isotopes — atoms with the same number of protons but different numbers of neutrons — and the standard atomic weight is the weighted average across that natural mix, which rarely lands on a whole number.

Does this handle hydrates, like CuSO4·5H2O?

Not the dot notation directly — enter the formula parts and add their molar masses separately, or expand it manually if your formula includes a hydrate’s water of crystallisation.

How is this different from the percent composition calculator?

This gives the total molar mass. The percent composition calculator, built on the identical formula parser and atomic weights, goes a step further and breaks that total down into each element’s percentage share.

Be the first to rate this

Written by

P. Nakamura

Chemistry writer

P. Nakamura writes the chemistry calculators, covering solution concentration, stoichiometry, gas laws and colligative properties. Each page separates the definitional part of a formula from the reference constants it depends on, and leaves those constants adjustable where a different solvent or condition would change them. Worked chemistry is only as good as the assumptions stated alongside it.

Reviewed by

D. Petrov

Calculator reviewer — chemistry and environmental science

D. Petrov reviews the chemistry and environmental-science calculators, verifying that reference constants match their stated values and that they remain adjustable wherever a different substance or condition would change them. Review also checks that definitional relationships are not presented as though they required a citation, and that non-definitional values always carry one.

How we write and review

Related calculators