← All blog posts

How to use a molecular weight calculator

WhiteUI · A plain-English guide to the Molecular Weight Calculator

The Molecular Weight Calculator takes a chemical formula and returns the molecular weight with a full breakdown, so you can see where every part of the answer comes from. It runs entirely in your browser and needs nothing but the formula. No account, no download and no data leaves the page — the calculation happens in your browser, and the breakdown is there to be checked, not just believed. Here is how to use it, step by step.

Three steps to use the calculator: type the formula, read the breakdown table, check the answer in grams per mole
Three steps: type the formula, check the breakdown table, read the answer in g/mol.

Step 1: type the formula

Type the formula into the box, using capital letters for element symbols: H2SO4, C6H12O6, NaCl. The calculator accepts the twenty elements it covers — H, C, N, O, S, P, Cl, Na, K, Ca, Fe, Mg, Zn, Br, I, F, Al, Si, Cu and Mn — which covers the formulas used in most school and college work. The default example, H2SO4, is already filled in when the page loads, so you can see a finished answer before typing anything. Leave the box empty and it waits; type something it cannot read and it tells you what went wrong instead of guessing.

Step 2: use brackets for groups

For a formula with a repeated group, write the group in brackets with its count after it, like Ca(OH)2. The calculator multiplies everything inside the brackets by that count, so Ca(OH)2 comes out as one calcium, two oxygens and two hydrogens, weighing 74.09 g/mol. Writing CaOH2 instead would give a different, wrong answer, because the 2 would only apply to the hydrogen — brackets are the only way to say the whole group repeats.

Step 3: read the breakdown

The answer appears at once, with a table showing each element, how many atoms of it there are, its atomic weight, and its total mass. For sulphuric acid the table reads: H × 2 at 1.008 = 2.02, S × 1 at 32.065 = 32.07, O × 4 at 15.999 = 64.00, and the headline answer 98.08 g/mol. A bar under the answer shows each element’s share of the total, so you can see at a glance that oxygen does most of the weighing in H2SO4. If a formula contains an element the calculator does not cover, the table stays empty and a message names the unknown element instead of showing a wrong number.

What it does not do

It does not handle charges or ions — Na+ is just Na for this purpose — and it does not cover elements outside its list of twenty, so a formula with an unusual element will report it as unknown rather than guess. It also does not convert grams to moles for you; for that, divide the grams you have by the molecular weight. Water is the easiest check: 90.075 g ÷ 18.015 g/mol = 5 mol.

Try the tool page’s own examples

The calculator page works through two examples of its own: sulphuric acid at 98.08 g/mol and glucose at 180.16 g/mol. Type H2SO4 into the box and compare each line of the breakdown table with the hand working — H × 2 at 1.008, S × 1 at 32.065, O × 4 at 15.999 — then do the same for C6H12O6. When your lines and the table’s lines agree, you know both the tool and your method; when they differ, the line that disagrees is where the mistake lives.

Check the answer yourself

Try H2O first: the calculator should show 18.015 g/mol. Then try glucose, C6H12O6, which should read 180.16 g/mol. If either differs, check the formula you typed — a lowercase letter or a missing subscript is the usual cause. The calculator and your hand working should always agree to two decimal places, and the breakdown table shows you exactly where to look when they do not.

Frequently asked questions

What formulas can I type in?

Any formula built from the twenty covered elements, with subscripts and brackets. H2SO4, C6H12O6, Ca(OH)2 and NaCl all work.

Do I need to use subscript characters?

No. Type plain numbers: H2O, not H₂O. The calculator reads the digits as counts.

Why does it say “unknown element”?

The formula contains an element outside the covered list, or a typo. Check the spelling — “CL” is not chlorine, “Cl” is — and try again.

Does the calculator save my formulas?

No. Everything runs in your browser and nothing is sent anywhere. Closing the page clears it.

More guides on the Molecular Weight Calculator

Try it yourself

Try the Molecular Weight Calculator — free, in your browser.

Open the Molecular Weight Calculator