What Molecular Weight Is and When to Use It
Molecular weight (also called molar mass) is the mass of one mole of a compound, expressed in grams per mole (g/mol). It is calculated by adding up the atomic masses of every atom in the compound's chemical formula, each multiplied by how many times that atom appears. Atomic masses are weighted averages of an element's naturally occurring isotopes, which is why they're rarely round numbers — carbon is 12.011, not exactly 12, because a small fraction of natural carbon is the heavier carbon-13 isotope.
You need molecular weight any time you convert between mass and moles: preparing a solution of known molarity, scaling up a reaction from a lab-scale recipe, converting a recipe's grams into moles for stoichiometry, or checking a compound's purity by comparing a measured mass to the theoretical yield. This calculator parses a standard chemical formula, including parenthesized groups like Ca(OH)2, and sums the atomic contributions of every element automatically.
How the Calculation Works
For a formula, the molecular weight is:
Molecular weight = Σ (atomic mass of element × number of atoms of that element)
where the sum runs over every distinct element in the formula. Subscripts after an element symbol multiply that element's atom count; a number after a closing parenthesis multiplies every element inside that group. No subscript means one atom (or one copy of the group).
Worked Example: Glucose (C6H12O6)
Using the calculator's default formula, glucose, C6H12O6:
- Carbon: 6 atoms × 12.011 g/mol = 72.066 g/mol
- Hydrogen: 12 atoms × 1.008 g/mol = 12.096 g/mol
- Oxygen: 6 atoms × 15.999 g/mol = 95.994 g/mol
Adding the three subtotals: 72.066 + 12.096 + 95.994 = 180.156 g/mol, which matches both the calculator's output and glucose's accepted molar mass (commonly rounded to 180.16 g/mol). For a compound with a parenthesized group, calcium hydroxide Ca(OH)2 works the same way: calcium contributes 40.078 g/mol, and the (OH)2 group contributes 2 × (15.999 + 1.008) = 34.014 g/mol, for a total of 74.092 g/mol.
Common Mistakes / How to Interpret the Result
- Case-sensitive element symbols. Chemical symbols are always one capital letter optionally followed by one lowercase letter — "Co" is cobalt, but "CO" is carbon monoxide (one carbon, one oxygen). Typing the wrong case changes the entire result.
- Forgetting subscripts multiply, not add. H2O means 2 hydrogen atoms and 1 oxygen atom in a single molecule, not "hydrogen plus 2 oxygens" — always read a subscript as "this many atoms of the element immediately before it."
- Missing parentheses for repeated groups. A compound like ammonium sulfate, (NH4)2SO4, needs the parentheses to show that the entire NH4 group is doubled, not just the hydrogen or nitrogen alone.
- Confusing molecular weight with formula weight for ionic compounds. Ionic solids like NaCl don't exist as discrete molecules, but chemists still compute a "formula weight" the same way, treating the formula unit as if it were a molecule — the arithmetic is identical either way.