Molar Mass Calculator (Molecular Weight)

Enter a chemical formula — brackets, hydrates and ions included — and get its molar mass with an atom-by-atom breakdown and mass percentages.

Case matters (Co is cobalt, CO is carbon monoxide). Use ( ) [ ] { } for groups and · , * or . for hydrates.
Formula
CuSO4·5H2O
Hill formula
CuH10O9SC, then H, then alphabetical
Molecular mass
249.677 u (Da)mass of one formula unit in daltons
Mass of one formula unit
4.14598 × 10⁻²² g
Atoms per formula unit
21
Distinct elements
4
Molar mass249.677 g/molformula CuSO4·5H2O

Show the work

  1. Count the atoms of each element in CuSO4·5H2O (multiply through brackets and hydrate coefficients).
  2. Cu: 1 × 63.546 g/mol = 63.546 g/mol
  3. S: 1 × 32.06 g/mol = 32.06 g/mol
  4. O: 9 × 15.999 g/mol = 143.991 g/mol
  5. H: 10 × 1.008 g/mol = 10.08 g/mol
  6. Add the subtotals: 63.546 + 32.06 + 143.991 + 10.08 = 249.677 g/mol
Composition by element
ElementSymbolAtomsAtomic weight (g/mol)Subtotal (g/mol)Mass %
CopperCu163.54663.54625.451%
SulfurS132.0632.0612.841%
OxygenO915.999143.99157.671%
HydrogenH101.00810.084.037%
Total21249.677100.000%

Molar mass is the mass of one mole of a substance, and almost every lab calculation starts with it. Type a formula and this calculator counts every atom, multiplies by the IUPAC atomic weights and adds the results, showing each subtotal so you can check it.

How to use the molar mass calculator

  1. Type the formula into Chemical formula, for example C6H12O6, Ca(OH)2 or CuSO4*5H2O.
  2. Read the Molar mass in g/mol, followed by the cleaned formula, the Hill formula (C, then H, then alphabetical), the molecular mass in daltons, the mass of one formula unit and the atom counts.
  3. Open Show the work for the atom count of each element times its atomic weight, and use the Composition by element table for subtotals and mass percent.

How the formula is read

  • Case matters. A symbol is one capital letter, optionally followed by one lowercase letter. Co is cobalt; CO is carbon monoxide.
  • Groups. Parentheses, square brackets and braces can be nested; a number after the closing bracket multiplies everything inside, so K4[Fe(CN)6] contains 6 C and 6 N.
  • Hydrates and adducts. A middle dot (·), an asterisk or a period splits the formula into parts. A number at the start of a part multiplies the whole part, so CuSO4·5H2O adds 10 H and 5 O. A leading number works at the very start too: 2H2O gives 36.030 g/mol.
  • Subscripts must be whole numbers (zero is rejected); Unicode subscripts such as H₂O are accepted.
  • Isotopes. D (deuterium) and T (tritium) use their nuclide masses, so heavy water D2O comes out at 20.027 g/mol.
  • Labels. A trailing state symbol, (s), (l), (g) or (aq), is ignored.

Ion charges

A charge written after a caret (SO4^2-), as superscripts (Fe³⁺), after a space (SO4 2-) or right after a closing bracket ([Fe(CN)6]3-) is removed, and a note says so. A bare trailing sign is removed too, but the digits in front of it stay as a subscript. That is right for NH4+, which is read as NH₄ (18.039 g/mol), but SO42- would be read as 42 oxygen atoms. When the digit is the charge, use a caret: SO4^2-.

Molar mass formula

M = Σ ni × Ar,i  g/mol

Here ni is the number of atoms of element i in one formula unit and Ar,i is its standard atomic weight. The mass of a single formula unit is M ÷ NA, with the Avogadro constant NA = 6.02214076 × 10²³ mol⁻¹.

Worked example: copper(II) sulfate pentahydrate

CuSO4·5H2O contains 1 Cu, 1 S, 4 + 5 = 9 O and 10 H.

Cu 1 × 63.546 = 63.546 · S 1 × 32.06 = 32.06 · O 9 × 15.999 = 143.991 · H 10 × 1.008 = 10.08

M = 63.546 + 32.06 + 143.991 + 10.08 = 249.677 g/mol

That is 21 atoms per formula unit, one unit weighs 4.146 × 10⁻²² g, and copper makes up 25.451% of the mass.

Molar masses of common compounds

Compound Formula Molar mass (g/mol)
Ammonia NH₃ 17.031
Water H₂O 18.015
Carbon dioxide CO₂ 44.009
Ethanol C₂H₅OH 46.069
Sodium chloride NaCl 58.440
Acetic acid CH₃COOH 60.052
Sodium bicarbonate NaHCO₃ 84.006
Sulfuric acid H₂SO₄ 98.072
Calcium carbonate CaCO₃ 100.086
Glucose C₆H₁₂O₆ 180.156
Caffeine C₈H₁₀N₄O₂ 194.194
Sucrose C₁₂H₂₂O₁₁ 342.297

Which atomic weights are used

The values come from IUPAC’s Commission on Isotopic Abundances and Atomic Weights (CIAAW). Because the isotope mix of some elements varies with where a sample came from, CIAAW lists their standard atomic weight as an interval: hydrogen is [1.00784, 1.00811] and carbon [12.0096, 12.0116]. For everyday work it also publishes a single conventional value (H 1.008, C 12.011, O 15.999, Cl 35.45), which is what the calculator uses. So treat the last decimal of a result as convention, not as extra precision.

Elements with no stable isotopes and no characteristic natural isotope mix, such as technetium and plutonium, have no standard atomic weight. For these the calculator uses the mass number of the longest-lived isotope, shown in brackets as [97] or [244], and adds a note. Thorium, protactinium and uranium do have standard values.

Molar mass, molecular weight and formula mass

All three usually give the same number. Molar mass is in g/mol. Molecular weight (relative molecular mass) is a ratio to one-twelfth of a carbon-12 atom’s mass, so it has no unit. The mass of one molecule is in daltons (Da, or u): one water molecule is about 18.015 Da. For ionic solids such as NaCl, which are lattices rather than molecules, chemists say formula mass. Since the 2019 SI redefinition, the number in g/mol and the number in Da differ by less than one part in a billion.

To turn a molar mass into moles or grams, use the grams to moles calculator. The percent composition calculator also works backward from percentages to a formula.

Frequently asked questions

How do I enter a hydrate such as copper sulfate pentahydrate?

Put a middle dot, an asterisk or a period between the salt and the water, with the number of water molecules in front: CuSO4·5H2O, CuSO4*5H2O and CuSO4.5H2O all give 249.677 g/mol. The leading 5 multiplies every atom in the water part.

Why do Co and CO give different answers?

Capital letters start a new element symbol. Co is a single cobalt atom (58.933 g/mol), while CO is one carbon plus one oxygen, carbon monoxide (28.010 g/mol). Entirely lowercase input such as nacl is rejected instead of guessed.

Is molecular weight the same thing as molar mass?

They share the same number but not the same unit. Molar mass is grams per mole (water is 18.015 g/mol); molecular weight, or relative molecular mass, is a pure number (18.015); and the mass of one molecule is 18.015 daltons.

Does the charge on an ion change its molar mass?

Only by the mass of the electrons gained or lost, about 0.00055 g/mol per electron, which is far below the uncertainty of most atomic weights. The calculator drops the charge and says so in a note, so SO4^2- gives 96.056 g/mol.

Which atomic weights does the calculator use?

The conventional standard atomic weights published by IUPAC's Commission on Isotopic Abundances and Atomic Weights (CIAAW), such as H 1.008, C 12.011 and O 15.999. Radioactive elements without a standard value use the mass number of their longest-lived isotope, shown in brackets.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.