Loona Automation logoLoona Study Tools
Home › Molar Mass Calculator

Molar Mass Calculator — Formula In, g/mol Out

In short: type a chemical formula exactly as you would write it — element symbols, subscript numbers, and brackets for groups like (OH)2 or (SO4)3 — and get the molar mass in grams per mole, with a table showing every element's contribution.

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.

🔒 Private by design: formulas are parsed on this device; nothing is stored or uploaded.

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

  1. Type the formula with proper element symbols: first letter capital, second small (Fe, not FE).
  2. 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.
  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.

More Study Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.