Molecular weight

Molecular weight and per-element composition from a chemical formula, with an optional name lookup.Type a formula and the weight and composition appear as you type.

This field is the only one that leaves your browser: pressing the button sends the name to PubChem, at the US National Institutes of Health. The formula field never uses the network.

Case matters — Co is cobalt, CO is carbon monoxide. Brackets, hydrates (CuSO₄·5H₂O) and subscript characters are all read as written.

How to use it

  1. Type the formula. Case matters, so element symbols take a capital first letter only — H2O, C6H12O6, NaCl.
  2. Write brackets and hydrates as you normally would — Ca(OH)2, Fe2(SO4)3, CuSO4·5H2O. Square and curly brackets work the same way.
  3. If the formula escapes you, put the name in the field above and press Look up. PubChem returns only the formula; the weight is computed here.
  4. Read the per-element contribution and mass percent in the table under the answer. To turn the weight into grams on a balance, go on to the molarity calculator.

💡 The formula field works with no internet at all. The Look up button is the only thing that leaves your browser.

Formula and cautions

A molecular weight is the standard atomic weights of the atoms in the formula, added up. The difficult part is not the arithmetic — it is which atomic weights.

The sum

For each element, count times atomic weight, then add. Mass percent is each contribution over the total.

Molecular weight
M = Σ (nᵢ × Aᵢ)
Mass percent
% = nᵢ × Aᵢ / M × 100

Which atomic weights — the abridged ones

Fourteen elements have no single standard atomic weight at all, only an interval. Carbon's is [12.0096, 12.0116], and where in it a sample falls depends on where the sample came from. IUPAC publishes an abridged standard atomic weight for calculation, and that is what this tool uses. It is not the midpoint of the interval, and its ± is chosen to cover the whole of it.

Carbon
[12.0096, 12.0116] → 12.011 ± 0.002

Elements with no value at all

Thirty-four elements — technetium, promethium, polonium and the rest — have no standard atomic weight. They have no stable isotope, so there is no characteristic terrestrial composition to average. This tool says so rather than computing: it does not substitute the mass number of the longest-lived isotope, which is a different quantity and not what a reagent bottle is labelled with.

Cautions

  • Case is meaning. Co is cobalt (58.933), CO is carbon monoxide (28.010). A symbol starting in lower case is refused rather than corrected — correcting it would mean returning a different molecule with full confidence.
  • Charge does not change the weight. An electron is 1/1836 of the lightest atom, well below the precision of any atomic weight here. But NH4+ and Ca2+ are the same shape while the 4 is a subscript and the 2 is a charge — so digits are always read as subscripts and the formula that was read is shown beside the answer. Check that line.
  • In a hydrate, the number after the dot multiplies everything after it. CuSO₄·5H₂O is CuSO₄ plus five waters, 249.677. Swapping an anhydrous salt for its hydrate on the balance changes the number of moles entirely.
  • These are average molecular weights. The monoisotopic mass used in mass spectrometry is a different quantity, and the two diverge as molecules get larger.

Atomic weights from Prohaska, T. et al., “Standard atomic weights of the elements 2021 (IUPAC Technical Report)”, Pure and Applied Chemistry. doi:10.1515/pac-2019-0603

Frequently asked questions

Often used together