Number of Moles Calculator

Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/8/2026

The amount of substance is calculated with n = mass (g) ÷ molar mass (g/mol). 29.22 g of sodium chloride (molar mass 58.44 g/mol) therefore represents exactly 0.5 mole.

Explanation

The mole is the base unit used in chemistry to count amounts of substance at the atomic or molecular scale: a mole always corresponds to the same number of entities (about 6.022×10²³, Avogadro's number), whether atoms, molecules, or ions. Since weighing molecules directly is impossible, molar mass is systematically used instead — the mass of one mole of a given compound, expressed in grams per mole (g/mol) — calculated by adding the atomic masses of all the elements present in the chemical formula, each multiplied by its number of occurrences. This mass-to-moles conversion is the first step in most stoichiometry calculations (determining the proportions of reactants and products in a chemical reaction) and is used directly to prepare a solution of a given molar concentration: you first need to know how many moles of solute to weigh out, before dissolving them in a precise volume to reach the target concentration.

Example: 29.22 g of sodium chloride (NaCl)

Inputs

Mass: 29.22 g. Molar mass of NaCl: 58.44 g/mol.

Calculation

Amount of substance = 29.22 ÷ 58.44 = 0.5 mol.

Result

29.22 g of sodium chloride represents exactly 0.5 mole.

Frequently asked questions

How do you calculate the molar mass of a compound?

By adding up the atomic masses (given by the periodic table, in g/mol) of each element present in the chemical formula, multiplied by their number of atoms in the molecule. For sodium chloride (NaCl), this is simply the atomic mass of sodium (22.99 g/mol) plus that of chlorine (35.45 g/mol), or 58.44 g/mol.

Why use moles rather than mass directly?

Because chemical reactions proceed according to proportions of entities (atoms, molecules), not proportions of mass: two compounds with different molar masses contain different numbers of molecules for the same mass. Moles allow reasoning directly in terms of number of entities, which is essential for balancing a chemical equation or calculating a reaction yield.

Does this calculation also work for gases?

Yes, the relationship n = mass ÷ molar mass applies to any state of matter. For a gas, the number of moles obtained this way can then be used in the ideal gas law to relate pressure, volume, and temperature.

Related resources

Similar calculators