Molar Mass Calculator — Formula In, g/mol Out
Molar mass is the first step of nearly every chemistry calculation, and it is also where bracket mistakes quietly wreck exam answers. A calculator that shows its working — atoms counted, masses multiplied, contributions listed — is both a tool and a check on your own method.
Write elements with correct capitals (Ca not ca), numbers for counts, and brackets for groups: H2O, CO2, C6H12O6, Ca(OH)2, Al2(SO4)3, Fe2(SO4)3.
How to Use It
- Type the formula with proper element symbols: first letter capital, second small (Fe, not FE).
- Use brackets normally: Ca(OH)2 means one calcium, and the (OH) group twice — the parser multiplies bracket contents by the number after the bracket, including nested counts like Al2(SO4)3.
- Read the breakdown: verify the atom counts match your formula before trusting the total — that table is the learning, not just the answer.
How It Works
A recursive-descent parser reads the formula: element symbols are looked up in an embedded table of standard atomic masses for all 118 elements, numbers multiply the previous element or bracket group, and brackets recurse so groups within groups work. The total is the sum of every atom's mass, rounded to three decimals, matching the precision of school data booklets.
Frequently Asked Questions
Which atomic masses are used?
Standard atomic weights for all 118 elements (the same values as the Periodic Table tool here) — H 1.008, O 15.999, Ca 40.078 and so on. Exam boards sometimes round differently (H = 1, O = 16); small differences in the last decimal are that rounding, not an error.
Does it handle hydrates like CuSO4·5H2O?
Not the dot notation — calculate the two parts separately (CuSO4 and 5 × H2O) and add them. Everything else — brackets, nested groups, long organic formulas like C6H12O6 — works.
Why did it reject my formula?
Almost always capitalisation: element symbols are case-sensitive in chemistry, so 'co' reads as cobalt-plus-oxygen confusion — the parser reports unknown elements by name so you can spot the slip.