Grams to Moles Calculator

Choose grams to moles or moles to grams, enter the mass or amount and the substance's molar mass, and get the conversion. Use the Molecular Weight Calculator first if you need to find the molar mass from a chemical formula.

Last updated: September 26, 2026

Frequently asked questions

What is the formula for grams to moles?

n = mass / molar mass, where mass is in grams and molar mass is in g/mol. To go the other way, mass = moles × molar mass.

How is this different from the Molecular Weight Calculator?

The Molecular Weight Calculator computes a substance's molar mass directly from its chemical formula, like H2O or C6H12O6. This calculator instead converts between an actual sample's mass and its amount in moles, once you already know (or have looked up) the molar mass.

How is this different from Avogadro's Number Calculator?

This tool converts between mass and moles. Avogadro's Number Calculator converts between moles and the actual number of particles (atoms, molecules, or formula units), using the Avogadro constant. Use both together to go from mass all the way to particle count.

Where do I find a substance's molar mass?

For a known chemical formula, use the Molecular Weight Calculator. For elements, the Average Atomic Mass Calculator gives atomic mass in u, which is numerically the same as molar mass in g/mol.

Can I convert millimoles or milligrams?

Yes. The amount field accepts mol or mmol, and results are also shown in mmol or mg alongside the primary unit.

Why does molar mass have to be greater than zero?

Both conversions divide or multiply by molar mass, so a molar mass of zero would make the grams-to-moles conversion undefined.

Calculate