Skip to main content

Molecular Weight Calculator

Type a chemical formula the way chemists write it — elements, counts, parentheses for groups, a middle dot for hydrates — and this tool parses it properly, counts every atom, and returns the molar mass with each element’s share of it. Ca(OH)2 is understood as one calcium, two oxygens and two hydrogens; CuSO4·5H2O counts the five waters in full, hydrogens and all.

The atomic weights are the IUPAC 2021 conventional values — the standard table numbers (H 1.008, C 12.011, O 15.999, S 32.06…) — printed element by element beside every result, because “standard atomic weights” are themselves a convention: several elements’ weights are intervals in nature, and the conventional value is the agreed single figure. The page names its table rather than hiding it inside the answer.

Elements, counts, parentheses and hydrates: Ca(OH)2, CuSO4·5H2O.

Molar mass

18.015 g/mol

From the IUPAC 2021 conventional atomic weights — the standard table values, named on this page.

Total atoms

3

Across 2 element(s).

ElementAtomsAtomic weightMass share
H (Hydrogen)21.0082.016 (11.19%)
O (Oxygen)115.99915.999 (88.81%)

How it is worked out

  1. The formula parses to 2 × H, 1 × O — 3 atoms per formula unit.
  2. Each element contributes count × its IUPAC conventional atomic weight; the molar mass is the exact sum of those products, in grams per mole.
  3. Percentages are each element's share of that total mass, at 2 decimals — rounded shares can add to 99.99 or 100.01; the masses themselves are exact.

Embed this calculator on your website →

The formula

molar mass = Σ (count of element × its atomic weight)

  • Parsing — a real formula parser: symbols are case-sensitive (Co is cobalt, CO is carbon monoxide), parentheses multiply everything inside, and a hydrate segment’s coefficient multiplies its whole segment — the step hand calculations most often flub.
  • Percent composition — each element’s total mass over the molar mass × 100; the shares sum to 100% (allowing a rounding whisker in the last digit).

Worked example: water, H2O: 2 × 1.008 + 15.999 = 18.015 g/mol — hydrogen is just 11.19% of water’s mass, despite being two of its three atoms.

How it works

Why molar mass is chemistry’s exchange rate. Reactions run on counts of molecules; laboratories weigh grams. The molar mass converts between the two: one mole of a substance — 6.02214076 × 10²³ of its formula units — weighs exactly its molar mass in grams. Stoichiometry, solution concentrations, gas calculations and yield percentages all pass through this one number, which is why getting Ca(OH)2’s parentheses right is not pedantry.

Hydrates: the five waters are real. Blue copper sulfate is CuSO4·5H2O: five water molecules ride along in every crystal, adding 90.075 to the molar mass (249.677 in total, with nine oxygens, not four). Heat the crystals and the water leaves — the mass drops by 36%, a classic school practical. A calculator that skims the “·5H2O” gets the anhydrous mass and every downstream figure wrong; this parser multiplies the whole segment, and the element table shows the nine oxygens to prove it.

Examples

  • Carbon dioxide — CO2 = 44.009 g/mol.
  • Glucose — C6H12O6 = 180.156 g/mol, 24 atoms, carbon exactly 40% of the mass.
  • Blue vitriol — CuSO4·5H2O = 249.677 g/mol, with 10 hydrogens and 9 oxygens counted.

Frequently asked questions

Which atomic weights does this use?

The IUPAC 2021 conventional atomic weights — the single agreed values published for general use: H 1.008, C 12.011, N 14.007, O 15.999, Na 22.99, S 32.06, Cl 35.45, Ca 40.078, Fe 55.845, Cu 63.546, and so on for the elements the parser knows. In nature, some elements' weights are intervals (isotopes vary by source); the conventional value is the standard representative, and it is the weight printed beside each element in your result, so the basis of every figure is visible.

How do I write a hydrate or a formula with brackets?

Hydrates: join the segments with a middle dot — CuSO4·5H2O (a typed '*' or '.' also works) — and the coefficient multiplies the whole following segment. Groups: parentheses multiply their contents, Ca(OH)2, and they nest, as in K4[Fe(CN)6]-style formulas written with round brackets: K4(Fe(CN)6). A leading coefficient for the whole formula ('2H2O') is not accepted — counts belong after an element or a closing bracket, exactly as formulas are written.

Why does case matter — isn't CO the same as Co?

Not in chemistry: element symbols are case-sensitive by definition. CO is carbon + oxygen (carbon monoxide, molar mass 28.01); Co is the single element cobalt (58.933). A parser that ignores case silently converts one substance into another. This tool reads symbols exactly as written and refuses anything it cannot resolve to a real element, listing the offending symbol.

Is molar mass the same as molecular weight?

Numerically, for ordinary work, yes — 'molecular weight' is the traditional name for the same quantity expressed in g/mol (strictly, molar mass; the dimensionless twin is relative molecular mass). This page uses the terms as the field uses them and reports g/mol, the unit every laboratory calculation consumes.