Molar Mass Calculator

Enter a molecular formula like H2O or C6H12O6 and get the molar mass in g/mol with a full element breakdown.

Use the Molar Mass Calculator

Molecular Formula

Use element symbols with numeric subscripts. Parentheses supported: Ca(OH)2.

Quick examples:

Enter a molecular formula and click Calculate

Copied!

Summary

The Molar Mass Calculator computes the molecular weight of any chemical compound from its formula. Type a formula such as H2O, NaCl, or C6H12O6 and the tool parses each element and subscript, looks up atomic masses from the periodic table, and returns the total molar mass in g/mol along with a breakdown by element. Parentheses and nested groups like Ca(OH)2 or Al2(SO4)3 are fully supported.

How it works

  1. Type a molecular formula into the input field (e.g., H2O, NaCl, Fe2O3).
  2. The tool parses every element symbol and its subscript count.
  3. Parenthesized groups like Ca(OH)2 are expanded before parsing.
  4. Atomic masses from the standard periodic table are multiplied by each element count.
  5. The individual contributions are summed to give the total molar mass in g/mol.
  6. An element breakdown table shows each atom's contribution to the total mass.

Use cases

  • Stoichiometry calculations in chemistry homework and lab work.
  • Converting between grams and moles for a reagent.
  • Verifying the molecular weight of a synthesized compound.
  • Preparing solutions of a known molarity.
  • Quick periodic-table lookups for atomic masses during an exam.
  • Teaching balancing chemical equations and mole concepts.

Frequently Asked Questions

Last updated: 2026-06-11 · Reviewed by Nham Vu