Moles Calculator – Amount of Substance from Mass or PV/RT

Use this free Moles Calculator to find the amount of substance n in moles, two ways: from the mass and molar mass (n = m/M), or for a gas from its pressure, volume and temperature (n = PV/RT). Choose a mode, enter your values, and get n — plus the number of particles.

The mole is chemistry's great labour-saving device. Reactions happen between particles — atom to atom, molecule to molecule — but no balance can count particles and no eye can see them. The mole stands between the two worlds: it is a counting unit so large (6.022 × 10²³ particles) that a countable amount of it is also a weighable amount. Convert a mass into moles and you have, in effect, counted the particles by weighing them. Nearly every quantitative chemistry problem — yields, concentrations, gas volumes, titrations — passes through n at some point, which is why this calculator offers the two doors into it that matter: the balance (n = m/M) and the gas law (n = PV/RT).

The mass route serves anything you can put on a scale: solids, liquids, solutions' solutes. It needs the molar mass, the mass of one mole, which the periodic table supplies — add the atomic masses in the formula and you have it. The gas route serves what you cannot weigh conveniently: a cylinder's contents, a balloon's fill, a room's air. It needs pressure, volume and temperature instead, and leans on the ideal gas law — which means it also quietly reports how much of a real gas you have to the accuracy that law allows, excellent at ordinary conditions.

Both routes end at the same place, and this calculator appends the natural next step: multiplying n by Avogadro's constant to give the particle count N. That pairing is deliberate. The mole is rarely the final answer anyone wants; it is the hub from which masses, volumes, concentrations and particle numbers radiate, and seeing n and N side by side teaches the hub's geography better than either number alone.

mass m ÷ M or n (mol) PV ÷ RT two doors into the same room — and N = n × Nₐ beyond it

Formula

From mass: n = m/M — where m is the mass (g) and M is the molar mass (g/mol). From gas conditions: n = PV/(RT) — the ideal gas law rearranged, with P in pascals, V in m³, T in kelvin and R = 8.314 J/(mol·K). One mole of any substance contains 6.022 × 10²³ particles (Avogadro's constant), so the particle count is N = n × 6.022 × 10²³.

Unit handling is where this calculator earns its keep in gas mode: it accepts pressure in kPa and volume in litres and converts them (×1,000 to pascals, ÷1,000 to cubic metres) before applying the formula — the two conversions that handwritten solutions most often drop. The mass route needs no conversions at all, provided mass and molar mass are both in grams-based units. Both formulas rearrange for reverse work: m = nM (what will 0.5 mol weigh?) and V = nRT/P (what space will this gas fill?) are the same relationships read from the other end.

SymbolMeaningUnits
namount of substancemol
mmass of the sampleg
Mmolar mass — mass of one moleg/mol
P, V, Tpressure, volume, absolute temperature (gas mode)kPa, L, K in this calculator
Rideal gas constant, 8.314J/(mol·K)
Nparticle count, N = n × 6.022 × 10²³a pure count

Molar mass: the conversion factor that runs chemistry

Every mass-mode calculation stands or falls on M, so it is worth understanding what a molar mass really is. It is the mass of exactly one mole of the substance — and, by the design of the atomic mass scale, its value in g/mol equals the mass of one particle in atomic mass units. A water molecule is 18 u; a mole of water is 18 g. That numerical identity is not a coincidence but a definition, and it is what makes the periodic table a conversion table: read the atomic masses, add them by the formula's subscripts, and you hold the factor that turns grams into counted particles.

Two habits protect M from error. First, count every atom the subscripts demand — glucose C₆H₁₂O₆ is 6×12 + 12×1 + 6×16 = 180, and the hydrogens, easy to underweight because each is only 1, still contribute 12. Second, respect the substance's actual form: oxygen in a cylinder is O₂ (32), not O (16); copper sulfate crystals from a bottle are usually the pentahydrate CuSO₄·5H₂O (249.7), not the anhydrous salt (159.6) — a 56% difference hiding in five waters that the formula on the label includes and a hurried calculation drops.

grams ÷ M → moles × Nₐ → particles the mole is the hub: mass in, particles out — or run it backwards

The mole also settled chemistry's longest argument. Into the mid-1800s, chemists could not agree on atomic weights — was water HO or H₂O? was oxygen 8 or 16? — because they lacked a shared counting rule. Stanislao Cannizzaro's pamphlet, circulated at the Karlsruhe congress of 1860, showed that Avogadro's hypothesis plus vapour densities fixed the weights consistently, and within a decade the periodic table became possible. The mole concept this calculator uses — one molar mass in grams per mole, the same count for every substance — is the direct descendant of that settlement: a unit invented so that strangers' measurements could be compared, which is most of what units are for.

The mole also powers the humblest task in analysis: finding an empirical formula. Burn an unknown compound, weigh its combustion products, convert each mass to moles with this page's second mode, and the mole ratios — tidied to whole numbers — spell the formula: 1 C : 2 H : 1 O is CH₂O, and the compound might be glucose's building block or formaldehyde. Elemental analysers automate the weighing, but the arithmetic they report is n = m/M, run element by element, exactly as in Example 4.

How to use

  1. Pick a mode: mass mode for solids and liquids you can weigh; gas mode when you know P, V and T.
  2. Mass mode: enter the mass in grams and the molar mass (add up the atomic masses from the periodic table — water H₂O = 2×1 + 16 = 18 g/mol).
  3. Gas mode: enter pressure in kPa, volume in litres and temperature in kelvin (K = °C + 273.15).
  4. Click "Calculate Moles" to get n and the number of molecules/particles.
  5. Cross-check with the molar volume: near room conditions one mole of any ideal gas fills about 24.5 L, so a gas-mode answer wildly at odds with V ÷ 24.5 deserves a second look at the inputs.

Worked examples

Example 1 — both modes, cross-checked. Mass mode: how many moles in 36 g of water (M = 18 g/mol)?
n = m/M = 36 / 18 = 2 mol — that is 2 × 6.022 × 10²³ ≈ 1.20 × 10²⁴ molecules.
Gas mode check: at P = 101.325 kPa, V = 22.414 L, T = 273.15 K: n = PV/(RT) = (101,325 × 0.022414)/(8.314 × 273.15) = 1 mol — the famous molar volume of an ideal gas at STP.

Example 2 — carbon dioxide by the bag. 88 g of CO₂ (M = 12 + 2×16 = 44 g/mol):
n = 88 / 44 = 2 mol → 1.20 × 10²⁴ molecules. As a gas at STP that amount would fill 2 × 22.414 ≈ 44.8 L — the two modes telling one story.

Example 3 — a pinch of salt, precisely. 5.85 g of NaCl (M = 23 + 35.5 = 58.5 g/mol):
n = 5.85 / 58.5 = 0.1 mol → 6.02 × 10²² formula units. Analytical chemists love such numbers: 0.1 mol dissolved to a litre is the standard 0.1 M solution.

Example 4 — the party balloon. A balloon holds 5 L of helium at 100 kPa and 25 °C (298.15 K):
n = PV/(RT) = (100,000 × 0.005) / (8.314 × 298.15) = 0.20 mol — barely 0.8 g of helium (0.20 × 4), yet 1.21 × 10²³ atoms of lift.

Example 5 — oxygen from a small cylinder. A 1 L cylinder at 200 kPa and 300 K:
n = (200,000 × 0.001) / (8.314 × 300) = 0.08 mol. If the gas is oxygen (M = 32), that is 0.08 × 32 = 2.57 g — gas mode handing back to mass mode for the inventory.

Example 6 — building a molar mass. Calcium carbonate CaCO₃: M = 40 + 12 + 3×16 = 100 g/mol. A 250 g bag of limestone-grade CaCO₃ therefore holds n = 250 / 100 = 2.5 mol — the roundest molar mass in the school laboratory, and no accident that it is a favourite exam subject.

Moles in real life

Recipe scaling for reactions. Industrial chemistry is stoichiometry at scale: the Haber process's N₂ + 3H₂ → 2NH₃ is a mole ratio before it is a tonnage, and every fertiliser plant's feed rates are this calculator's mass mode run continuously.

Making standard solutions. A 0.1 M solution means 0.1 mol per litre: weigh out 0.1 × M grams — 5.85 g for NaCl, as in Example 3 — dissolve, and make up to the mark. Analytical accuracy begins with n = m/M done carefully.

Gas cylinder inventories. How long will a cylinder last? Convert its pressure, volume and temperature to moles, then to mass or to minutes at the draw rate. Welders, divers and hospitals all run this gas-mode sum.

Breath and blood chemistry. Clinical results live in moles: blood glucose in mmol/L, electrolytes in mmol/L. A glucose reading of 5 mmol/L is 5 × 10⁻³ × 180 = 0.9 g of glucose per litre of blood — the mole translating between the lab report and the body.

Fertiliser and agriculture. Bags are labelled by nutrient content, but plants take up ions; converting a spread rate in kg/ha into moles of nitrogen per hectare is how agronomists compare urea (M = 60) with ammonium nitrate (M = 80) fairly.

Emissions and air quality. A car's CO₂ output in g/km becomes moles per kilometre (divide by 44), and from there to molecules — the chain regulators and climate inventories use to move between mass-based and count-based accounting.

H₂O vapour O₂ CO₂ 1 mol of any ideal gas at STP: 22.414 L — same box, any gas

The molar volume: why 22.4 L keeps appearing

Example 1's check hides a small marvel. At the same P and T, one mole of any ideal gas occupies the same volume — 22.414 L at STP (0 °C, 101.325 kPa) — whether it is hydrogen or carbon dioxide, feather-light or heavy. The gas law explains it: V = nRT/P contains no property of the particular gas at all. Avogadro guessed this equality in 1811 from combining-volume experiments; it remains the fastest sanity check in gas work. At the warmer "room" standard of 25 °C the molar volume grows to 24.47 L, and at 20 °C to 24.05 L — which is why careful work states its standard, and why the quick estimate "moles ≈ litres ÷ 24.5" serves so well at the bench on an ordinary day.

From moles to everything else: concentration and yield

The mole earns its keep as a hub. Divide n by a solution's volume in litres and you have molarity, the currency of titrations. Multiply n by M and you are back to a mass — the theoretical yield of a reaction is computed by walking mass → moles (this page), across the equation's ratio, then moles → mass for the product. Multiply n by 6.022 × 10²³ and you have particles; multiply by 96,485 C/mol for electrons and you have the charge a plating bath must pass. Almost no route in quantitative chemistry avoids the hub, which is why errors in n — usually errors in M — propagate everywhere, and why the molar-mass care in the earlier section is worth the thirty seconds it takes.

Quick reference: molar masses of common substances

SubstanceFormula arithmeticM (g/mol)
Water2×1 + 1618
Oxygen gas2×1632
Carbon dioxide12 + 2×1644
Ethanol2×12 + 6×1 + 1646
Sodium chloride23 + 35.558.5
Sulfuric acid2×1 + 32 + 4×1698
Calcium carbonate40 + 12 + 3×16100
Glucose6×12 + 12×1 + 6×16180

Notice the pattern the table teaches: M is built, not looked up in fear — atomic masses added with their subscripts, each verified against the formula as written on the bottle.

Common mistakes

  • Building the molar mass wrong. Forgotten subscripts (counting one oxygen in CO₂), the element instead of the molecule (O = 16 for oxygen gas, O₂ = 32), or ignoring waters of crystallisation in hydrates. M is the single most error-dense number in the whole calculation — build it slowly.
  • Feeding Celsius into gas mode. PV/RT demands kelvin. At 25 °C the correct T is 298.15; using 25 inflates n almost twelvefold. The mass mode has no temperature at all — if you are converting temperatures, make sure you are in the right mode.
  • Dropping the kPa→Pa or L→m³ conversions by hand. The raw formula wants pascals and cubic metres. This calculator converts its kPa and litre inputs internally, but a hand calculation that mixes kPa with R = 8.314 lands a factor of 1,000 adrift.
  • Using gauge pressure in gas mode. Like all gas-law work, n = PV/RT needs absolute pressure. A cylinder gauge reading of 200 kPa means ≈ 301 kPa of actual gas pressure — a 50% error in n at that gentle pressure.
  • Expecting gas mode to work for liquids. PV = nRT describes gases. A litre of water is about 55.5 mol by mass mode (1,000 g ÷ 18) — gas mode applied to it would return nonsense, because liquids do not obey the ideal gas law.

FAQ

What exactly is a mole?
It is just a counting unit, like a dozen — but for particles. One mole = 6.022 × 10²³ particles. Chemists use it because atoms are far too small and numerous to count one by one.

Why does one mole of every ideal gas take up 22.4 L at STP?
From PV = nRT, the volume depends only on n, P and T — not on which gas it is. At 273.15 K and 101.325 kPa, V = nRT/P works out to 22.414 L for n = 1, whatever the gas.

How do I find the molar mass of a compound?
Add the atomic masses of all the atoms in one formula unit: for CO₂, 12 + 2×16 = 44 g/mol; for glucose C₆H₁₂O₆, 6×12 + 12×1 + 6×16 = 180 g/mol.

Which mode should I use for a solution?
Mass mode for the solute you weigh out (n = m/M), then divide by the solution's volume in litres if you need the concentration in mol/L. Gas mode is only for gases whose P, V and T you know.

How many moles are in a litre of water?
About 55.5 mol: a litre of water masses 1,000 g, and 1,000 / 18 = 55.5. It is a useful shock-number — liquids pack far more moles into a litre than gases do (a litre of gas at STP holds only about 0.045 mol).

Why does the calculator also show the particle count?
Because n is usually a waypoint, not a destination. Multiplying by Avogadro's constant gives N — the census needed for reaction mechanisms, doping levels, electrochemistry and any "how many molecules" question.

Can n be less than one, or even tiny?
Freely. Amounts run from kilomoles in industry to femtomoles in trace analysis; the formulas are pure proportions and work at any scale. A 1 mg water sample is 5.6 × 10⁻⁵ mol — small, but perfectly meaningful.

What is the difference between molar mass and molecular mass?
The same number in different clothes: molecular mass is one molecule's mass in atomic mass units (u); molar mass is a mole of them in grams. Water: 18 u per molecule, 18 g per mole — the identity that makes the mole work.

Does gas mode work at high pressure?
Approximately. The ideal gas law drifts as pressure climbs or the gas nears liquefaction — a few percent for air at 100 bar, worse near condensation. For custody-grade numbers, engineers apply a compressibility correction; for bench work the ideal answer suffices.

How do I go from moles back to mass or volume?
Reverse the same formulas: mass m = n × M; gas volume V = nRT/P. The mole is a two-way hub — this calculator's two modes are the two directions of travel.

Moles Calculator — formula and diagram
Anna Kowalski

Anna Kowalski

Physics Editor · Heat & Atoms

Anna Kowalski creates and reviews our thermodynamics and nuclear physics calculators at CalcVIP. Every calculator is checked against hand-worked examples before it is published, so the formula, the diagram and the answer all agree.

View full profile & all calculators by Kowalski →