About the Molecular Weight Calculator
The molecular weight, or molar mass, of a compound is the sum of the atomic weights of all the atoms in its formula, in grams per mole. This calculator reads a formula such as H2O, Ca(OH)2, Al2(SO4)3 or CuSO4.5H2O, including brackets and hydrate dots, and works out the total. It also lists each element with its atom count, its share of the mass in g/mol and its mass percent, which is the basis of percent composition questions in chemistry courses. The atomic weights cover the stable elements from hydrogen to uranium.
Updated October 2026
How to use the Molecular Weight Calculator
- 1Type the chemical formula, using a capital letter to start each element symbol.
- 2Add numbers after elements for the atom count, and use brackets for groups.
- 3For a hydrate, write the water after a dot, for example CuSO4.5H2O.
- 4Read the molecular weight in g/mol at the top.
- 5Check the table for the atoms, mass and percent of each element.
Writing formulas the tool understands
- Start each element with a capital letter: Na, Cl, Fe.
- Put counts straight after the element: H2, O3.
- Use brackets for groups: Mg(OH)2, Al2(SO4)3, K4[Fe(CN)6].
- Use a dot for hydrates: CuSO4.5H2O or MgSO4.7H2O.
- Do not include charges, spaces for states, or arrows. Enter one formula at a time.
Why molar mass matters
Molar mass links the mass you can weigh on a balance to the number of particles you cannot see. Divide a mass in grams by the molar mass to get moles, and multiply by Avogadro's number to count particles. It is the first step in stoichiometry, solution preparation, empirical formula questions and titration calculations.
Next steps after finding molar mass
Take the result to the Molarity Calculator to work out how many grams to dissolve for a given concentration, or to the Density Calculator and Unit Converter for other lab conversions. The Percentage Calculator helps with mass-percent checks. Always check atomic weights against your textbook or your lab's reference when exact values matter.
Features
- Molar mass in g/mol for any formula
- Round, square and curly brackets with multipliers
- Hydrates written with a dot
- Percent composition by element
- Elements listed in standard Hill order
- Clear errors for typos and unknown symbols
- Runs in your browser
Frequently asked questions
How do you calculate molecular weight?
Add the atomic weight of each atom in the formula, counting repeated atoms. For water, H2O, that is two hydrogens at 1.008 plus one oxygen at 15.999, giving 18.015 g/mol. For glucose, C6H12O6, it is six carbons, twelve hydrogens and six oxygens, which gives 180.156 g/mol.
What is the difference between molecular weight and molar mass?
The two have the same number but different units. Molecular weight is the mass of one molecule relative to carbon-12 and has no unit, while molar mass is the mass of one mole of the substance in grams per mole. Formula weight is the equivalent term for ionic compounds such as sodium chloride.
How do I write brackets and hydrates?
Put a group in brackets and add a number after it to multiply everything inside. Ca(OH)2 has one calcium, two oxygens and two hydrogens. For a hydrate, write the main formula, a dot, then the number of water molecules, as in CuSO4.5H2O. The calculator adds the water to the total.
Why does the tool say my element is unknown?
Element symbols are one capital letter, or a capital followed by a small letter. Co is cobalt, while CO is carbon and oxygen. If you type all capitals or all small letters for a two-letter symbol, the symbol will not match. Check capitalisation first, then check for typos.
What is percent composition?
It is the fraction of a compound's mass that comes from each element, as a percentage. In water, oxygen is 15.999 out of 18.015, so it is 88.81% oxygen and 11.19% hydrogen. The table shows these percentages for the formula you enter.
Are the atomic weights exact?
They are the standard abridged values, usually to three to five significant figures. Real samples vary slightly with their isotopes, and textbooks round differently, so your answer may differ from a book in the last digit. Use the book's values when a course demands them.