Moles Calculator
Enter a mass and a molar mass to get the amount of substance in moles — plus the number of molecules — using the relation n = m / M.
Moles and molecules at once
Enter the mass and the molar mass and the calculator returns the amount of substance (n = m / M) in moles and the number of molecules (n × Nₐ) together.
Match the units
Mass in grams and molar mass in grams per mole give the amount of substance in moles — convert kilograms or milligrams to grams before you start.
What does a moles calculator do?
Mass to amount of substance
A moles calculator converts a measured mass into the amount of substance, expressed in moles. The mole is the chemist's counting unit: one mole is exactly 6.022 × 10²³ particles, the Avogadro constant. Because you cannot count individual atoms, you weigh a sample instead and divide by the molar mass — the mass of one mole of that substance. This tool turns two numbers, the mass in grams and the molar mass in grams per mole, into the amount of substance in moles, alongside the number of molecules it contains. It is the everyday calculation behind preparing a solution, balancing a reaction, and converting between what you can weigh and what actually reacts.
Enter a mass in grams and a molar mass in grams per mole to get the amount of substance in moles and the number of molecules instantly.
The amount of substance is the mass divided by the molar mass, and the number of molecules is that amount multiplied by the Avogadro constant.
n = m / MThe two grams cancel — grams divided by grams-per-mole leaves moles. Multiply that amount by the Avogadro constant (Nₐ ≈ 6.022 × 10²³ per mole) to get the number of molecules. Use grams for mass and grams per mole for molar mass, and the amount comes back in moles and the count in molecules.
Suppose you have 18 g of water, whose molar mass is about 18.015 g/mol.
Find the molar mass
Water (H₂O) is 2 × 1.008 + 15.999 ≈ 18.015 g/mol — the mass of one mole.
Divide mass by molar mass
18 ÷ 18.015 ≈ 0.999167 mol — the amount of substance.
Convert to molecules
0.999167 × 6.022 × 10²³ ≈ 6.0171 × 10²³ molecules — just under one mole's worth of water molecules.
The formula is exact, but a couple of practical points are worth keeping in mind.
Use the right molar mass and consistent units
The result is only as good as the molar mass you enter, so take it from the chemical formula and the periodic table for your exact substance — an isotope, a hydrate, or a different compound changes it. Keep your units consistent: grams for mass and grams per mole for molar mass, converting kilograms or milligrams to grams first. The molar mass must be a positive number, since a zero or negative molar mass has no physical meaning.