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
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
Variables and units
| Symbol | Meaning | Unit |
|---|---|---|
| M | Molar mass (molecular/formula weight) | g/mol |
| nᵢ | Atom count of element i | — |
| Aᵢ | Standard atomic weight of element i | g/mol |
How molar mass is calculated
- Parse the formula into element counts, expanding parentheses, bracket multipliers and hydrate groups.
- Look up the standard atomic weight of each element (CIAAW 2021, via NIST).
- Multiply each atomic weight by its atom count and sum the products to get the molar mass.
- 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
- M = 22.99 + 35.45
- 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
- C: 6 × 12.011 = 72.066
- H: 12 × 1.008 = 12.096
- O: 6 × 15.999 = 95.994
- 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
- waters: 5 × 18.015 = 90.075
- 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?
How do I calculate molar mass from a formula?
How are hydrates handled?
Which atomic weights does this use?
Why does my molar mass differ slightly from another website?
How do I go from molar mass to a solution?
Scientific Sources
- NIST Chemistry WebBook · Tier 1 source
- CIAAW — Standard Atomic Weights · Tier 1 source
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