Molar Mass Calculator
Calculate the molar mass (molecular weight) of any chemical formula. Handles element symbols, parenthesized groups with multipliers like Ca3(PO4)2, and hydrates like CuSO4·5H2O, with a per-element mass breakdown. Uses IUPAC 2021 standard atomic weights.
Input
Element symbols are case-sensitive (Co = cobalt, CO = carbon + oxygen). Use digits for counts, ( ) [ ] for groups, and · or * for hydrates (e.g. CuSO4·5H2O).
Decimal places for the molar mass. Lab work typically uses 4.
Output
| Element | Count | Atomic Mass | Subtotal |
|---|---|---|---|
| No data yet | |||
Guides
The Molar Mass Calculator works out the molar mass (molecular weight) of any chemical compound from its formula. Type a formula such as H2O, C6H12O6, Ca3(PO4)2, or a hydrate like CuSO4·5H2O, and it returns the total molar mass in g/mol, kg/mol, or atomic mass units, along with a per-element breakdown so you can see exactly where the mass comes from.
How to use it
- Enter a chemical formula in the input box.
- Choose an output unit — grams per mole (g/mol) is the default and the value chemists use most.
- Set the number of decimal places (0–8). Laboratory work usually reports four.
The result updates as you type. The breakdown table lists each element, how many atoms of it the formula contains, its standard atomic weight, and its subtotal contribution to the overall mass. You can copy the molar mass or download the breakdown as a CSV file.
Writing formulas
Element symbols are case-sensitive, and this matters. Co is one cobalt atom, while CO is one carbon plus one oxygen — carbon monoxide. Always capitalise the first letter of a symbol and lowercase the second.
- Counts follow the element:
H2Ois two hydrogens and one oxygen. A symbol with no number means one atom. - Groups use parentheses or brackets with a multiplier applied to everything inside:
Ca3(PO4)2is three calcium atoms and two phosphate groups, so2 × (P + 4O)= 2 phosphorus and 8 oxygen. Groups can nest, e.g.K4[Fe(CN)6]. - Hydrates use a centre dot (
·) or an asterisk (*) to join a base compound with waters of crystallisation:CuSO4·5H2Omeans one copper(II) sulfate unit plus five water molecules. The leading number multiplies the formula that follows it.
How the molar mass is calculated
Each element's atom count is multiplied by its standard atomic weight, and the products are summed. The calculator uses the IUPAC 2021 conventional standard atomic weights for all 118 elements. For elements with no stable isotope (technetium, promethium, and everything from polonium onward), the mass number of the most stable isotope is used, matching the values IUPAC publishes in square brackets.
As a worked example, water: hydrogen is 1.008 and oxygen is 15.999, so H₂O is 2 × 1.008 + 15.999 = 18.015 g/mol.
Why is my result slightly different from a textbook?
Small differences usually come from rounding or from which atomic-weight set a source uses. Standard atomic weights are themselves ranges for some elements (sulfur, boron, chlorine), and different references pick different conventional single values. Raising the decimal places won't change the underlying atomic weights — only how precisely the total is displayed.
What units can it output?
Grams per mole (g/mol), kilograms per mole (kg/mol, which is g/mol ÷ 1000), and atomic mass units per molecule (amu), which is numerically equal to g/mol.
Privacy
Everything runs in your browser. The formula you enter is never uploaded — the periodic-table data ships with the page and the calculation happens locally.