Skip to main content
Calcimator

Molecular Weight Calculator

Calculate the molecular weight (molar mass) of chemical compounds from their formula. Shows element-by-element breakdown with atomic weights.

About this calculator

This calculator computes molecular weight by parsing a chemical formula into its constituent elements and counts, then summing atomic weight times count across every element — the same arithmetic you'd do by hand from a periodic table, automated against an internal table of atomic weights covering hydrogen through bismuth drawn from the IUPAC Commission on Isotopic Abundances and Atomic Weights' 2021 standard atomic weights report, the internationally recognized reference values chemists cite for this constant. Its formula parser reads capital-letter-plus-optional-lowercase element symbols followed by an optional subscript count (defaulting to 1 when no number follows), so "C6H12O6" is read as 6 carbons, 12 hydrogens, and 6 oxygens; it also normalizes Unicode subscript digits (like the ₂ in H₂O) into ordinary digits before parsing, so either notation works. Right now it drives from a fixed dropdown of common compounds — water, salt, glucose, sulfuric acid, caffeine, and a dozen others — each mapped internally to its formula string and run through the same parser.

Alongside the total molecular weight, it returns a full element-by-element table showing each element's atomic weight, atom count, mass contribution, and percentage of the total molecular mass, plus a pie chart of that mass composition — useful for seeing at a glance which atoms actually carry most of a molecule's weight (in glucose, for example, oxygen contributes a disproportionate share of the mass despite having fewer atoms than hydrogen). The most important thing to know about molecular weight itself: it is numerically identical, in different units, to molar mass — a value in g/mol tells you both the mass of a single molecule (in atomic mass units) and the mass of one mole, roughly 6.022×10²³ molecules, of that substance, which is exactly the conversion factor stoichiometry calculations rely on to move between grams and moles.

Inputs

Results

Molecular Weight

18.015 g/mol

Chemical FormulaH2O
Total Atoms3
Unique Elements2
Element BreakdownH: 2 × 1.008 = 2.016 g/mol (11.2%) O: 1 × 15.999 = 15.999 g/mol (88.8%)

Figures current as of 2021. Source: Commission on Isotopic Abundances and Atomic Weights (CIAAW), International Union of Pure and Applied Chemistry (IUPAC), "Atomic Weights 2021"

How to Use This Calculator
  1. Select a compound from the list (water, NaCl, glucose, CO2, etc.) or enter a custom formula.
  2. Review the element-by-element breakdown showing atomic weight and count for each element.
  3. Check total molecular weight in g/mol.
  4. Use molecular weight to convert between grams and moles in stoichiometry calculations.
  5. Remember: molecular weight in g/mol equals the mass of one mole of that substance.

What each input means

Select Compound
Choose a common compound or molecule.

How this is calculated

Formula

Molecular Weight = Sum of (atomic weight × count) for each element. Atomic weights from IUPAC 2021 standard values.

Figures and sources

Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

How does the calculator read a formula like C6H12O6?

The parser scans for a capital letter optionally followed by one lowercase letter (the element symbol), then an optional number (the subscript count) — so C6H12O6 is read as three symbol-count pairs: C with count 6, H with count 12, and O with count 6. If no number follows a symbol, the count defaults to 1, and the parser also converts Unicode subscript digits like the ₂ in H₂O into ordinary digits first, so both notations parse identically.

What happens if I select a formula with an element the calculator doesn't recognize?

The parser checks every symbol it extracts against its internal atomic-weight table (hydrogen through bismuth), sourced from the IUPAC Commission on Isotopic Abundances and Atomic Weights' 2021 standard atomic weights report; an unrecognized symbol returns an explicit 'Unknown element' error and a molecular weight of 0 rather than silently skipping that element or guessing a value. Every compound in the built-in dropdown list is already validated against this table, so this only surfaces if a custom formula string uses an element outside that range.

Why does the percentage breakdown for oxygen in glucose seem high relative to its atom count?

The percentage column reflects each element's share of total mass, not its share of atom count — oxygen's atomic weight (15.999) is roughly 16 times hydrogen's (1.008), so even though glucose (C6H12O6) has twice as many hydrogen atoms as oxygen atoms, oxygen's heavier atoms still contribute a disproportionately large fraction of the molecule's total mass.

Is molecular weight the same thing as molar mass?

Yes, numerically — a value in g/mol simultaneously describes the mass of a single molecule (in atomic mass units) and the mass of one mole, about 6.022×10²³ molecules, of that substance. This is exactly why the same number this calculator produces is the conversion factor used elsewhere to move between grams and moles in stoichiometry problems.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Science & Physics.