Find the molar mass and percent composition of any chemical formula.
Calculated instantly in your browser.
How do you calculate the molar mass of a compound?
Molar mass = Σ (atomic weight × number of atoms) for every element in the formula, and each element’s percent composition = its total mass ÷ molar mass × 100. The molar mass is the mass of one mole (6.022×10²³ units) and bridges grams and moles. Example: glucose C6H12O6 = 6×12.011 + 12×1.008 + 6×15.999 ≈ 180.16 g/mol.
Understanding your result
The molar mass is the mass of one mole (6.022×10²³ units) of a substance, found by adding up the atomic weights of all its atoms. It is the bridge between the mass you weigh out and the number of moles in a reaction.
Formula and method
Molar mass = Σ (atomic weight × number of atoms) for every element in the formula. Percent composition of an element = its total mass ÷ molar mass × 100.
Assumptions and limitations
This tool sums standard atomic weights from the periodic table for the formula you type, so element symbols must be correctly capitalised, as Co is cobalt but CO is carbon monoxide. It uses standard averaged atomic masses, not specific isotopes, and does not interpret hydrates written with a dot, charges, or reaction equations. Unrecognised symbols return no result.
Worked example
Glucose C6H12O6 = 6×12.011 + 12×1.008 + 6×15.999 ≈ 180.16 g/mol.
How to use this tool
- Type the chemical formula.
- Read the molar mass in g/mol.
- Review the per-element composition table.
Common mistakes to avoid
- Writing element symbols in the wrong case (Co is cobalt, CO is carbon monoxide).
- Forgetting to multiply a bracketed group by its subscript.
About the Molar Mass Calculator
The Molar Mass Calculator works out the molecular weight of a compound from its chemical formula. Enter a formula like H2O or Ca(OH)2 and get the molar mass in grams per mole plus the percent composition of each element.
Who should use this tool
Chemistry students, lab technicians, teachers and anyone doing stoichiometry or solution prep.
Benefits
- Handles brackets and nested groups, e.g. Al2(SO4)3.
- Shows the mass contribution and percent of each element.
- Uses standard atomic weights for every element.
- Instant and private — no sign-up.
Practical use cases
- Converting grams to moles for a reaction.
- Preparing a solution at a target molarity.
- Checking percent composition for a lab report.
Explore all Science and Engineering tools
Frequently asked questions
What units is molar mass in?
Grams per mole (g/mol). It is numerically equal to the molecular weight in atomic mass units (u).
Does case matter in the formula?
Yes. Element symbols start with a capital letter and may have a lowercase second letter — for example Na (sodium), not NA or na.
Does capitalisation of element symbols matter?
Yes, it is essential. Element symbols use a capital first letter and an optional lowercase second letter, so Co means cobalt while CO means one carbon and one oxygen. Typing the wrong case changes which elements are read and therefore the molar mass. Always match the official periodic-table capitalisation for each symbol.