Science & engineering

Molar mass calculator

Find the molar mass, element-by-element composition and moles of a chemical formula.

Molar mass calculator
Esc to restore

Your inputs

Use capital letters for each element (Co is cobalt, CO is carbon monoxide), brackets for groups and a dot for hydrates, for example CuSO4.5H2O.

Results update as you type. Larger files run when you press Update result.

Your result

Your result will appear here.

More actions

Your inputs stay in this browser. Nothing is uploaded, and nothing is saved unless you choose “Save result”.

A clear answer. Here’s how.

Reads the formula into element counts, expanding brackets such as Ca(OH)2 and hydrate dots such as CuSO4·5H2O, then adds count × standard atomic weight for each element. Mass percent is each element’s subtotal ÷ the molar mass. Moles = sample mass ÷ molar mass and the particle count uses the exact Avogadro constant. Atomic weights are conventional IUPAC values for elements 1–92, rounded to classroom precision; an optional trailing charge such as ^2- is ignored.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Chemical formula
Ca(OH)2
Sample mass (g), to convert to moles
10

Example result

Example result
ElementAtomsAtomic weight (g/mol)Subtotal (g/mol)Mass percent
Ca (Calcium)140.07840.07854.092%
O (Oxygen)215.99931.99843.187%
H (Hydrogen)21.0082.0162.721%
Total574.092100%

10 g is 0.134967 mol, about 8.1279e+22 formula units (Avogadro constant 6.02214076×10²³ per mole). Weights are conventional IUPAC values, rounded for classroom use.