Molecular Weight Calculator

Type in a formula — a simple one like NaCl, one with parentheses like Ca(OH)2, or a hydrate like CuSO4·5H2O — and this tool parses it, looks up each element's standard atomic weight, and adds it all up for you, with a full element-by-element breakdown.

Start calculating

For personal planning and general reference — verify important results when needed.

Enter Formula

Use proper capitalization: H2O (not h2o). Use · or * for hydrates.

Enter a chemical formula (e.g. H2O, C6H12O6, Ca(OH)2) and click Calculate to get the molecular weight, element breakdown, and step-by-step solution.

What molecular weight actually tells you

Every atom on the periodic table has a mass, and every molecule is just a fixed number of atoms bonded together. Add up the atomic masses of everything in the formula and you get the molecular weight — the mass of one mole (6.022×10²³ molecules) of that substance, expressed in grams per mole. It's the number that lets a chemist go from a formula written on paper to an actual amount they can weigh out on a scale.

This matters constantly in a lab: reactions are planned in moles because that's how atoms combine, but scales measure grams. Molecular weight is the conversion factor between the two. Get it wrong and a solution ends up twice as concentrated as intended, or a reaction runs out of one reagent halfway through.

Working it out by hand

The process is the same every time: break the formula into elements and their counts, look up each element's atomic weight, multiply, then add everything together. Water is the simplest example.

H2O = (2 × H) + (1 × O)

= (2 × 1.008) + (1 × 15.999)

= 2.016 + 15.999 = 18.015 g/mol

Parentheses work the same way as in algebra — whatever's inside gets multiplied by the subscript that follows the closing bracket, then the result folds into the total. Calcium hydroxide, Ca(OH)2, has two hydroxide groups attached to one calcium atom:

Ca(OH)2 = Ca + 2 × (O + H)

= 40.078 + 2 × (15.999 + 1.008)

= 40.078 + 31.998 + 2.016 = 74.092 g/mol

For a bigger molecule like glucose, C6H12O6, the same rule just repeats for each element: six carbons, twelve hydrogens, six oxygens, each multiplied by its own atomic weight and summed. This calculator does exactly that arithmetic instantly, and shows the per-element breakdown so you can check the work.

Hydrates: when water is part of the crystal

Some compounds crystallize with water molecules locked into their structure — copper sulfate pentahydrate, CuSO4·5H2O, is a classic example, and the bright blue crystals you might recognize from a chemistry set. The dot (or a raised middle dot, ·) means "plus, separately": calculate the anhydrous compound and the water as two blocks, then add them.

CuSO4 = 63.546 + 32.066 + (4 × 15.999) = 159.608 g/mol

5H2O = 5 × 18.015 = 90.075 g/mol

CuSO4·5H2O = 159.608 + 90.075 ≈ 249.68 g/mol

This is why the anhydrous form and the hydrate form of the same compound have noticeably different molar masses — the water isn't a rounding error, it's roughly 36% of the crystal's total weight in this case. Heat a hydrate enough and it loses that water, leaving the lighter anhydrous powder behind.

Why atomic weights are decimals, not whole numbers

A periodic table lists chlorine at 35.453, not a tidy 35 or 37 — and that's not imprecision. Chlorine occurs naturally as a mix of isotopes, mostly chlorine-35 and chlorine-37, and the listed value is the abundance-weighted average across every atom you'd encounter in nature. IUPAC and NIST maintain these standard atomic weights, and the calculator uses those published values for every element, so results line up with what you'd get from a printed periodic table or a lab reference sheet.

Turning molecular weight into grams and moles

Once you know the molar mass, converting between grams and moles is one division or multiplication:

moles = mass (g) ÷ molar mass (g/mol)

mass (g) = moles × molar mass (g/mol)

That single relationship underpins solution preparation — pairing this calculator with a molarity calculator lets you go straight from a target concentration to the exact mass of solid you need to weigh out — as well as stoichiometry, where every reactant and product in a balanced equation gets converted through its own molar mass to figure out yields and leftover reagent.

Sources and further reading

Frequently Asked Questions

What is molecular weight?

Molecular weight (molar mass) is the mass of one mole of a molecule, usually in grams per mole (g/mol). It equals the sum of atomic weights of all atoms in the formula.

Where do atomic weights come from?

Standard atomic weights are published by IUPAC and NIST based on isotope abundances. Periodic-table values are weighted averages, not single-isotope masses.

How is molecular weight used in chemistry?

Convert between grams and moles: moles = mass ÷ molar mass. Stoichiometry, solution prep, and gas-law calculations all depend on correct molar mass.

What is the difference between formula weight and molecular weight?

Formula weight applies to ionic compounds with no discrete molecules. Molecular weight usually refers to covalent molecules — both are expressed in g/mol.

How do I use this molecular weight calculator?

Enter a chemical formula (e.g., H2O, C6H12O6), then click Calculate. Atomic composition, total molar mass, and element breakdown appear in the results.

How do I enter a hydrate formula like CuSO4·5H2O?

Type the anhydrous formula, then a dot (·) or asterisk (*), then the number of water molecules and H2O — for example CuSO4*5H2O. The calculator adds the contribution of the water separately, multiplied by that coefficient, on top of the base compound.

More utility calculators