Skip to content

Molar Mass Calculator

Molar mass is the mass of one mole of a substance in grams per mole, and for a compound it is the sum of the atomic weights of every atom in its formula. Type a chemical formula — NaCl, H2SO4, C6H12O6, or a hydrate such as CuSO4·5H2O — and this calculator parses it, adds up the standard atomic weights, and returns the molar mass along with the atom count for each element and its percent composition.

Every concentration you prepare downstream depends on this number. The molarity calculator cannot turn grams into moles without a molecular weight, and the stock solution calculator cannot tell you what to weigh without one either. Rather than look up a formula weight each time — and risk grabbing the anhydrous value for a hydrated salt — you can derive it here from the formula on the bottle. It is part of our laboratory calculator set.

The arithmetic is trivial; the parsing is where tools fall down. A good molar mass calculator has to understand that Ca(NO3)2 contains two nitrogen atoms and six oxygens, that CuSO4·5H2O carries five whole water molecules, and that "CO" is carbon monoxide while "Co" is cobalt. This one handles element symbols, counts, nested parentheses and brackets, and hydrate dots, then sums the CIAAW standard atomic weights published through NIST.

Molar Mass Calculator

Use element symbols and counts. Parentheses ( ) [ ] and hydrates with · are supported, e.g. Ca(NO3)2 or CuSO4·5H2O.

Molar mass180.156 g/mol
Mass for 1 L of a 1 M solution180.156 g
Total atoms24
Distinct elements3
Element composition of C6H12O6
ElementAtomsMass (g/mol)Mass %
O695.99453.28%
C672.06640.00%
H1212.0966.71%

How to use the molar mass calculator

Type the formula using standard element symbols, with the first letter capitalised and any second letter lowercase. Counts go after the symbol they apply to: H2O, C6H12O6, NaCl.

Group repeated units with parentheses or brackets and put the multiplier after the closing bracket: Ca(NO3)2, K4[Fe(CN)6], (NH4)2SO4.

Write hydrates with a middle dot and the number of waters in front: CuSO4·5H2O. A period or asterisk also works (CuSO4.5H2O). The five multiplies the entire H2O that follows.

Press **Calculate**. The primary card shows the molar mass in g/mol; the breakdown table lists each element, how many atoms of it are present, the mass it contributes and its percent of the total — useful for checking a label or reporting composition.

Molar Mass formula

M = Σᵢ (nᵢ × Aᵢ)
mass % of element i = (nᵢ × Aᵢ) / M × 100
M = molar mass (g/mol) · nᵢ = number of atoms of element i in the formula · Aᵢ = standard atomic weight of element i (g/mol)

Variables and units

SymbolMeaningUnit
MMolar mass (molecular/formula weight)g/mol
nᵢAtom count of element i
AᵢStandard atomic weight of element ig/mol

How molar mass is calculated

  1. Parse the formula into element counts, expanding parentheses, bracket multipliers and hydrate groups.
  2. Look up the standard atomic weight of each element (CIAAW 2021, via NIST).
  3. Multiply each atomic weight by its atom count and sum the products to get the molar mass.
  4. For composition, divide each element’s contributed mass by the total and multiply by 100.

Worked laboratory examples

Example 1 — Sodium chloride, NaCl

Given: Na = 22.99 g/mol · Cl = 35.45 g/mol

  1. M = 22.99 + 35.45
  2. M = 58.44 g/mol

Result: 58.44 g/mol — so 1 L of 1 M NaCl needs 58.44 g

Example 2 — Glucose, C6H12O6

Given: C = 12.011 · H = 1.008 · O = 15.999

  1. C: 6 × 12.011 = 72.066
  2. H: 12 × 1.008 = 12.096
  3. O: 6 × 15.999 = 95.994
  4. M = 72.066 + 12.096 + 95.994 = 180.156

Result: 180.16 g/mol

Example 3 — Copper(II) sulfate pentahydrate, CuSO4·5H2O

Given: CuSO4 = 63.546 + 32.06 + 4 × 15.999 = 159.60 · H2O = 18.015

  1. waters: 5 × 18.015 = 90.075
  2. M = 159.60 + 90.075 = 249.68

Result: 249.68 g/mol — about 90 g/mol more than the anhydrous salt

How to interpret the result

The molar mass is the bridge between the balance and the mole. A result of 180.16 g/mol for glucose means one mole weighs 180.16 g, so 180.16 g dissolved to 1 L is exactly 1 M. That single number is also the grams you would weigh for 1 L of a 1 M stock — the calculator repeats it as "grams per mole per litre" to make the link explicit.

The percent composition is a sanity check and a reporting tool. If the oxygens in H2SO4 do not come to roughly 65% of the mass, something was parsed wrong. It also lets you convert between a compound and one of its elements, which matters when a protocol specifies concentration "as nitrogen" or "as chloride" rather than as the whole salt.

Assumptions

  • Atomic weights are the standard terrestrial averages (CIAAW 2021), not a specific isotope composition.
  • The formula you enter is the exact species you weigh, including any waters of hydration written explicitly.
  • Parsing is case-sensitive and assumes neutral, conventional formula notation.

Limitations

  • Isotopically labelled or enriched compounds (¹³C, ²H, ¹⁵N) differ from the average atomic weight and are not detected from plain notation.
  • The parser does not interpret charge, stereochemistry, condensed structural forms or ambiguous dot notation beyond simple hydrate multipliers.
  • Different atomic-weight tables round differently, so the third or fourth significant figure may vary from another source — fine for bench work, relevant for high-precision analytics.

Common mistakes

  • Using the anhydrous molar mass for a hydrated salt, or vice versa. CuSO4 (159.6) and CuSO4·5H2O (249.7) are not interchangeable — check the bottle.
  • Writing "CO" when you mean cobalt ("Co"), or "Hg" as "HG". Case decides the element.
  • Forgetting to multiply every atom inside a parenthesis by the trailing subscript: Ca(NO3)2 has six oxygens, not three.
  • Reading a hydrate dot as a decimal point. CuSO4·5H2O is not "CuSO4.5" — it is one CuSO4 plus five whole waters.

FAQ

What is the difference between molar mass and molecular weight?

For practical lab work they are the same number in g/mol. Strictly, molar mass is the mass per mole of a substance, while molecular (or formula) weight is the mass of one molecule relative to 1/12 of carbon-12. Both are summed from atomic weights and both are reported in g/mol here.

How do I calculate molar mass from a formula?

Count the atoms of each element, multiply each count by that element’s standard atomic weight, and add the results. For glucose, 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol.

How are hydrates handled?

Write the water of hydration after a middle dot with its multiplier, for example CuSO4·5H2O. The calculator multiplies the entire H2O unit by 5 and adds it to the anhydrous mass, giving 249.68 g/mol.

Which atomic weights does this use?

The CIAAW 2021 standard atomic weights as published through NIST — for example H 1.008, C 12.011, N 14.007, O 15.999, Na 22.99, Cl 35.45. These are the conventional values used for ordinary stoichiometry.

Why does my molar mass differ slightly from another website?

Rounding. Sources keep different numbers of significant figures for the atomic weights, so values can differ in the third or fourth digit. The difference is negligible for preparing solutions but worth noting for high-precision analytical work.

How do I go from molar mass to a solution?

Feed the result into the molarity or stock solution calculator. The molar mass in g/mol is exactly the number of grams needed to make 1 L of a 1 M solution; for other concentrations multiply by the target molarity and the volume in litres.

Scientific Sources

External links open in a new tab and carry rel="nofollow". We cite primary references (NIST, NIH/NCBI, peer-reviewed papers) and established manufacturer technical documentation (NEB, Thermo Fisher, Promega, IDT). Calculated results are estimates; your protocol and manufacturer guidance take precedence.

Last reviewed: 2026-09 · Method version: 1.0