Number of moles calculator

Type mass m [g] and molar mass M [g/mol]. The calculator computes n = m/M: 18 g of water at M = 18 is 1 mol, and a kilogram of water is 1000 g and about 55.6 mol, not 0.018. Zero M does not divide.

Density: ρ = m/V (mass there may be in kg). Heat: Q = cmΔT.

Inputs

Result

Mass m (g) and Molar mass M (g/mol). The result shows up here.

How it works

m, M n n = m/M mol ← g, g/mol
Sample mass in grams over molar mass. Not kilograms.

n = m / M. In this calculator m is in grams and M is in grams per mole. Eighteen grams of water and M = 18 give n = 1 mol. Thirty-six grams at the same M is 2 mol. Oxygen: 32 g and M = 32 is 1 mol again.

People often paste kilograms, because density and heat use them. Here 1 kg of water must be typed as 1000. A 1 with M = 18 is one gram, n ≈ 0.056 mol, a hundred times too small for a liter. Typing 0.018 while thinking “18 g in kg” gives 0.001 mol.

Beside the mole count the result is N = n · N_A. One mole is 6.02214076e23 particles. Two moles of water is about 1.204e24. CO₂: 44 g and M = 44 is 1 mol and again 6.022e23 molecules.

Take M from the periodic table or from a sum of atoms. Water is 16 + 1 + 1 = 18. School work often keeps 18, not 18.015. Molecular oxygen is 32, not 16. Carbon: 12 g at M = 12 is 1 mol of C atoms.

Density ρ = m/V next door may use kilograms. Heat Q = c m ΔT does too. If you have a liter of water, decide whether you want moles from 1000 g or joules from 1 kg. Same sample, different field.

Type m and M, then Calculate. 18 and 18 should come back as 1 mol. A comma in 18.015 works if the problem wants the more precise water M.

How to use

  1. Type mass in grams. A glass of water is about 200 g, not 0.2, unless you really have 0.2 g.
  2. Type M in g/mol. Water 18, oxygen 32, CO₂ 44.
  3. Click Calculate. 18 g and 18 g/mol give 1 mol and N ≈ 6.022e23.
  4. 36 g of water at M = 18 is 2 mol. 32 g of oxygen at M = 32 is 1 mol.
  5. When mass is in kg on another calculator, multiply by 1000 before you come back here.

Formula

n = m / M

m in grams, M in g/mol. m > 0, M > 0. N = n·N_A, N_A = 6.02214076·10²³ mol⁻¹.

n, m, M, and N_A

n = m/M in this calculator takes grams, not kilograms. 18 g of water at M = 18 is 1 mol. 1000 g is already about 55.6 mol.

n
Amount of substance [mol]. 18/18 = 1. Typed 1 g at M = 18 is only about 0.056 mol.
m
Mass [g]. Type a kilogram of water as 1000, or n drops to 0.018 instead of 55.6.
M
Molar mass [g/mol]. Water 18, oxygen 32: 32 g of O₂ is again 1 mol.
N_A
Avogadro constant. N = n·N_A. 1 mol is 6.02214076×10²³ particles.

Real-life examples

Example 1

m = 18 g, M = 18 g/mol -> n = 1 mol.

Example 2

m = 36 g, M = 18 g/mol -> n = 2 mol.

Example 3

m = 32 g, M = 32 g/mol -> n = 1 mol.

Example 4

m = 12 g, M = 12 g/mol -> n = 1 mol.

Example 5

m = 58.5 g, M = 58.5 g/mol -> n = 1 mol.

Example 6

m = 2 g, M = 2 g/mol -> n = 1 mol.

Example 7

m = 100 g, M = 18 g/mol -> n ≈ 5.556 mol.

Example 8

m = 0.5 g, M = 18 g/mol -> n ≈ 0.0278 mol.

Ways to use this calculator

  • You check that 18 g of water is 1 mol, and 1000 g is about 55.6 mol.
  • From n you go to N = n N_A when the problem wants particle count, not moles alone.

Frequently asked questions

How many moles in 18 g of water at M = 18 g/mol?

The amount is 1 mol. 36 g is 2 mol. 9 g is 0.5 mol. That is m/M, both in grams per mole.

Do I type mass in kilograms?

No. Grams here. A liter of water is 1000 g and about 55.6 mol. Typed 1 at M = 18 would give 0.056 mol, a hundred times too small for a liter.

How much at 32 g of oxygen and M = 32?

You get 1 mol of O₂ molecules. If you type M = 16 you get 2 mol of O atoms, not oxygen molecules.

How many particles in 1 mol?

N = n · N_A. One mole is 6.02214076×10²³ particles. Two moles is about 1.204×10²⁴. The result is N beside n.

What about 44 g of CO₂ and M = 44?

The amount is 1 mol. 22 g is 0.5 mol. 88 g is 2 mol. Same quotient, another gas.

Does 18.015 instead of 18 break water?

Hardly. 18 / 18.015 is about 0.999 mol. School work usually stays with M = 18 g/mol.

How does this meet density?

On density, mass may be in kg. 1 kg / 0.001 m³ is 1000 kg/m³. Moles use 1000 g, not a one in field m.

How does this meet Q = c m ΔT?

There 1 kg of water and 10 K is about 42 kJ, mass in kilograms. Here that same liter is 1000 g and 55.6 mol.

Is 12 g of carbon at M = 12 equal to 1 mol?

Yes, 1 mol of C atoms. Graphite and diamond share M and differ in structure; same moles at the same mass.

Does a comma in 18.015 work?

Yes. 18.015 and 18,015 are the same M [g/mol]. A comma and a period mean the same value.

Knowledge sources

The formula is the school one. Units follow SI; NIST SP 330 and BIPM define the measures, not your result.

Page updated in 2026.