About this calculator The moles from mass calculator turns the grams on a balance into the “portions” of a chemical equation: n = m / M n = m/M n = m / M takes a mass m m m (g) and a molar mass M M M (g/mol) and returns the amount of substance n n n (mol); multiplying by the Avogadro constant N A N_A N A then gives the number of particles N = n N A N = n N_A N = n N A —how many moles 18 g of water is and how many molecules it contains, how many moles 2.922 g of salt is, and how many atoms 1 g of gold and 1 g of hydrogen each contain. The inverse also works: how many grams is 0.25 mol of salt, and what is the molar mass of a substance when 10 g is 0.2 mol.
This is the first step of chemical stoichiometry. Reactions proceed by numbers of particles, but a balance only measures mass, and M M M is the conversion rate between them: grams per mole . What a mole is, why recipes go by number rather than mass, and how the concentration measures convert are set out in full by the chemistry-cluster anchor Molarity Calculator ; once n n n is known, go there to prepare a solution, and to the Dilution Calculator to dilute one. This page covers only its three unique topics: how molar mass is computed from atomic weights, why N A N_A N A has been an exact value since 2019, and how the 8 displayed decimals relate to your significant figures.
What it does not do: it does not look up molar masses (add the atomic weights from the chemical formula yourself; this page gives the method and common values); it does not convert kg ↔ g or mg ↔ g; it does not distinguish molecules, ions and atoms—N N N counts the “elementary entities” represented by the formula; and it does not compute solution concentrations.
Worked examples All four examples were recomputed by the engine's chem-moles compute routine; the display convention is at most 8 decimal places with trailing zeros removed for n n n , m m m and M M M , exponent form with 7 significant figures for N N N , in units g, g/mol and mol.
Example 1: why 18 g of water is not exactly 1 mol
Default inputs m = 18 m = 18 m = 18 , M = 18.015 M = 18.015 M = 18.015 : n = 18 / 18.015 = 0.99916736 n = 18 / 18.015 = 0.99916736 n = 18/18.015 = 0.99916736 , N = 0.99916736 × 6.02214076 × 10 23 = 6.017126 × 10 23 N = 0.99916736 \times 6.02214076 \times 10^{23} = 6.017126 \times 10^{23} N = 0.99916736 × 6.02214076 × 1 0 23 = 6.017126 × 1 0 23 . Interface shows: moles n 0.99916736 , particles N 6.017126e+23 .
Change the mass to 18.015: the interface shows n 1 and N 6.022141e+23 —exactly 1 mol, and the particle count is N A N_A N A . The 0.08% gap between 18 and 18.015 comes from the molar mass of H₂O being 2 × 1.008 + 15.999 = 18.015 2 \times 1.008 + 15.999 = 18.015 2 × 1.008 + 15.999 = 18.015 , not a whole number: the atomic weights of hydrogen and oxygen are not integers (isotope mixtures and nuclear binding energy), so “18 g of water = 1 mol” is a textbook rounding.
Those 6.017 × 10 23 6.017 \times 10^{23} 6.017 × 1 0 23 molecules fit in one large tablespoon. Counting them at a billion per second would take about 19 million years—which is why chemistry invented the mole, a “big dozen” that scales numbers down to something a person can read.
Figure 1: the two-step conversion of Example 1. On the left is what can be weighed, on the right what can be combined; M and N_A are the two conversion rates
Example 2: salt and a sugar cube—from solution preparation back to the balance
2.922 g of salt (the amount to weigh out in Example 2 of the Molarity Calculator ), M NaCl = 22.990 + 35.45 = 58.44 M_\text{NaCl} = 22.990 + 35.45 = 58.44 M NaCl = 22.990 + 35.45 = 58.44 . m = 2.922 m = 2.922 m = 2.922 , M = 58.44 M = 58.44 M = 58.44 : the interface shows n 0.05 and N 3.011070e+22 —3.0 × 10 22 3.0 \times 10^{22} 3.0 × 1 0 22 NaCl formula units, that is 3.0 × 10 22 3.0 \times 10^{22} 3.0 × 1 0 22 Na⁺ plus the same number of Cl⁻. NaCl is an ionic crystal and has no “NaCl molecules”; N N N counts formula units.
Solving for mass : how many grams is 0.25 mol of salt? Clear m m m , enter n = 0.25 n = 0.25 n = 0.25 , M = 58.44 M = 58.44 M = 58.44 : m = 14.61 m = 14.61 m = 14.61 . Interface shows: mass m 14.61 , N 1.505535e+23 .
A sugar cube : 4 g of sucrose C₁₂H₂₂O₁₁, M = 12 × 12.011 + 22 × 1.008 + 11 × 15.999 = 342.297 M = 12 \times 12.011 + 22 \times 1.008 + 11 \times 15.999 = 342.297 M = 12 × 12.011 + 22 × 1.008 + 11 × 15.999 = 342.297 . m = 4 m = 4 m = 4 , M = 342.297 M = 342.297 M = 342.297 : the interface shows n 0.01168576 and N 7.037328e+21 . For the same few grams, larger molecules mean fewer moles—this is why, in Example 3 of Molarity , “9 g of glucose is 0.05 mol while 9 g of salt is 0.154 mol”.
Example 3: the same 1 g, 200 times the atom count
1 g of gold , M Au = 196.96657 M_\text{Au} = 196.96657 M Au = 196.96657 : m = 1 m = 1 m = 1 , M = 196.96657 M = 196.96657 M = 196.96657 : the interface shows n 0.005077 and N 3.057443e+21 .
1 g of hydrogen atoms , M H = 1.008 M_\text{H} = 1.008 M H = 1.008 : the interface shows n 0.99206349 and N 5.974346e+23 . For the same 1 g, the number of hydrogen atoms is about 195 times the number of gold atoms, because a single gold atom is about 195 times heavier. n ∝ 1 / M n \propto 1/M n ∝ 1/ M —with the mass fixed, the amount of substance is inversely proportional to the molar mass.
100 g of copper , M Cu = 63.546 M_\text{Cu} = 63.546 M Cu = 63.546 : the interface shows n 1.57366317 and N 9.476821e+23 .
44 g of carbon dioxide , M = 12.011 + 2 × 15.999 = 44.009 M = 12.011 + 2 \times 15.999 = 44.009 M = 12.011 + 2 × 15.999 = 44.009 : m = 44 m = 44 m = 44 : the interface shows n 0.9997955 and N 6.020909e+23 —the same “just short” of 1 mol as with 18 g of water. Only m = 44.009 m = 44.009 m = 44.009 gives exactly 1 .
Example 4: solving for molar mass, grams and kilograms, and a display trap
Identifying an unknown : 10 g of a sample measures 0.2 mol. Clear M M M , enter m = 10 m = 10 m = 10 , n = 0.2 n = 0.2 n = 0.2 : M = 50 M = 50 M = 50 . Interface shows: molar mass M 50 , N 1.204428e+23 . A value of 50 g/mol rules out most candidate formulas.
Mass from n n n : how heavy is 2 mol of water? Clear m m m , enter n = 2 n = 2 n = 2 , M = 18.015 M = 18.015 M = 18.015 : the interface shows m 36.03 and N 1.204428e+24 .
The kilogram trap : entering 18 g as 0.018 (kg): m = 0.018 m = 0.018 m = 0.018 , M = 18.015 M = 18.015 M = 18.015 : the interface shows n 0.00099917 and N 6.017126e+20 —1000 times too small. The field unit is g.
The display trap : in the default state (m = 18 m = 18 m = 18 , M = 18.015 M = 18.015 M = 18.015 ), also enter 2 in “Moles n”; all three fields are then inputs and the particle count becomes 1.204428e+24 —the engine computes N N N from the 2 mol you entered and no longer looks at 18/18.015. It will not tell you that the three numbers contradict one another.
8 decimal places are not 8 significant figures
The 0.99916736 shown by the interface is the engine's display convention, not measurement precision. An “18 g” reading from a kitchen balance usually has two significant figures, and the corresponding amount of substance should be reported as 1.0 mol; only 18.0000 g on a four-decimal analytical balance justifies 0.999167. The molar mass has its own precision: IUPAC gives intervals for elements such as H, C and O (for O, 15.99903–15.99977), and teaching and routine calculations use the conventional values 1.008, 12.011 and 15.999. The significant figures of a result follow the least precise input.
The inputs of Example 1 can be entered directly into the panel to reproduce it; change the mass to 18.015 and watch n become 1 and N become N_A; change the molar mass to 58.44 (salt) or 196.96657 (gold) and watch the number of moles in the same 18 g fall in inverse proportion to M.
Principle and derivation How molar mass is computed
M M M equals the sum of the standard atomic weights of all the atoms in the chemical formula, in g/mol. Standard atomic weights are maintained by the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW); common values:
Element
Conventional atomic weight
Element
Conventional atomic weight
H
1.008
Na
22.990
C
12.011
Cl
35.45
N
14.007
Cu
63.546
O
15.999
Au
196.966 570
So H₂O = 2 × 1.008 + 15.999 = 18.015 = 2 \times 1.008 + 15.999 = 18.015 = 2 × 1.008 + 15.999 = 18.015 , NaCl = 22.990 + 35.45 = 58.44 = 22.990 + 35.45 = 58.44 = 22.990 + 35.45 = 58.44 , CO₂ = 12.011 + 2 × 15.999 = 44.009 = 12.011 + 2 \times 15.999 = 44.009 = 12.011 + 2 × 15.999 = 44.009 , C₆H₁₂O₆ = 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 = 6 \times 12.011 + 12 \times 1.008 + 6 \times 15.999 = 180.156 = 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 . Atomic weights are not integers because a natural element is a mixture of isotopes (chlorine is about 76% ³⁵Cl and 24% ³⁷Cl, averaging 35.45) and because nuclear binding energy makes a nucleus slightly lighter than the sum of its nucleons. Heavy water D₂O has M = 20.03 M = 20.03 M = 20.03 : the same formula with a different isotope changes the molar mass.
Why g/mol and relative molecular mass share a number
The scale of relative atomic mass is “one twelfth of the mass of a ¹²C atom is 1”. Between 1971 and 2019 the mole was defined as “the number of atoms in 0.012 kg of ¹²C”, and together the two stipulations guaranteed that the mass of 1 mol of any substance in grams is numerically equal to its relative molecular mass. This is why the mole was given its size—not a natural constant but a human choice aligning the gram with relative mass. After 2019, when N A N_A N A became exactly defined, the equality is exact only to the 10 − 9 10^{-9} 1 0 − 9 level, which affects no practical calculation.
N A N_A N A : from measured value to defined value
In 1811 Avogadro proposed that equal volumes of gases at the same temperature and pressure contain the same number of molecules, but he did not know what that number was. In 1909 Perrin measured 6.5 6.5 6.5 –7 × 10 23 7 \times 10^{23} 7 × 1 0 23 by several independent methods including Brownian motion, named it “Avogadro's number”, and provided decisive evidence that molecules are real (the 1926 Nobel Prize in Physics). Over the following century N A N_A N A was measured ever more precisely, finally reaching a relative uncertainty of 10 − 8 10^{-8} 1 0 − 8 through X-ray density measurements of silicon-28 single-crystal spheres; the 9th edition of the SI, in force from 20 May 2019, simply defined it as the exact 6.022 140 76 × 10 23 mol − 1 6.022\,140\,76 \times 10^{23}\ \text{mol}^{-1} 6.022 140 76 × 1 0 23 mol − 1 , so the mole no longer depends on the 12 g of carbon-12. That is the value built into the engine.
Why the two conversion steps are kept separate
N = m N A / M N = m N_A / M N = m N A / M could be computed in one step, but chemistry almost never needs N N N —equation coefficients are mole ratios, and solution preparation, titration and gas volumes (22.4 L/mol) all use n n n . The purpose of N N N is to let you see how large a mole is: a count of order 10 23 10^{23} 1 0 23 is the direct expression of the fact that macroscopic matter is made of microscopic particles. The engine's convention for N N N reflects this: it takes “the n n n you entered, otherwise m / M m/M m / M ”, so n n n is the primary result and N N N a secondary conversion.
Significant figures
The note after the examples already said it: the 8 displayed decimals are a software convention. A stoichiometric result is reported to the least number of significant figures among the inputs; the molar mass is taken one digit more precise than the mass. Since 2009 IUPAC has given atomic-weight intervals rather than single values for elements including H, Li, B, C, N, O, Si, S, Cl and Tl, because samples from different sources genuinely differ in isotopic composition; conventional values suffice for routine calculations, and only isotope analysis needs the intervals.