How many moles are in my sample?
Type a chemical formula (or its molar mass) and what you know, the mass, the moles or the number of particles. The mole calculator gives the other two.
- Moles
- 2
2 mol, 36.03 g and 1.20443 × 10²⁴ particles at 18.015 g/mol.
- Massg
- 36.03
- Particles
- 1,204,430,000,000,000,000,000,000
- Particles (scientific)
- 1.20443 × 10²⁴
- Molar massg/mol
- 18.015
- Formula
- H₂O
Moles: 2. 2 mol, 36.03 g and 1.20443 × 10²⁴ particles at 18.015 g/mol.
How to calculate
Converts between mass, moles and number of particles: n = m ÷ M and N = n × Avogadro’s number, with the molar mass from a chemical formula or typed in.
Example with the default inputs (Molar mass from A formula, Chemical formula H2O, What do you know? Mass, Mass 36.03 g): 2 mol, 36.03 g and 1.20443 × 10²⁴ particles at 18.015 g/mol.
Method: n = m ÷ M (mass in grams over molar mass in g/mol); m = n × M; N = n × N_A with N_A = 6.02214076 × 10²³ per mole exactly; M = Σ atoms × CIAAW standard atomic weight.
- Atomic weights are the CIAAW abridged standard atomic weights (2024), the values printed on most periodic tables.
- Avogadro’s number is the exact SI value 6.02214076 × 10²³ per mole.
- Particles means whatever one formula unit is: atoms for an element, molecules for a compound such as H₂O.
Worked examples
Each example is checked against the calculator on every build.
- Molar mass from A formula, Chemical formula H2O, What do you know? Mass, Mass 36.03 g gives Molar mass 18.015, Moles 2, Particles 1,204,428,152,000,000,000,000,000, Particles (scientific) 1.20443 × 10²⁴.Source: CIAAW, Abridged Standard Atomic Weights (H 1.0080, O 15.999), https://ciaaw.org/abridged-atomic-weights.htm; × 6.02214076 × 10²³ (BIPM, SI Brochure 9th edition) = 1.204428152 × 10²⁴
- Molar mass from A formula, Chemical formula NaCl, What do you know? Moles, Amount (mol) 0.5 gives Molar mass 58.44, Mass 29.22.Source: CIAAW, Abridged Standard Atomic Weights (Na 22.990, Cl 35.45), https://ciaaw.org/abridged-atomic-weights.htm
- Molar mass from A formula, Chemical formula C6H12O6, What do you know? Mass, Mass 90 g gives Molar mass 180.156, Moles 0.499567.Source: OpenStax, Chemistry 2e, §3.1 Formula Mass and the Mole Concept (grams to moles), https://openstax.org/books/chemistry-2e/pages/3-1-formula-mass-and-the-mole-concept
- Molar mass from A number, Molar mass (g/mol) 12.011, What do you know? Particles, Number of particles 301,107,038,000,000,000,000,000 gives Moles 0.5, Mass 6.0055.Source: BIPM, SI Brochure 9th edition (2019), N_A = 6.02214076 × 10²³ mol⁻¹, https://www.bipm.org/en/publications/si-brochure
- Molar mass from A formula, Chemical formula CO2, What do you know? Mass, Mass 100 g gives Molar mass 44.009, Moles 2.272262.Source: CIAAW, Abridged Standard Atomic Weights (C 12.011, O 15.999), https://ciaaw.org/abridged-atomic-weights.htm
How it works
Molar mass M (g/mol). From a formula: M = Σ (atoms of each element × its standard atomic weight), with the CIAAW abridged standard atomic weights (2024), such as H 1.0080, C 12.011, N 14.007, O 15.999, Na 22.990, Cl 35.45. The formula reader is the one on the molar mass calculator: brackets, a hydrate dot (CuSO4·5H2O), a leading multiplier and a charge are allowed. A leading whole number multiplies the formula (2H2O is two water molecules, M = 36.030 g/mol), and a charge does not change the mass. Or type M yourself.
From what you know, the other two values follow:
- From a mass m: n = m (in grams) ÷ M, then N = n × N_A.
- From moles n: m = n × M, and N = n × N_A.
- From particles N: n = N ÷ N_A, then m = n × M.
N_A = 6.02214076 × 10²³ per mole, the exact SI value of the Avogadro constant.
Exact arithmetic. The typed numbers and the atomic weights are exact decimals, and N_A is an exact whole number, so every step is an exact fraction. Each result is rounded once, at the end.
Rules that give no answer. A formula that cannot be read (an unknown symbol, a lowercase first letter, brackets that do not match, a count of 0), an electron, or an element with no standard atomic weight gives no answer, with a message. So does a result beyond the largest 64-bit number.
Output format. Moles, mass (in grams) and particles show to 6 significant digits; particles also show in scientific notation, d.ddddd × 10ⁿ, rounded half up to 6 significant digits from the exact value (so 9.999995 × 10²⁰ shows as 1 × 10²¹), with trailing zeros dropped and no “× 10⁰” for numbers from 1 to 9.99999. The molar mass shows with up to 4 decimals. The formula shows with subscripts (C₆H₁₂O₆).
Assumptions
- Mass from 0 to 1,000 kg (typed in g, mg or kg); moles from 0 to 10⁹; particles from 0 to 10³³; a typed molar mass more than 0 and at most 10⁶ g/mol.
- The sample is the pure substance of the formula.
Worked examples by hand
36.03 g of water. M = 2 × 1.0080 + 15.999 = 18.015 g/mol. n = 36.03 ÷ 18.015 = 2 mol. N = 2 × 6.02214076 × 10²³ = 1.204428152 × 10²⁴ ≈ 1.20443 × 10²⁴ molecules.
0.5 mol of NaCl. M = 22.990 + 35.45 = 58.44 g/mol. m = 0.5 × 58.44 = 29.22 g.
90 g of glucose, C₆H₁₂O₆. M = 6 × 12.011 + 12 × 1.0080 + 6 × 15.999 = 180.156 g/mol. n = 90 ÷ 180.156 ≈ 0.499567 mol.
3.01107038 × 10²³ carbon atoms, M typed as 12.011. n = 3.01107038 × 10²³ ÷ 6.02214076 × 10²³ = 0.5 mol; m = 0.5 × 12.011 = 6.0055 g.
100 g of CO₂. M = 12.011 + 2 × 15.999 = 44.009 g/mol. n = 100 ÷ 44.009 ≈ 2.27226 mol.
Other questions people ask
How do I convert grams to moles?
Divide the mass in grams by the molar mass in g/mol: n = m ÷ M. Water has M = 18.015 g/mol, so 36.03 g of water is 36.03 ÷ 18.015 = 2 mol.
How do I convert moles to grams?
Multiply the moles by the molar mass: m = n × M. Half a mole of table salt (NaCl, 58.44 g/mol) weighs 0.5 × 58.44 = 29.22 g.
How many particles are in a mole?
One mole holds exactly 6.02214076 × 10²³ particles, Avogadro’s number. Since 2019 this number defines the mole in the SI. 2 mol of water holds 2 × 6.02214076 × 10²³ = 1.20443 × 10²⁴ molecules.
Where does the molar mass come from?
It is the sum of the atomic weights of the atoms in the formula. The calculator uses the IUPAC CIAAW standard atomic weights (2024): H 1.0080 + H 1.0080 + O 15.999 = 18.015 g/mol for H₂O.
What counts as a particle?
One formula unit of what you typed: an atom for an element such as Fe, a molecule for H₂O or CO₂, and one NaCl unit for an ionic compound. To count atoms in a compound, multiply by the atoms per formula unit (3 for H₂O).
Why does the calculator say an element has no standard atomic weight?
Elements such as technetium (Tc) and plutonium (Pu) have no stable isotopes, so IUPAC gives no standard atomic weight. Choose "A number" and type the molar mass of your isotope instead.