Molecular Weight Calculator guide
Molecular Weight Calculator: Molar Mass of Any Formula
Use our molecular weight calculator to work out the molar mass of any chemical formula, with each element's percentage by mass.
By the AllCalculator editorial teamUpdated 16 October 20261 min read
The molar mass (molecular weight) of a compound is the mass of one mole of it. You need it for almost every chemistry calculation. Our Molecular Weight Calculator works it out from the formula.
How to use the calculator (Molecular Weight Calculator)
- Type a chemical formula, such as H2O, C6H12O6 or Ca(OH)2.
- Optionally, enter a mass in grams to convert it to moles.
You'll see the molar mass, the percentage of each element by mass and, if you entered a mass, the number of moles and molecules.
Writing formulas
- Element symbols are case-sensitive: Co is cobalt, but CO is carbon monoxide.
- Use brackets for groups: Ca(OH)2, Al2(SO4)3.
- Use a dot for water of crystallisation: CuSO4·5H2O. You can type a full stop or * instead.
How it works
The calculator adds up the standard atomic weight of every atom in the formula:
Molar mass = Σ (atoms of each element × atomic weight)
A worked example
With the calculator's default settings, copper(II) sulfate pentahydrate, CuSO4·5H2O:
- Cu: 63.546
- S: 32.06
- O: 9 × 15.999 = 143.991
- H: 10 × 1.008 = 10.08
- Total: 249.68 g/mol
Frequently asked questions
What's the difference between molar mass and relative formula mass?
They're the same number. Relative formula mass (Mr) has no units, while molar mass is in g/mol.
How do I convert grams to moles?
Moles = mass ÷ molar mass. 10g of Ca(OH)2 is 10 ÷ 74.09 = 0.135 moles.
What's Avogadro's number?
6.022 × 10²³, the number of particles in one mole.
For solution concentrations, use our Molarity Calculator.
Sources and further reading
Links open official and independent websites in a new tab.
This guide is general information to help you understand your options. It isn't financial, tax, legal or building advice and doesn't take your personal circumstances into account. Figures were checked when the guide was last updated and can change, so confirm anything important with GOV.UK, HMRC, a regulated adviser or a qualified tradesperson.