Home/Calculators/Chemistry/Moles Calculator

Moles Calculator

Convert a mass in grams into moles using the substance's molar mass.

moles-calculator
Result
—
In summary: Moles equal mass in grams divided by molar mass in g/mol: mol = g ÷ g/mol. For 18 g of water (molar mass 18.015 g/mol), moles = 18 ÷ 18.015 = 1.00 mol.

Moles formula

The number of moles is the mass in grams divided by the molar mass in g/mol: mol = g ÷ M. Once you have moles, find concentration with the molarity calculator.

The units make the logic clear: grams divided by grams-per-mole leaves moles behind. Molar mass acts as the conversion factor between the mass you can weigh on a balance and the particle count that chemical equations actually work in.

How to use this calculator

Enter the sample mass in grams and the molar mass of the substance (the sum of the atomic masses in its formula). The result is moles, rounded to two decimals. For elements with isotopes, get the molar mass with the average atomic mass calculator.

Take care to use the molar mass of the whole formula unit, not of a single element inside it. Sodium chloride is 58.44 g/mol, not the 22.99 g/mol of sodium alone. Waters of crystallisation count too, so hydrated salts have a higher molar mass than their anhydrous form and give fewer moles for the same weighed mass.

Worked example

Water (H₂O) has a molar mass of 18.015 g/mol. A 18 g sample contains 18 ÷ 18.015 = 1.00 mol, which is about 6.022 × 10²³ molecules.

The result is a useful reference point: roughly 18 grams of water is one mole, which is about 18 millilitres, or a little over a tablespoon. Reading the answer back also gives a quick error check — if the mass is smaller than the molar mass you must get less than one mole, and if it is larger you must get more. The molar mass you divide by is built from the same elemental data used by the percent composition calculator.

Frequently asked questions

What is a mole?
A mole is a fixed amount of substance: 6.022 × 10²³ particles (Avogadro's number).
Where do I find molar mass?
Add up the atomic masses of every atom in the chemical formula, using values from the periodic table.
What units does this use?
Mass is in grams, molar mass in g/mol, and the answer is in moles (mol).
Can I convert moles back to mass?
Yes — multiply moles by molar mass to get grams (g = mol × g/mol).
What if my mass is in milligrams or kilograms?
Convert to grams first, or the answer will be off by a factor of a thousand. Divide milligrams by 1000 and multiply kilograms by 1000. The formula only balances when mass is in grams and molar mass is in grams per mole.
How this tool works

The formula behind this tool is written out in full in the sections above, so you can check the maths yourself. Every calculator on Calculorium is verified against worked examples with automated tests before it is published, and pages are reviewed as formulas or standards change. Nothing you type is sent anywhere — the calculation runs entirely in your browser. Read how we build and check these tools.

Last updated: July 27, 2026 · Calculations run in your browser. Estimates for information only.