Molecular Weight Calculator

Calculate a compound's molecular weight from its chemical formula by summing atomic weights.

⏱ Updated: 18 Sep 2026

Calculator

Free molecular weight calculator: find the molar mass of a chemical formula by summing its atoms' atomic weights.

Molecular Weight
0 g/mol
Element Count Atomic Weight Subtotal

Enter a chemical formula to calculate its molecular weight.

How to Use the Molecular Weight Calculator

Type a chemical formula into the field — element symbols followed directly by their subscript counts, no spaces, e.g. C6H12O6 for glucose. The total molecular weight and a full element-by-element breakdown update as you type.

The calculation has no hidden steps: look up each element's atomic weight, multiply by how many atoms of that element appear, and add every element's contribution together. Water makes the point cleanly:

H: 1.008 × 2 = 2.016
O: 15.999 × 1 = 15.999
Total = 18.015 g/mol

18.015 g/mol is worth committing to memory if you're going to remember any molecular weight at all — it's one of the most frequently cited numbers in chemistry, underpinning everything from stoichiometry problems to converting between molarity and mass concentration.

Case matters more than it looks like it should: cobalt is written Co, but CO (capital O) isn't a valid two-letter symbol — it reads as carbon (C) plus a separate oxygen atom (O) instead. Get the capitalization right and the parser handles the rest on its own.

Where the Atomic Weights Come From

The lookup table behind this calculator covers elements 1 through 92, hydrogen through uranium, using standard IUPAC-consistent atomic weights. A handful of those — technetium, promethium, polonium, astatine, radon, francium, radium, and actinium — have no stable natural isotope to average, so by convention they're given the mass number of their most stable known isotope instead of a true standard atomic weight.

The parser is deliberately flat: it reads element symbols and trailing digit counts and nothing else. That covers the overwhelming majority of formulas anyone actually types in — glucose, table salt, ethanol — but it means two common notations aren't supported here. Parenthetical grouping, like Ca(OH)₂ for calcium hydroxide, and hydrate dots, like CuSO₄·5H₂O for hydrated copper sulfate, both need to be written out flat instead to get a correct total. If a symbol in your formula isn't recognized — a typo, or an element past uranium — the calculator names exactly which one, rather than silently dropping it or returning a meaningless result.