Chemistry & Chemical Engineering Moles, Mass & Chemical Formulas SI mole definition (BIPM, 2019) and IUPAC standard atomic weights

Moles to Grams Calculator

This converts between moles and grams in either direction using n = m ÷ M. Tell it what you have — an amount in moles you need to weigh out, or a mass on the balance you need as moles — give it a chemical formula or a molar mass, and it returns the other quantity along with the number of particles involved. The molar mass is parsed straight from the formula, including brackets and hydrates, so you do not have to look it up separately.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
What you havePick the quantity you already know; the calculator returns the other one.An amount in moles → convert to grams
Amount you haveRead in moles or in grams according to the choice above.0.25
Molar mass comes fromUse a formula unless your substance is a mixture or a polymer with a quoted average mass.A chemical formula
Chemical formulaCase matters: Co is cobalt, CO is carbon monoxide. Hydrates take a dot, as in CuSO4.5H2O.NaCl
Molar massUsed only when you choose to type a molar mass instead of a formula.58.44 g/mol

It returns

  • Converted amount — The quantity you did not enter, in the unit shown beside it.
  • Mass
  • Amount of substance
  • Molar mass used
  • Particles — Formula units, molecules or atoms, from moles multiplied by the Avogadro constant.

The formula

n=mM,m=nM

In plain text: n = m / M and m = n × M

  • nAmount of substance (mol)
  • mMass of the sample (g)
  • MMolar mass of the substance (g/mol)
  • NNumber of particles, n × 6.02214076 × 10²³ (count)

The two forms are the same equation rearranged. Molar mass is the conversion factor, and it is specific to the substance — there is no universal grams-per-mole number.

Updated Category Moles, Mass & Chemical Formulas Verified against published test cases Reading time 9 min

Why the mole exists at all

Chemical reactions happen between whole numbers of particles, but you cannot count particles and you cannot weigh one. The mole solves this by fixing a counting unit large enough to be weighable: one mole is exactly 6.02214076 × 10²³ entities, a value the SI fixed by definition in 2019. Molar mass is then simply the mass of that many particles of your substance, in grams.

So the conversion is a unit conversion, no different in principle from feet to metres — except that the factor depends on the substance. One mole of hydrogen gas weighs 2.016 g; one mole of mercury weighs 200.59 g. Both contain the same number of particles. That is the whole idea, and it is why a balanced equation can be read directly in moles but never directly in grams.

You will use this conversion constantly, because it sits at both ends of nearly every quantitative problem. Masses go in, moles do the chemistry, and masses come back out. The mole-ratio calculator handles the middle step; this page handles the two ends.

The equation, and which way to point it

The relationship is n = m ÷ M, where n is the amount in moles, m is the mass in grams and M is the molar mass in grams per mole. Rearranged, m = n × M.

Choose the direction by asking what you are holding. If you are standing at a balance about to weigh a reagent for a recipe that calls for 0.25 mol, you are going from moles to grams, so multiply. If you have already weighed 3.42 g and want to know how much substance that is, you are going from grams to moles, so divide.

The unit algebra will catch a wrong-way error every time. Moles × (grams/mole) leaves grams; the mole units cancel. Grams ÷ (grams/mole) leaves moles. If your answer comes out in mol²/g, you have inverted the factor — a slip that shows up as an answer wrong by the square of the molar mass, which is usually obvious by magnitude.

Molar mass itself comes from the formula: sum each element's standard atomic weight times how many of that element appear. This calculator does that for you from the formula string, or you can type a value if your material is a mixture, a technical grade, or a polymer with an average mass rather than an exact formula. Full detail is on the molar mass calculator.

Worked example: weighing out 0.25 mol of sodium chloride

A procedure calls for 0.25 mol of sodium chloride. Work out what to put on the balance.

  1. Find the molar mass. Sodium is 22.990 g/mol and chlorine is 35.45 g/mol, so NaCl is 22.990 + 35.45 = 58.44 g/mol.
  2. Choose the direction. You have moles and want grams, so multiply.
  3. Multiply. m = 0.25 mol × 58.44 g/mol = 14.61 g.
  4. Check the particle count. 0.25 × 6.02214076 × 10²³ = 1.506 × 10²³ formula units — that is 1.506 × 10²³ sodium ions and the same number of chloride ions, because each formula unit supplies one of each.

Now the reverse. Your balance settles at 14.58 g rather than 14.61 g, which is normal. Divide: 14.58 ÷ 58.44 = 0.24949 mol. That is 0.2% below target, which matters for a primary standard used in titration and does not matter at all for a buffer you will pH-adjust anyway. Knowing which case you are in is the difference between wasting an afternoon and finishing one.

If this salt is going into solution, carry the mole figure straight to the molarity calculator: 0.24949 mol in 250 mL gives 0.998 mol/L.

Reading the result sensibly

Start with magnitude. For most laboratory salts and organic solids, one mole is somewhere between 40 g and 400 g, so a bench-scale preparation on the order of a gram is a few millimoles. If a calculation tells you to weigh 0.0004 g, you cannot do it directly on a four-place balance — the reading is at the instrument's resolution and the relative error is enormous. Weigh a hundred times more, dissolve it, and take an aliquot.

Then consider significant figures. Molar mass is known to five or six figures; your balance gives four or five. The answer therefore carries the balance's precision, not the molar mass's, so quoting 14.6104 g when the balance reads to 0.01 g is false precision.

Finally, be clear about what one mole contains. A mole of NaCl is a mole of formula units, which is two moles of ions. A mole of O₂ is a mole of molecules, which is two moles of oxygen atoms. Most errors in particle counting come from silently switching between these three senses of "particle".

Molar masses and what one mole weighs

The mass of one mole, and the mass of 0.100 mol, for substances commonly weighed out.
SubstanceFormulaMolar mass (g/mol)Mass of 0.100 mol (g)
Hydrogen gasH₂2.0160.2016
WaterH₂O18.0151.8015
Sodium hydroxideNaOH39.9973.9997
Carbon dioxideCO₂44.0094.4009
Sodium chlorideNaCl58.4405.8440
Sodium hydrogen carbonateNaHCO₃84.0068.4006
Sulfuric acidH₂SO₄98.0729.8072
Calcium carbonateCaCO₃100.08610.0086
Potassium permanganateKMnO₄158.03215.8032
GlucoseC₆H₁₂O₆180.15618.0156
Copper(II) sulfate pentahydrateCuSO₄·5H₂O249.67724.9677
MercuryHg200.59020.0590

Every row is the molar mass multiplied by 0.100 — the same single step this calculator performs.

Errors that show up in this conversion

  • Dividing when you should multiply. Track the units. Moles × g/mol gives grams; grams ÷ g/mol gives moles.
  • Using the anhydrous molar mass for a hydrated reagent. Copper(II) sulfate is 159.60 g/mol anhydrous and 249.68 g/mol as the pentahydrate. Read the bottle, not the name.
  • Forgetting that molar mass is substance-specific. There is no universal grams-per-mole figure, and 22.4 is a molar volume for an ideal gas at 0 °C and 1 atm, not a mass.
  • Weighing an amount below the balance's usable range. A four-place balance reads to 0.1 mg, so a 20 mg weighing already carries 0.5% uncertainty and a 2 mg weighing carries 5%. Dilute from a larger weighing instead.
  • Confusing formula units with atoms. One mole of Ca(NO₃)₂ contains one mole of calcium ions but two moles of nitrate ions and nine moles of atoms.
  • Quoting more figures than the balance supports. The molar mass is not the limiting uncertainty; your weighing almost always is.

Related conversions and where this one stops

Three cousins of this conversion cover most of what else you will need. For a solution, concentration replaces molar mass as the bridge: moles = molarity × volume in litres, handled by the molarity calculator. For a gas, the ideal gas law does the same job through PV = nRT, so a volume at a known pressure and temperature converts to moles without any weighing at all. For a reaction, the coefficient ratio converts moles of one species into moles of another, which is the mole-ratio step.

What this calculator deliberately does not do is account for purity. A reagent labelled 98% pure needs 100/98 times the calculated mass to deliver the intended amount of substance, and technical-grade solids are often worse. For assays that matter — titrant standardisation, elemental standards — use a certified primary standard and take the purity from its certificate.

It also treats the molar mass as exact for the substance named. That is a good assumption for a defined compound and a poor one for anything with a distribution of masses. Polymers, humic materials and protein preparations have no single molar mass, only an average whose definition you must state before the arithmetic means anything.

One point of history that explains a common confusion: before 2019 the mole was defined as the number of atoms in exactly 12 g of carbon-12, which made molar mass in g/mol numerically identical to relative molecular mass by definition. The redefinition fixed the Avogadro constant instead, so the two are now equal only to within an experimentally tiny difference — about one part in a billion, which changes nothing you will ever weigh.

Frequently asked questions

How do I convert moles to grams?

Multiply the number of moles by the molar mass in grams per mole. For 0.25 mol of sodium chloride at 58.44 g/mol, the mass is 0.25 × 58.44 = 14.61 g. The units confirm the direction: mol × g/mol leaves grams. Going the other way you divide instead, and grams ÷ g/mol leaves moles.

How many grams are in one mole?

It depends entirely on the substance — that is the point of molar mass. One mole of hydrogen gas is 2.016 g, one mole of water is 18.015 g, and one mole of mercury is 200.59 g. All three contain the same 6.02214076 × 10²³ particles. There is no universal number of grams per mole.

Do I use the hydrated or the anhydrous molar mass?

Whichever matches the solid in the bottle. Copper(II) sulfate pentahydrate is 249.68 g/mol and the anhydrous salt is 159.60 g/mol, a difference of 56%. Enter the formula exactly as the label writes it, dot and all. If you are unsure whether an old bottle has taken up water, dry a portion to constant mass and weigh the loss.

What if my compound is not pure?

Divide the calculated mass by the purity as a fraction. To deliver 0.25 mol of a solid that assays 97.5%, weigh 14.61 ÷ 0.975 = 14.98 g. Certificates of analysis give the assay figure; technical grades often do not, which is why they are unsuitable for quantitative work. Purity corrections are not applied automatically here.

How do I get the number of molecules?

Multiply moles by the Avogadro constant, 6.02214076 × 10²³ per mole — the calculator reports this as the particle count. Be careful what "particle" means for your substance: for NaCl it counts formula units, and each one supplies one sodium ion and one chloride ion, so the ion count is double.

Why does the calculator show a dash for moles?

Because the molar mass is missing or zero, so the division has no answer. Either the formula contains a symbol that is not an element — check capitalisation, since Co and CO are different substances — or you have selected the typed-value source and left the molar mass at zero. The warnings box names the specific problem.

Can I use this for a gas measured by volume?

Not directly; a volume needs the ideal gas law rather than a molar mass. Find moles from n = PV/RT at your actual pressure and temperature, then bring that mole figure here to get a mass. The often-quoted 22.4 L per mole applies only at 0 °C and 1 atm; the molar volume at 25 °C and 1 atm is 24.47 L, so dividing a room-temperature volume by 22.4 overstates the amount of substance by 24.47 ÷ 22.41 = 9%.

How precise is the answer?

As precise as your weighing, not as precise as the molar mass. Atomic weights are known to five or six significant figures, so the conversion factor is never the limiting uncertainty in ordinary work. A four-place analytical balance gives about one part in ten thousand on a one-gram sample; report your result to match that, not to the eight digits the screen can display.

References