How to use the molecular weight calculator
- Type the chemical formula. Start each element symbol with a capital letter and follow it with the number of atoms: H2O, C6H12O6, NaHCO3.
- Use parentheses or brackets for groups that repeat: Ca(OH)2, Al2(SO4)3, K4[Fe(CN)6].
- For hydrates and adducts, separate the parts with a middle dot, an asterisk or a period, with the count in front: CuSO4·5H2O, CuSO4*5H2O or CuSO4.5H2O.
- Charges are ignored, since electrons add almost no mass: SO4^2-, SO4 2- and NH4+ all work.
- Read the molar mass and the element-by-element table.
How molar mass is calculated
The molar mass is the sum of the atomic weights of all the atoms in the formula:
The calculator expands the brackets first. In Ca3(PO4)2 the group PO4 counts twice, so there are 2 phosphorus and 8 oxygen atoms. A number in front of a hydrate part multiplies that whole part. The atomic weights are the IUPAC abridged standard atomic weights from the Commission on Isotopic Abundances and Atomic Weights (CIAAW, 2024 table), which revised zirconium, gadolinium and lutetium in 2024. Elements with no stable isotopes, such as technetium, radon and plutonium, have no standard atomic weight; for these the calculator uses the mass number of a long-lived isotope and marks it with an asterisk.
Worked example
The default formula is glucose, C6H12O6:
| Element | Atoms | Atomic weight | Mass (g/mol) | Mass % |
|---|---|---|---|---|
| C | 6 | 12.011 | 72.066 | 40.00% |
| H | 12 | 1.0080 | 12.096 | 6.71% |
| O | 6 | 15.999 | 95.994 | 53.28% |
| Total | 24 | 180.156 | 100% |
So the molar mass is 180.156 g/mol: one mole of glucose (6.022 × 10²³ molecules) weighs 180.156 grams, and a single molecule weighs 180.156 daltons, or 2.99 × 10⁻²² g.
For copper(II) sulfate pentahydrate, CuSO4·5H2O: 63.546 + 32.06 + 4 × 15.999 = 159.602 for the salt, plus 5 × 18.015 = 90.075 for the water, giving 249.677 g/mol. Water makes up 36.08% of the crystal's mass, which is why it matters when you weigh out a hydrate.
Formula examples
| You type | Read as | Molar mass (g/mol) |
|---|---|---|
| H2O | water | 18.015 |
| NaCl | sodium chloride | 58.44 |
| Ca3(PO4)2 | calcium phosphate | 310.174 |
| K4[Fe(CN)6] | potassium ferrocyanide | 368.345 |
| CuSO4*5H2O | copper sulfate pentahydrate | 249.677 |
| SO4^2- | sulfate ion | 96.056 |
Capitals matter: Co is cobalt, while CO is carbon monoxide. Write polyatomic ions with the charge after a caret or a space; PO43- would be read as PO with 43 oxygen atoms, while PO4^3- is read correctly as phosphate.
How precise is the result?
The abridged atomic weights are given to about five significant figures, so most results are good to within about 0.01 g/mol. A few elements, such as lithium, boron, sulfur, chlorine and lead, vary in nature with the source of the sample, and their abridged values carry a wider uncertainty. Older textbooks list slightly different values, for example 12.0107 for carbon or 1.00794 for hydrogen, so answers may differ in the second or third decimal place. Use the result in the molarity calculator to work out how many grams to weigh for a solution.
Frequently asked questions
Is molecular weight the same as molar mass?
In practice, yes. Molar mass is measured in grams per mole, while molecular weight (relative molecular mass) is the same number without units. A dalton is one-twelfth the mass of a carbon-12 atom, so a molecule's mass in daltons equals its molar mass in g/mol.
How do I enter a hydrate?
Put a dot, asterisk or period between the salt and the water, with the number of water molecules in front: CuSO4*5H2O or MgSO4.7H2O. Each part is calculated and the results are added together.
Why does the calculator say an element is unknown?
Element symbols must start with a capital letter followed by lowercase letters, such as Cl or Fe. "CL" is read as carbon plus an unknown element L, and "cl" isn't read at all. Check the capitals and the spelling of each symbol.
Does it handle charges and ions?
Yes. The charge is dropped because the mass of the electrons gained or lost is tiny, about 0.00055 g/mol each. A single ion written like Fe3+ or Ca2+ is read as one atom with a charge.
Related calculators
- Molarity Calculator — Molarity from mass and volume, the mass of solute to weigh out, the volume needed, and C₁V₁ = C₂V₂ dilutions.
- Density Calculator — Solve ρ = m ÷ V for density, mass or volume in metric or US units, with common material densities.
- Mass Calculator — Mass from density and volume, or from a weight and the gravity where it was measured, in any unit.
Results are calculated in your browser. Double-check anything important before you rely on it. See our disclaimer.