Molecular weight calculator

This molecular weight calculator finds the molar mass of a compound from its chemical formula. Type the formula, including brackets and water of hydration, and get the molar mass in g/mol with the number of atoms and the mass percentage of every element.

Calculated in your browser. Nothing you type is sent or stored.

Molecular weight calculatorOr describe it in Studio →

Capital letters matter: Co is cobalt, CO is carbon monoxide. Use brackets for groups and a dot (·, . or *) for water of hydration.

Molar mass

180.156 g/mol

ElementAtomsMass (g/mol)Mass %
C672.06640.00%
H1212.0966.71%
O695.99453.28%
Convert an amount

1 g = 5.551 mmol (0.005551 mol)

To report

C6H12O6: 180.16 g/mol

Check your result: the element masses should add up to the total and the percentages to 100%. For glucose 72.066 + 12.096 + 95.994 = 180.156 g/mol, and 40.00% + 6.71% + 53.28% = 99.99% because of rounding.
g/mol for glucose, C₆H₁₂O₆
180.156
g/mol for glucose, C₆H₁₂O₆
elements it knows
118
elements it knows
g/mol for CuSO₄·5H₂O
249.677
g/mol for CuSO₄·5H₂O
ways to type the hydrate dot: ·, •, . or *
4
ways to type the hydrate dot: ·, •, . or *
  • Brackets: Ca(OH)2, Al2(SO4)3
  • Hydrates: CuSO4·5H2O
  • Mass percent of each element
  • All 118 elements
  • Runs in your browser, free

01

How to calculate molecular weight

  1. Count the atoms of each element in the formula.
  2. Multiply each count by the element’s atomic weight.
  3. Add the results. The total is the molar mass in g/mol.

02

Worked example: glucose

ElementAtomsAtomic weightMass (g/mol)Mass %
C612.01172.06640.00%
H121.00812.0966.71%
O615.99995.99453.28%
C₆H₁₂O₆24180.156100%

03

How to type a formula

You typeMeaningMolar mass (g/mol)
H2Owater18.015
NaClsodium chloride58.440
Ca(OH)2a group in brackets, taken twice74.092
H2SO4sulfuric acid98.072
CuSO4·5H2Oa hydrate (·, . or * all work)249.677
C8H10N4O2caffeine194.194

04

Capital letters matter

Element symbols start with a capital letter and may have one lower-case letter. Co is cobalt (58.93 g/mol) but CO is carbon monoxide (28.01 g/mol); Pb is lead, PB would be phosphorus and boron. If a symbol is not an element, the calculator tells you which one it could not read.

05

Where the atomic weights come from

The atomic weights are the abridged standard atomic weights published by IUPAC’s Commission on Isotopic Abundances and Atomic Weights (CIAAW table, read on 22 November 2026): rounded values of at most five significant figures, such as H 1.0080, C 12.011, O 15.999, S 32.06 and Cu 63.546.

Thirty-four elements, among them technetium, promethium and everything heavier than bismuth except thorium, protactinium and uranium, have no stable isotope and no standard atomic weight. For those the calculator uses the mass of the longest-lived isotope from the PubChem periodic table.

A reagent’s certificate of analysis may show a value that differs in the second decimal place, because suppliers use slightly different rounding. For weighing out a solution the difference is far smaller than the balance error.

06

Molecular weight, molar mass and formula weight

The three are used interchangeably at the bench. Strictly, molecular weight (relative molecular mass) has no unit, molar mass is the same number in g/mol, and formula weight is the term for ionic compounds such as NaCl that do not form molecules. To turn a molar mass into grams for a solution, use the molarity calculator.

07

Common mistakes with molecular weight

  • Leaving out the water of a hydrate. CuSO₄ is 159.602 g/mol and CuSO₄·5H₂O is 249.677 g/mol; using the anhydrous value with the hydrate puts 36% too little salt in every solution.
  • Dropping the brackets. Ca(OH)₂ is 74.092 g/mol; typed as CaOH2 it reads as one oxygen and two hydrogens, 58.093 g/mol.
  • Lower-case symbols. Co is cobalt, 58.933 g/mol; CO is carbon monoxide, 28.010 g/mol.
  • Typing charges or state labels. The calculator reads element symbols, brackets and hydrate dots only, so write Na rather than Na⁺ and leave out (aq).

Trust

How this page is checked

  • The calculation runs on code with automated tests against worked reference values. Every number in the examples on this page was produced by that same code, not typed by hand.
  • The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
  • Sources: IUPAC CIAAW, abridged standard atomic weights.
  • Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.

Cite this page

Sciloom. (2026). Molecular weight calculator. Zebra Nine Studio Inc. https://sciloom.si/molecular-weight-calculator

Read the full methodology · Who makes Sciloom

Frequently asked questions

How do I find the molecular weight of a compound?

Add up the atomic weights of all the atoms in its formula. Type the formula above and the calculator does it, showing each element’s contribution.

What is the molecular weight of water?

18.015 g/mol: two hydrogen atoms (2 × 1.008) plus one oxygen atom (15.999).

How do I enter a hydrate?

Put a dot between the salt and the water: CuSO4·5H2O. A full stop or an asterisk works as the dot.

Does it handle brackets?

Yes, round and square, nested if needed: Ca(OH)2, Al2(SO4)3, K4[Fe(CN)6].

Got the molar mass? The molarity calculator turns it into grams to weigh.
Free to start, no sign-up.
Back to the tool ↑

More research tools