01
How to calculate molecular weight
- Count the atoms of each element in the formula.
- Multiply each count by the element’s atomic weight.
- Add the results. The total is the molar mass in g/mol.
02
Worked example: glucose
| Element | Atoms | Atomic weight | Mass (g/mol) | Mass % |
|---|---|---|---|---|
| C | 6 | 12.011 | 72.066 | 40.00% |
| H | 12 | 1.008 | 12.096 | 6.71% |
| O | 6 | 15.999 | 95.994 | 53.28% |
| C₆H₁₂O₆ | 24 | 180.156 | 100% |
03
How to type a formula
| You type | Meaning | Molar mass (g/mol) |
|---|---|---|
| H2O | water | 18.015 |
| NaCl | sodium chloride | 58.440 |
| Ca(OH)2 | a group in brackets, taken twice | 74.092 |
| H2SO4 | sulfuric acid | 98.072 |
| CuSO4·5H2O | a hydrate (·, . or * all work) | 249.677 |
| C8H10N4O2 | caffeine | 194.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
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].