Molar Mass Calculator — Formula to g/mol
Every stoichiometry, dilution, and buffer calculation starts with a molar mass. Type the formula in Hill notation and the calculator returns MW in g/mol plus a per-element breakdown so you can double-check the arithmetic.
Molar Mass Calculator
Type a chemical formula in Hill notation. Case-sensitive: "Na" not "na" or "NA". Parentheses, brackets, hydrates (·, *, .) and a leading integer coefficient are all supported.
Molar mass
g/mol
| Element | Count | Atomic weight (g/mol) | Contribution (g/mol) | Mass % |
|---|
Atomic weights use the IUPAC 2021 conventional single-value form.
How it works
For a compound with formula X_aY_b…, the molar mass is the sum of atomic weights weighted by counts:
where n_i is the number of atoms of element i in the formula unit and A_i is that element’s atomic weight (g/mol). The calculator uses the IUPAC 2021 conventional atomic weights — the single-value form recommended for teaching and general lab use.
Parentheses and brackets multiply through: Ca(OH)2 = one Ca + 2×(O+H) = one Ca + 2 O + 2 H. Hydrate separators (·, *, .) join anhydrous salt to its bound waters: CuSO4·5H2O = one CuSO4 + 5×H2O. A leading integer treats the whole formula as a coefficient: 3H2O = 6 H + 3 O.
Common lab reagents
| Formula | MW (g/mol) | Notes |
|---|---|---|
| NaCl | 58.44 | Sodium chloride, physiological saline base |
| KCl | 74.55 | Potassium chloride |
| NaOH | 40.00 | Sodium hydroxide, hygroscopic |
| HCl (aq, concentrated) | 36.46 | ~12 M in solution |
| H2SO4 | 98.08 | Concentrated is ~18 M |
| Na2CO3 | 105.99 | Anhydrous sodium carbonate |
| NaHCO3 | 84.01 | Sodium bicarbonate |
| Tris (base) | 121.14 | Buffer, pKa 8.06 |
| HEPES | 238.30 | Buffer, pKa 7.55 |
| D-Glucose | 180.16 | Anhydrous |
| Sucrose | 342.30 | |
| EDTA (free acid) | 292.24 | Chelator; Na2EDTA·2H2O is 372.24 |
| CuSO4·5H2O | 249.68 | Blue vitriol; anhydrous is 159.61 |
| MgSO4·7H2O | 246.47 | Epsom salt |
Values from PubChem and IUPAC 2021 atomic weights. If a bottle label disagrees, trust the label — atomic-weight uncertainty is real at 4+ sig figs.
Common pitfalls
- Case matters.
Cois cobalt,COis carbon monoxide.coandCO2are two very different things. The parser errors on lowercase-first symbols instead of guessing. - Hydrates aren’t optional. A “CuSO4” bottle labeled “pentahydrate” is 249.68 g/mol, not 159.61. If you use the anhydrous MW you’ll weigh 36 % too little.
- Organic shorthand isn’t supported. Write
CH3OHnotMeOH;C6H5CH3notPhCH3. Expanded formulas are unambiguous. - Charges are ignored. The formula mass of Na+ is the same as neutral Na (electron mass is ~0.0005 g/mol — well below our precision). Don’t include the charge in the input.
Practice problems
Attempt each on paper, then expand the worked solution to check your arithmetic and sig-figs.
Problem 1 Easy What is the molar mass of H2SO4?
Answer: 98.079 g/mol
- H
- 2 × 1.008 = 2.016
- S
- 1 × 32.06 = 32.06
- O
- 4 × 15.999 = 63.996
- Formula
- Substitute
- Note
Small discrepancy vs the PubChem 98.079 comes from IUPAC-2021 conventional atomic weights being slightly less precise than the isotopic-abundance-weighted mean; both are correct within measurement uncertainty.
- Result
Problem 2 Intermediate What is the molar mass of Al2(SO4)3?
Answer: 342.15 g/mol
- Al
- 2 × 26.982 = 53.964
- S
- 3 × 32.06 = 96.18
- O
- 12 × 15.999 = 191.988
- Formula
- Substitute
- Result
Problem 3 Intermediate What is the molar mass of CuSO4·5H2O (the pentahydrate)?
Answer: 249.68 g/mol
- CuSO4 (anhydrous)
- 63.546 + 32.06 + 4·15.999 = 159.61
- 5 H2O
- 5 × 18.015 = 90.075
- Formula
- Substitute
- Note
The five waters count toward the mass you weigh out. Using the anhydrous value (159.61) would under-weigh by 36 %.
- Result
Problem 4 Hard What is the molar mass of K3[Fe(CN)6] (potassium ferricyanide)?
Answer: 329.24 g/mol
- K
- 3 × 39.098 = 117.294
- Fe
- 1 × 55.845 = 55.845
- C
- 6 × 12.011 = 72.066
- N
- 6 × 14.007 = 84.042
- Formula
- Substitute
- Result
Frequently asked questions
- What's the difference between molar mass and molecular weight?
- In practice they're used interchangeably. Molar mass is the mass of one mole of a substance in g/mol; molecular weight (MW) is the dimensionless sum of atomic weights. For any real-world calculation the numeric values are identical, so this tool labels the output g/mol.
- How do I write a hydrate?
- Use ·, *, or . as the separator between the anhydrous formula and the water group, and prefix the water with the number of waters. Examples: CuSO4·5H2O, MgSO4*7H2O, Na2CO3.10H2O. Every one parses to the same result.
- Why is the case sensitive?
- Chemistry symbols are Capitalized: 'Co' is cobalt but 'CO' is carbon monoxide (C + O). If you type 'co' the parser can't tell what you meant, so it errors instead of guessing wrong. Same reason organic shorthand like 'Me' (methyl), 'Et' (ethyl), 'Ph' (phenyl) isn't supported — expand to the full formula.
- Does the calculator handle charges or isotopes?
- No. Charge is dropped in formula-mass calculations (an ion has the same molar mass as its neutral form, within a fraction of an electron mass we can ignore). Isotope notation like ^13C is rejected; the calculator uses the IUPAC conventional atomic weight for the natural-abundance mixture.
Sources
- IUPAC 2021 Standard Atomic Weights (conventional values)
- PubChem CID 962 — Water (18.015 g/mol)
- PubChem CID 5793 — D-Glucose (180.16 g/mol)
- PubChem CID 24463 — CuSO4·5H2O (249.68 g/mol)
- IUPAC Gold Book — Hill system
Last updated: .