All tools
Math & Everyday

Molar Mass Calculator

Molar mass of any chemical formula, with a full element-by-element breakdown.

🔒 Runs entirely in your browser — nothing here is ever uploaded

About the Molar Mass Calculator

Computes the molar mass of a chemical compound from its formula, parsing element symbols, subscript counts, and simple parenthesized groups with a dedicated small parser, against a table of common elements' IUPAC standard atomic weights.

100% Free Runs in Your Browser No Sign-Up Required
How to use it
  1. Enter a chemical formula using standard notation (e.g. H2O, NaCl, C6H12O6, Ca(OH)2).
  2. Read the total molar mass and the element-by-element breakdown.
Formula
Molar mass = sum over every element in the formula of (atomic weight × count). Parenthesized groups multiply every element inside by the group's trailing count.
Worked example

C6H12O6 (glucose): 6 carbon + 12 hydrogen + 6 oxygen = 180.156 g/mol, matching glucose's real published molar mass.

Standard atomic weights for common elements (IUPAC conventional values)
Standard atomic weights for common elements (IUPAC conventional values)
ElementAtomic weightElementAtomic weight
H1.008Na22.990
C12.011Cl35.45
N14.007Ca40.078
O15.999Fe55.845
Interpreting your result

Uses IUPAC conventional standard atomic weights for roughly 30 common elements. Supports element+count notation and simple parenthesized groups, but not hydrate notation, isotope notation, or ionic charges. Parsing uses a small custom parser — never JavaScript's eval() or Function() on user input.

Recommendations
  • Element symbols are case-sensitive, like real chemical notation.
  • Use parentheses with a trailing count for repeated groups, like Ca(OH)2 or Al2(SO4)3.
  • This tool doesn't support hydrate notation like CuSO4·5H2O.
Frequently asked questions
Running eval() on user-supplied text is a real security risk — this site never does that on any tool.
Sources