Type a formula and get its molar mass, the contribution of each element and the mass fractions. Brackets and hydrates are understood: Ca₃(PO₄)₂, CuSO₄·5H₂O, K₄[Fe(CN)₆]. Subscripts may be typed as ordinary digits.
The atomic masses are the ones shown on the element pages, from the PubChem periodic table. For elements with no stable isotope, the mass number of the most stable one is used.
The arithmetic happens in your browser: the formula is not sent anywhere.
How to find the molar mass of a compound
The molar mass is the mass of one mole of a substance, in grams per mole. Numerically it equals the relative formula mass: add up the atomic masses of all the atoms in the formula. Each element's atomic mass is multiplied by the number of its atoms, the index, and the products are summed. The calculator above does exactly this, with the atomic masses shown on the element pages.
Worked examples
Sulfuric acid, H₂SO₄. Two hydrogens, one sulfur, four oxygens:
- H: 2 × 1.008 = 2.016
- S: 1 × 32.07 = 32.07
- O: 4 × 15.999 = 63.996
The sum is 98.082 g/mol, and typing H2SO4 gives 98.0820 g/mol.
Calcium phosphate, Ca₃(PO₄)₂. The index after a bracket multiplies everything inside it: (PO₄)₂ means two phosphorus atoms and eight oxygens.
- Ca: 3 × 40.08 = 120.24
- P: 2 × 30.973762 = 61.948
- O: 8 × 15.999 = 127.992
Total 310.180 g/mol; the calculator shows 310.1795 g/mol, the difference being only where the hand sum was rounded.
Copper(II) sulfate pentahydrate, CuSO₄·5H₂O. A hydrate is the salt plus its water of crystallisation. CuSO₄ is 63.55 + 32.07 + 4 × 15.999 = 159.616 g/mol; one H₂O is 18.015, five are 90.075. Together 249.6910 g/mol, which is what the calculator gives. In the breakdown, oxygen appears once with 9 atoms: the four of the sulfate and the five of the water are counted together.
Reading the breakdown: mass fractions
Under the total, the table lists each element with the number of its atoms, its share of the mass in g/mol, and that share as a percentage. The percentage is the mass fraction of the element, w = (index × atomic mass) / M × 100 %. Elements are sorted by their contribution, heaviest first, not in the order of the formula.
For CuSO₄·5H₂O the table shows Cu 25.45 %, so 10 g of blue vitriol contain 2.545 g of copper. The water's share is not a row of its own; work it out by hand: 90.075 / 249.691 × 100 % = 36.07 %. The percentages are rounded to two decimals, so their sum may be 99.99 % rather than 100 %, as it is for glucose, C6H12O6.
From grams to moles and back
The molar mass links a mass to an amount of substance: n = m / M, and m = n × M.
- How many moles are there in 10 g of sodium hydroxide? The calculator gives NaOH = 39.9968 g/mol, so n = 10 / 39.9968 = 0.250 mol.
- How much CuSO₄·5H₂O is 0.2 mol? m = 0.2 × 249.691 = 49.94 g.
To turn a molar mass straight into the mass to weigh for a solution, use the solution calculator: it reads the same formula.
How to type a formula
- Element symbols with the right case: the first letter capital, the second small. CO is carbon monoxide (28.0100 g/mol), Co is cobalt (58.9332 g/mol).
- Indices as ordinary digits: H2SO4 and H₂SO₄ give the same result.
- Brackets round, square or curly, nested as deep as needed: Ca3(PO4)2, K4[Fe(CN)6].
- Hydrates with a middle dot, an asterisk or a full stop: CuSO4·5H2O, CuSO4*5H2O and CuSO4.5H2O are all read alike. Spaces anywhere in the formula are ignored.
What the calculator does not understand:
- a coefficient in front of the formula: 2H2O gives an error; find the mass of H2O and double it;
- charges: SO4^2- is rejected, but SO4 gives the mass of the sulfate ion, 96.0660 g/mol, since the electrons weigh next to nothing;
- states such as (aq) or (s), abbreviations such as Ph or Me, isotope symbols such as D, and names of substances.
An error message names the character it stumbled on, which is usually enough to find the slip.
Common mistakes
- Forgetting the bracket's index. Ca3PO42 is not calcium phosphate; without brackets the 42 becomes an index of oxygen.
- Lowercase letters. h2so4 is rejected: a symbol must start with a capital.
- Anhydrous salt instead of the hydrate. CuSO₄ and CuSO₄·5H₂O differ by more than 90 g/mol. Use the formula of what is actually in the jar.
- Rounding too early. Keep all the digits until the last step, then round the answer.
For elements with no stable isotope the calculator uses the mass number of the most stable one, as the element pages do. To draw a structure rather than type a formula, there is the structural formula editor.