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.