Audited ·Last updated 29 Jul 2026·7 citations·Tier 1·0 uses

Mole Calculator — Grams, Moles and Molar Mass

Convert grams to moles, moles to grams, or work back to molar mass. n = m / M with IUPAC CIAAW 2024 atomic weights and every convention stated.

Mole Calculator

What do you want to find?
Grams. Used when solving for moles or for molar mass. Zero is allowed when solving for moles (an empty weighing boat is zero moles) but not when solving for molar mass.
g
Grams per mole. Read it off the bottle, the certificate of analysis or the datasheet — or get it from a chemical formula with the molar mass calculator. Default 58.44 g/mol is sodium chloride.
g/mol
Moles. Used when solving for mass or for molar mass. Must be greater than zero when solving for molar mass, because M = m / n has a pole at n = 0.
mol
Amount of substance
0.1
n, the amount of substance in moles (mol). One mole contains exactly 6.02214076 × 10²³ elementary entities by the SI definition in force since 20 May 2019. This value is independent of temperature and pressure.
Same amount in millimoles
100 mmol
Mass
5.844 g
Molar mass
58.44 g/mol

Background.

This mole calculator converts between the three quantities tied together by molar mass — mass in grams, amount of substance in moles, and molar mass in grams per mole — using the single defining relation n = m / M. Pick what you want to find, enter the two you know, and the calculator returns all four figures at once: moles, millimoles, mass and molar mass. It answers 'grams to moles', 'moles to grams', and the less-common but very useful reverse question, 'I weighed 5.844 g and I know it was 0.1 mol, so what is the molar mass?'

What this page assumes, stated up front rather than buried in an FAQ. There is no reference state. Unlike molarity, which needs a volume and therefore shifts with temperature through thermal expansion, and unlike the ideal gas law, which needs a stated pressure and temperature basis, n = m / M is a definitional identity between two extensive properties of one sample. It holds at 4 °C and at 400 °C, at one bar and at fifty, for a solid, a liquid or a gas. No STP, no SATP, no correction.

The approximation is not in the equation — it is in the number you type into the molar mass box. Standard atomic weights are abundance-weighted averages over normal terrestrial material. That makes them exactly right for ordinary reagents and exactly wrong for isotopically enriched or depleted ones: heavy water, a ¹³C-labelled internal standard, ⁶Li-depleted lithium metal and enriched ²³⁵U all need their own molar mass, not the periodic-table value. IUPAC's Commission on Isotopic Abundances and Atomic Weights publishes intervals rather than single values for more than a dozen elements — chlorine is [35.446, 35.457] because real chlorine varies measurably between sources — so a molar mass built from those elements carries genuine, irreducible uncertainty in its fourth significant figure.

Worked example, the one used throughout this page. Sodium chloride. From the CIAAW abridged 2024 table, sodium is 22.990 and chlorine is 35.45, so M(NaCl) = 22.990 + 35.45 = 58.440 g/mol, which is the 58.44 the USP monograph for Sodium Chloride prints on its header line. Weigh 5.844 g and you have n = 5.844 ÷ 58.44 = 0.100 000 mol, or 100 mmol. That is a decimal-exact case, which makes it a good one to check a calculator against.

The direction of the relationship, since it is the thing most often reversed by accident: molar mass sits in the denominator, so a heavier molecule means fewer moles for the same mass on the balance. Weigh 5.844 g of sodium chloride and you have 0.1 mol of it. Weigh 5.844 g of glucose, whose molar mass is 180.156 g/mol, and you have only 0.032 4386 mol — about a third as much substance for exactly the same reading on the balance. Mass tells you how heavy your sample is; moles tell you how many things are in it, and those are not the same question.

On precision. The calculator does no intermediate rounding at all: every step runs in arbitrary-precision decimal arithmetic and a single rounding to twelve significant digits happens on the way out. Twelve digits is a display convention, not a claim about your sample. The real precision of your answer is set by your balance and by the atomic-weight table — chlorine's ±0.01 out of 35.45 means a chloride salt's molar mass carries only about four significant figures of genuine information, no matter how many the screen shows.

Below the widget: the formal definition of the mole after the 2019 SI revision, why the molar mass of carbon-12 is no longer exactly 12 g/mol, how to read the calculator's error messages, and where each of the three singularities in this deceptively simple equation lives.

What is mole calculator?

Amount of substance, symbol n, is one of the seven SI base quantities, and the mole (mol) is its unit. The IUPAC Green Book defines molar mass as M_B = m / n_B — the mass of a sample divided by the amount of substance it contains — with the SI coherent unit kg mol⁻¹, though chemistry universally uses g mol⁻¹ because the numeric value in g/mol then equals the relative molecular mass. Rearranged, that definition is the whole of this calculator: n = m / M.

Since 20 May 2019 the mole has been defined by fixing a number rather than by reference to a kilogram of carbon. The BIPM SI Brochure states it directly: the mole is the SI unit of amount of substance, and one mole contains exactly 6.022 140 76 × 10²³ elementary entities. Avogadro's constant is therefore an exact integer count with no uncertainty, and the definition no longer mentions carbon-12 at all.

One consequence catches people out. Before 2019, the molar mass of carbon-12 was exactly 12 g/mol by definition. It no longer is. The molar mass constant M_u is now a measured quantity — CODATA 2022 gives 1.000 000 001 05(31) × 10⁻³ kg mol⁻¹ — so M(¹²C) = 12 × M_u = 12.000 000 0126(36) g/mol. The relative standard uncertainty is 3.1 × 10⁻¹⁰, which is ten orders of magnitude below the precision of any analytical balance and completely irrelevant at the bench, but it is real, and it is why the molar mass of an element is no longer, strictly speaking, numerically identical to its relative atomic mass.

Amount of substance is not a count of atoms, and this page is careful about the difference. A mole of water is 6.022 140 76 × 10²³ water molecules, which is 1.807 × 10²⁴ atoms, because each molecule has three of them. The Green Book is emphatic that the entity must always be specified — 'amount of oxygen' is ambiguous and should only be used where the context makes the entity clear. This calculator works purely in the mass-to-moles direction and never asserts a particle count; converting moles to atoms, molecules, ions or formula units is a separate step with its own factor, handled by the moles-to-atoms calculator.

How to use this calculator.

  1. Choose what you want to find from the first dropdown. 'Moles' is the grams-to-moles direction (n = m / M) and is the default. 'Mass' is the moles-to-grams direction (m = n × M), the one you use to decide what to weigh out. 'Molar mass' works backwards from a weighed mass and a known amount (M = m / n).
  2. Enter the molar mass in g/mol. Take it from the reagent bottle, the certificate of analysis, or a supplier datasheet. If you only have a chemical formula, get M from the molar mass calculator first — it parses formulas like Ca(OH)2 and returns g/mol.
  3. Enter the mass in grams and the amount in moles. The mode you chose decides which two are read; the third is ignored, so you can leave it at its default.
  4. Read all four results. The primary answer is the amount of substance in moles; millimoles is given alongside because bench-scale work is usually mmol, and the mass and molar mass are echoed so you can see exactly which numbers produced the answer.
  5. Sanity-check the direction. Heavier molecule, fewer moles for the same weighed mass — molar mass is in the denominator. If your answer moved the other way, the mass and molar mass boxes are probably swapped.
  6. For isotopically labelled or enriched material, do not use the periodic-table molar mass. Heavy water is 20.027 g/mol, not 18.015 g/mol — 2 × 2.01410177812 (NIST's relative atomic mass for deuterium) + 15.999. Type the isotopologue's own molar mass into the box.
  7. Treat the displayed digits as arithmetic, not measurement. Twelve significant digits come out; your real precision is whichever is worse, your balance or the atomic-weight uncertainty of the elements involved.

The formula.

n = m / M m = n × M M = m / n

The IUPAC Green Book (3rd ed., §2.10, p. 47) defines molar mass as M_B = m / n_B for an entity B. Every mode of this calculator is that one equation solved for a different letter:

n = m / M moles from a weighed mass m = n × M the mass to weigh out for a wanted amount M = m / n molar mass back-calculated from a weighing and a known amount

Dimensionally, [mass] ÷ [mass · amount⁻¹] = [amount]: grams divided by grams-per-mole leaves moles. That check is worth doing whenever a result looks odd, and it is enforced by a unit test — feeding milligrams together with mg/mmol returns the identical number, now read as millimoles, because the ratio is invariant under any consistent change of the mass unit.

Worked through with the page's fixture. Sodium chloride, from the CIAAW abridged 2024 table: M = A_r(Na) + A_r(Cl) = 22.990 + 35.45 = 58.440 g/mol. Weigh m = 5.844 g. Then n = 5.844 ÷ 58.44 = 0.100 000 mol = 100 mmol. Run it backwards: m = 0.1 × 58.44 = 5.844 g. Run it sideways: M = 5.844 ÷ 0.1 = 58.44 g/mol. All three modes close the loop exactly, which is the round-trip test in the test file.

ROUNDING STAGE — final only. There is exactly one rounding site in the module, and it is inside the return statement. No branch rounds before comparing, and no comparison anywhere in the code is made against a rounded value, so there is no threshold whose boundary can be crossed by rounding. The rounding is to twelve significant digits rather than to a fixed number of decimal places, on purpose: a fixed ten decimal places destroys legitimate results. One milligram of a 66 000 g/mol protein is 1.515 151 515 15 × 10⁻⁸ mol — about 15.15 nmol — which at ten decimal places would collapse to 0.000 000 015, two significant figures out of twelve.

SINGULARITIES — three of them, all refused rather than returned as infinity. Solving for moles or for mass with M = 0 is a division by zero with no physical referent, so the calculator rejects it and names the molar mass field. Solving for molar mass with n = 0 is the pole of M = m / n, likewise rejected. Solving for molar mass with m = 0 but n > 0 would imply massless matter, also rejected. One case that looks like an error and is not: a mass of exactly zero when solving for moles returns n = 0. An empty weighing boat contains zero moles, which is a perfectly good answer. Negative masses and negative amounts are refused outright rather than silently squared or made positive, and a result that would overflow double-precision range raises an error on the offending field instead of printing Infinity.

WHAT THIS PAGE DOES NOT DO. It does not parse chemical formulas — give it a number, not H2O; the molar mass calculator does the parsing. It does not convert moles to particle counts; that is the Avogadro bridge, N = n × N_A × (entities per formula unit), and it lives on the moles-to-atoms page because the entities-per-unit factor requires knowing the formula. And it does not involve volume, so it never needs a temperature or pressure basis.

A worked example.

Example

Weighing out sodium chloride. You want to know how much substance is on the balance after weighing 5.844 g of NaCl. Step 1 — the molar mass. From the IUPAC CIAAW abridged standard atomic weights (2024 revision), sodium is 22.990 and chlorine is 35.45, so M(NaCl) = 22.990 + 35.45 = 58.440 g/mol. Cross-check against a completely separate authority: the USP monograph for Sodium Chloride prints 'NaCl 58.44' on its header line, and USP General Notices §8.40 states that the atomic weights used in computing its molecular weights are those established by the IUPAC commission. Two independent bodies, same number. Step 2 — the amount of substance. With solveFor set to 'Moles', mass = 5.844 g and molar mass = 58.44 g/mol, the calculator returns n = 5.844 ÷ 58.44 = 0.100 000 mol, and 100 mmol alongside it. This case is decimal-exact — 58.44 × 0.1 is exactly 5.844 — so it is a good one to test any calculator against. Step 3 — read it backwards. Switch the dropdown to 'Mass', enter 0.1 mol and 58.44 g/mol, and you get 5.844 g back: the number to weigh out. Switch to 'Molar mass', enter 5.844 g and 0.1 mol, and you get 58.44 g/mol. All three modes close the loop. The comparison that fixes the direction in your head. Weigh the same 5.844 g of glucose instead. Glucose is C6H12O6, so M = 6 × 12.011 + 12 × 1.0080 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol, and n = 5.844 ÷ 180.156 = 0.032 4386 mol. Identical reading on the balance, roughly a third as much substance, because molar mass divides. A second example from a different source. The standard physical-chemistry figure that pure water is about 55.5 mol per kilogram: M(H2O) = 2 × 1.0080 + 15.999 = 18.015 g/mol, so n = 1000 ÷ 18.015 = 55.5093 mol. Note the temperature basis, because it matters — 1000 g of water is one litre only near 4 °C. At 25 °C the density is 0.99705 g/cm³, so a litre weighs 997.05 g and contains 55.3455 mol. The familiar '55.5 M' is a 4 °C figure; at room temperature the honest number is 55.35 M.

mass5.844
molar Mass58.44
moles0.1
solve Formoles

Frequently asked questions.

How do I convert grams to moles?
Divide the mass in grams by the molar mass in grams per mole: n = m / M. That is this calculator's default mode. Weigh 5.844 g of sodium chloride, whose molar mass is 58.44 g/mol, and you have 5.844 ÷ 58.44 = 0.100 000 mol, or 100 mmol. The only thing you need that is not on your balance is the molar mass — take it from the bottle label, the certificate of analysis, or the molar mass calculator if all you have is a chemical formula. Going the other way, moles to grams, is the same equation rearranged: m = n × M, so 0.1 mol of sodium chloride is 0.1 × 58.44 = 5.844 g to weigh out.
Does the answer change with temperature or pressure?
No, and that is a genuine difference from the calculators next to it rather than an oversight. Amount of substance and mass are both extensive properties of the sample itself, so n = m / M holds at any temperature, any pressure and in any physical state. Molarity is different — it divides moles by a volume, and volumes expand when heated, so a 1.000 M solution made up at 20 °C is slightly less concentrated at 37 °C. The ideal gas law is different again and needs an explicit pressure and temperature basis. This page needs neither, which is why you will not find an STP or SATP setting on it. The one place temperature sneaks in is when you convert a volume of liquid to a mass yourself, using a density: water is 0.99997 g/cm³ near 4 °C but 0.99705 g/cm³ at 25 °C, so a litre is 55.5093 mol or 55.3455 mol depending on which you mean.
Why is the molar mass of carbon-12 no longer exactly 12 g/mol?
Because the 2019 SI revision changed which quantity is fixed. Before 20 May 2019 the mole was defined as the number of entities in 12 g of carbon-12, which made M(¹²C) exactly 12 g/mol by construction and made the Avogadro constant a measured quantity. The revised SI turns that around: the BIPM brochure now defines one mole as containing exactly 6.022 140 76 × 10²³ elementary entities, so Avogadro's constant is exact and the molar mass constant M_u becomes the measured quantity. CODATA 2022 gives M_u = 1.000 000 001 05(31) × 10⁻³ kg mol⁻¹, so M(¹²C) = 12 × M_u = 12.000 000 0126(36) g/mol. The relative standard uncertainty is 3.1 × 10⁻¹⁰. That is about a hundred-millionth of the smallest division on a five-place analytical balance, so it changes nothing you will ever weigh — but it does mean the old textbook line 'the molar mass in g/mol is numerically equal to the relative atomic mass' is now an approximation rather than an identity.
Where does the molar mass number come from, and how accurate is it?
From the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), whose current table is the 2021 report as revised in 2024 for gadolinium, lutetium and zirconium. For a compound you sum the standard atomic weights of every atom in the formula. The accuracy is often worse than people assume. CIAAW gives intervals rather than single values for more than a dozen elements whose natural isotopic composition varies measurably between terrestrial sources: chlorine is [35.446, 35.457], hydrogen is [1.00784, 1.00811], lithium is [6.938, 6.997]. For everyday use CIAAW also publishes abridged 'conventional' values with an uncertainty — chlorine 35.45 ± 0.01, hydrogen 1.0080 ± 0.0002 — and those are what textbooks quote and what this page's examples use. The practical consequence: a chloride salt's molar mass carries roughly four significant figures of real information. Lithium is worse, at three. Displaying twelve digits does not create precision that the input never had.
Can I use this for heavy water, ¹³C-labelled standards, or enriched uranium?
Only if you supply the isotopologue's own molar mass rather than the periodic-table value. Standard atomic weights are averages weighted by natural terrestrial isotopic abundance, so they are exactly the wrong number for material that has been deliberately enriched or depleted. Heavy water is the clearest case: NIST gives deuterium a relative atomic mass of 2.01410177812, so D2O works out at 2 × 2.01410177812 + 15.999 = 20.027 g/mol, against ordinary water's 18.015 g/mol. That is an 11 percent difference, and therefore an 11 percent error in every mole calculation that used the wrong one. A uniformly ¹³C-labelled internal standard is heavier than its unlabelled twin by about one unit per carbon. Enriched ²³⁵U and ⁶Li-depleted lithium are the same problem in the other direction. The equation n = m / M is still exact; it is the value of M that has to change. Compute the isotopologue's molar mass from the isotope masses of the specific nuclides you actually have, and type that in.
What does the calculator do at zero — division by zero, empty samples, negative numbers?
It refuses the cases that have no physical meaning and answers the one that does, rather than printing Infinity or NaN. Solving for moles or mass with a molar mass of zero is rejected and the molar mass field is named. Solving for molar mass with zero moles is rejected, because M = m / n has a genuine pole there. Solving for molar mass with zero mass but a non-zero amount is rejected, because it would describe massless matter. Negative masses and negative amounts are refused outright rather than quietly made positive. The case that looks like an error and is not: a mass of exactly zero when solving for moles returns n = 0 — an empty weighing boat really does contain zero moles. Finally, if a result would exceed the range a double-precision number can hold, the calculator raises an error naming the field to change instead of returning an infinity that would silently propagate into the next step of your calculation.
What is the difference between this and the molar mass calculator?
Different input, different question. The molar mass calculator takes a chemical formula as text — H2O, Ca(OH)2, C6H12O6 — parses it, and returns the molar mass in g/mol; its job is to produce the number M. This page takes M as a number you already have, from a bottle label, a certificate of analysis, a protein datasheet or a supplier spec, and converts between mass and amount of substance in whichever direction you need. It also does something the formula parser cannot: solve for the molar mass itself, M = m / n, from a weighed mass and a separately known amount, which is what you do when characterising an unknown or checking a purity claim. In practice the two chain together — get M from a formula there, use it here.
How do I get the number of atoms or molecules from moles?
Multiply by the Avogadro constant, N_A = 6.022 140 76 × 10²³ mol⁻¹, which has been exact by definition since 2019 — but do it carefully, because the answer depends on which entity you are counting. One mole of water is 6.022 140 76 × 10²³ water molecules, but 1.807 × 10²⁴ atoms, because each molecule contains three. The IUPAC Green Book is explicit that the entity must always be specified; 'amount of oxygen' is ambiguous, since it might mean O atoms or O2 molecules, and the two differ by a factor of two. This calculator deliberately stops at moles and does not assert a particle count, because it never sees your chemical formula and so cannot know the entities-per-formula-unit factor. The moles-to-atoms calculator handles that step and asks you for the factor explicitly.
Why does the calculator show twelve digits when my textbook rounds to three?
The twelve digits are what the arithmetic produced, not a claim about your sample. There is no intermediate rounding anywhere in the calculation — every step runs in arbitrary-precision decimal arithmetic and a single rounding to twelve significant digits happens on the way out — which keeps small results honest. One milligram of a 66 000 g/mol protein is 1.515 151 515 15 × 10⁻⁸ mol, about 15.15 nmol; had the calculator rounded to a fixed ten decimal places instead, that would have collapsed to 0.000 000 015 and thrown away most of the answer. You should still round your reported result to the significant figures your measurement supports, which is normally set by the balance and by the atomic-weight uncertainty, whichever is worse. Weighing 5.844 g on a three-place balance and using a chlorine-containing molar mass good to four figures, three or four significant figures in the answer is honest; twelve is not.
How do I use this to make up a solution of known concentration?
Two steps, and this page is the second one. Decide the concentration c and the final volume V you want, multiply to get the amount n = c × V, then come here in 'Mass' mode with that amount and the molar mass to get the grams to weigh. For 250 mL of 0.400 mol/L sodium chloride: n = 0.400 × 0.250 = 0.100 mol, and 0.1 mol at 58.44 g/mol is 5.844 g. Weigh 5.844 g, transfer it quantitatively into a 250 mL volumetric flask, dissolve in a part of the solvent, then make up to the mark — not 'add 250 mL of water', because the dissolved solute occupies volume of its own. The molarity calculator does the first step and can chain straight through. If you are working with a hydrate, weigh the hydrate's molar mass, not the anhydrous salt's; the waters of crystallisation are sitting on the balance too.

References& sources.

  1. [1]BIPM, The International System of Units (SI), 9th edition (2019) — definition of the mole, in force since 20 May 2019 following CGPM Resolution 1 (2018): 'The mole, symbol mol, is the SI unit of amount of substance. One mole contains exactly 6.022 140 76 x 10^23 elementary entities.' Open access, HTML; retrieved and verified 2026-07-29.
  2. [2]IUPAC, Quantities, Units and Symbols in Physical Chemistry ('Green Book'), 3rd edition, 2nd printing 2012, section 2.10 'General chemistry', p. 47 — defines molar mass M_B = m / n_B (SI unit kg mol^-1), amount of substance n_B = N_B / L, and relative atomic mass A_r = m_a / m_u; p. 53 requires that the elementary entity always be specified. Open-access searchable PDF; text-verified 2026-07-29.
  3. [3]IUPAC CIAAW, Abridged Standard Atomic Weights, 2024 revision (the 2021 technical report as revised for Gd, Lu and Zr in 2024) — the conventional single values used in this page's worked examples: Na 22.990(1), Cl 35.45(1), H 1.0080(2), O 15.999(1), C 12.011(2). Open access; retrieved and verified 2026-07-29.
  4. [4]IUPAC CIAAW, Standard Atomic Weights, 2024 revision — the interval-valued table for elements whose terrestrial isotopic composition varies: H [1.00784, 1.00811], Li [6.938, 6.997], C [12.0096, 12.0116], O [15.99903, 15.99977], Cl [35.446, 35.457]. Sodium is a point value, 22.98976928(2). Open access; retrieved and verified 2026-07-29.
  5. [5]NIST, CODATA 2022 recommended values of the fundamental physical constants — molar mass constant M_u = 1.000 000 001 05(31) x 10^-3 kg mol^-1 (relative standard uncertainty 3.1 x 10^-10), from which M(carbon-12) = 12 x M_u = 12.000 000 0126(36) g/mol; and the Avogadro constant N_A = 6.022 140 76 x 10^23 mol^-1, listed as exact. Open access; retrieved and verified 2026-07-29.
  6. [6]NIST Standard Reference Database 144 — 'Atomic Weights and Isotopic Compositions with Relative Atomic Masses'. Source of the nuclide masses quoted on this page: H-1 1.00782503223(9), H-2 (deuterium) 2.01410177812(12), from which heavy water's molar mass of 20.027 g/mol is derived. Open access; retrieved and verified 2026-07-29.
  7. [7]United States Pharmacopeia-National Formulary, General Notices and Requirements, section 8.40 'Atomic Weights': 'Atomic weights used in computing molecular weights and the factors in the assays and elsewhere are those established by the IUPAC Commission on Atomic Weights and Isotopic Abundances.' Consulted as the independent second authority for this page; the USP Sodium Chloride monograph header 'NaCl 58.44' agrees with the CIAAW-derived 22.990 + 35.45 = 58.440 g/mol used in the worked example. Open access PDF; text-verified 2026-07-29.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 682 calculators remain free
  • No billing is enabled
Coming soon