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.

Try: , , , , , , ,

How it works

For a compound with formula X_aY_b…, the molar mass is the sum of atomic weights weighted by counts:

MW=iniAiMW = \sum_i n_i \, A_i

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

FormulaMW (g/mol)Notes
NaCl58.44Sodium chloride, physiological saline base
KCl74.55Potassium chloride
NaOH40.00Sodium hydroxide, hygroscopic
HCl (aq, concentrated)36.46~12 M in solution
H2SO498.08Concentrated is ~18 M
Na2CO3105.99Anhydrous sodium carbonate
NaHCO384.01Sodium bicarbonate
Tris (base)121.14Buffer, pKa 8.06
HEPES238.30Buffer, pKa 7.55
D-Glucose180.16Anhydrous
Sucrose342.30
EDTA (free acid)292.24Chelator; Na2EDTA·2H2O is 372.24
CuSO4·5H2O249.68Blue vitriol; anhydrous is 159.61
MgSO4·7H2O246.47Epsom 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. Co is cobalt, CO is carbon monoxide. co and CO2 are 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 CH3OH not MeOH; C6H5CH3 not PhCH3. 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

Sum contributions element by element
H
2 × 1.008 = 2.016
S
1 × 32.06 = 32.06
O
4 × 15.999 = 63.996
  1. Formula
  2. Substitute
  3. 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.

  4. Result
Problem 2 Intermediate What is the molar mass of Al2(SO4)3?

Answer: 342.15 g/mol

Distribute the ×3 across the parenthesised group
Al
2 × 26.982 = 53.964
S
3 × 32.06 = 96.18
O
12 × 15.999 = 191.988
  1. Formula
  2. Substitute
  3. Result
Problem 3 Intermediate What is the molar mass of CuSO4·5H2O (the pentahydrate)?

Answer: 249.68 g/mol

Include the five water molecules in the mass
CuSO4 (anhydrous)
63.546 + 32.06 + 4·15.999 = 159.61
5 H2O
5 × 18.015 = 90.075
  1. Formula
  2. Substitute
  3. Note

    The five waters count toward the mass you weigh out. Using the anhydrous value (159.61) would under-weigh by 36 %.

  4. Result
Problem 4 Hard What is the molar mass of K3[Fe(CN)6] (potassium ferricyanide)?

Answer: 329.24 g/mol

Nested brackets: 6 cyanides on the iron, ×3 potassium
K
3 × 39.098 = 117.294
Fe
1 × 55.845 = 55.845
C
6 × 12.011 = 72.066
N
6 × 14.007 = 84.042
  1. Formula
  2. Substitute
  3. 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

Last updated: .