Grams to moles calculator
Enter the formula and the mass in grams to get the amount in moles. The molar mass is worked out from the periodic table for you.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter chemical formula and mass.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Moles n = mass m (g) ÷ molar mass M (g/mol); particles = n × Avogadro constant 6.02214076 × 10^23 per mol.
Example
Inputs: Chemical formula = H2O, Mass = 36.03 g. Result: Amount of substance: 2 mol; Molar mass: 18.015 g/mol; Molecules or formula units: 1.204428 × 10^24.
Limits and caveats
- Assumes a pure substance; impurities or absorbed water change the real amount.
Questions about this tool
How many moles are in 100 g of water?
Water is 18.015 g/mol, so 100 ÷ 18.015 ≈ 5.551 mol.
Do I enter the formula or the molar mass?
Just the formula. The tool works out the molar mass from standard atomic weights.
Why does it say formula units?
Ionic compounds such as NaCl are not made of separate molecules, so we count NaCl formula units instead.
