Skip to main content

Atomic Mass Calculator

Calculate molar mass from any chemical formula with element-by-element percent breakdown.

Written by Golam Rabbani, Founder & Lead Engineer

Supports parentheses and hydrates, e.g. CuSO4·5H2O. Case matters: Co (cobalt) ≠ CO (carbon monoxide).

How to use this atomic mass calculator

  1. Type a chemical formula — H2O, NaCl, C6H12O6, Ca(OH)2, Fe2(SO4)3, CuSO4·5H2O.
  2. Press Calculate to see the total molar mass and a per-element breakdown.
  3. Read the percent-by-mass column to find the limiting element or check composition.
  4. Use Copy to send the result to your clipboard or Reset to try another formula.

About this atomic mass calculator

The atomic mass calculator parses a chemical formula, looks up every element's standard atomic weight, and sums them to give the molar mass (g/mol). It handles nested parentheses for ionic compounds — Ca(OH)₂ correctly returns 74.09 g/mol — and the centred-dot notation for hydrates such as CuSO₄·5H₂O. Atomic weights are the IUPAC 2021 standard values; for elements without a stable isotope (Tc, Po, At, Rn, Fr, Ra, Ac, and beyond), the mass number of the most stable isotope is used.

Worked example: glucose, C₆H₁₂O₆. Carbon contributes 6 × 12.011 = 72.066 g/mol. Hydrogen contributes 12 × 1.008 = 12.096 g/mol. Oxygen contributes 6 × 15.999 = 95.994 g/mol. Total = 180.156 g/mol — the textbook value. The percent-by-mass column reports 40.0% C, 6.7% H, 53.3% O, which exactly matches what an empirical formula calculation would give back. For an ionic compound like Fe₂(SO₄)₃: 2 × Fe + 3 × (S + 4 × O) = 2 × 55.845 + 3 × (32.06 + 4 × 15.999) = 111.69 + 3 × 96.056 = 399.86 g/mol.

FAQ

Where do the atomic weights come from?
IUPAC Periodic Table of Elements 2021 (Atomic Weights of the Elements 2021). Where IUPAC publishes a conventional value, the tool uses that; for elements with no stable isotope it uses the mass number of the longest-lived isotope.
Does it handle parentheses and hydrates?
Yes. Ca(OH)2 expands to Ca + 2(O + H). Fe2(SO4)3 expands to 2Fe + 3(S + 4O). For hydrates use a centred dot or period: CuSO4·5H2O or CuSO4.5H2O.
Is the parser case-sensitive?
Yes — and it must be. Co is cobalt, but CO is carbon monoxide (carbon then oxygen). Always capitalise the first letter and lowercase the second.
Can I get percent composition?
Yes — the breakdown table includes a "% by mass" column for every element. Empirical formula problems become one-click.
How precise is the result?
About 4 significant figures — limited by the published standard atomic weights themselves, which have natural variation across the Earth's isotope reservoirs.
Is the atomic mass calculator free?
Yes — free, no signup, no network calls, runs in your browser.