Grams to Moles Calculator

The focused, single-purpose grams-to-moles converter: enter a mass and molar mass, get moles instantly.

⚖️ Grams to Moles Calculator

Convert a mass in grams to moles using n = mass ÷ molar mass.

g
g/mol
mol
g/mol
Moles
—

⚖️ What is a Grams to Moles Conversion?

Converting grams to moles means finding how many moles of a substance a given mass represents, using the formula n = mass ÷ molar mass. This is one of the most frequently performed conversions in all of chemistry, because chemical equations, reaction stoichiometry, and solution concentration are all defined in terms of moles, not the grams you actually weigh out on a balance.

This calculator is deliberately narrow and fast: enter a mass in grams and a molar mass in g/mol, and it returns the number of moles immediately, with the division shown step by step. It is built for the exact search query "grams to moles", students converting a lab measurement, and anyone who needs this single specific conversion without navigating a more complex multi-mode tool.

A common point of confusion is thinking grams and moles are interchangeable units, they are not. Grams measure mass, a physical property you can weigh. Moles measure amount of substance, a count of particles (via Avogadro's number) that does not depend on how heavy those particles are. The molar mass is the conversion factor that bridges the two, and it is different for every substance, one gram of hydrogen gas is a very different number of moles than one gram of lead.

While the primary framing of this page is grams to moles, a secondary Moles to Grams mode is included for convenience when you need the reverse calculation, multiplying moles by molar mass to recover a mass in grams.

📐 Formula

n  =  mass ÷ M
n = amount of substance, in moles
mass = sample mass, in grams
M = molar mass of the substance, in g/mol
Example: 9 g of NaCl (M = 58.44 g/mol): n = 9 ÷ 58.44 = 0.154 mol

📖 How to Use This Calculator

Steps

1
Enter the mass in grams.
2
Enter the molar mass in g/mol, look this up or use the Molecular Weight Calculator.
3
Click Calculate to see the number of moles, with the division shown step by step.

💡 Example Calculations

Example 1 — Physiological saline (NaCl)

How many moles are in 9 g of table salt, NaCl (M = 58.44 g/mol)?

1
mass = 9 g, M = 58.44 g/mol
2
n = 9 ÷ 58.44 = 0.1540 mol
9 g of NaCl is 0.1540 moles, matching the classic 0.9% physiological saline concentration.
Try this example →

Example 2 — One mole of glucose exactly

How many moles are in 180.156 g of glucose (M = 180.156 g/mol)?

1
mass = 180.156 g, M = 180.156 g/mol
2
n = 180.156 ÷ 180.156 = 1.0000 mol
180.156 g of glucose is exactly 1 mole, since that mass is defined as its molar mass.
Try this example →

Example 3 — Limestone sample (CaCO3)

How many moles are in 50 g of calcium carbonate (M = 100.086 g/mol)?

1
mass = 50 g, M = 100.086 g/mol
2
n = 50 ÷ 100.086 = 0.4996 mol
50 g of CaCO3 is 0.4996 moles.
Try this example →

Example 4 — Reverse mode: moles to grams

How many grams is 2 moles of NaCl (M = 58.44 g/mol)?

1
n = 2 mol, M = 58.44 g/mol
2
mass = 2 × 58.44 = 116.880 g
2 moles of NaCl weighs 116.880 grams.
Try this example →

❓ Frequently Asked Questions

How do you convert grams to moles?+
Divide the mass in grams by the substance's molar mass in grams per mole: moles = mass / molar mass. For example, 9 grams of table salt (NaCl, molar mass 58.44 g/mol) equals 9 / 58.44 = 0.154 moles.
What is the formula for grams to moles?+
n = mass / M, where n is the amount of substance in moles, mass is the sample's mass in grams, and M is the substance's molar mass in grams per mole. This is simply Avogadro's counting relationship expressed through mass instead of particle count.
How do I find the molar mass to use in this calculator?+
Molar mass is the sum of the atomic masses of every atom in a compound's formula, expressed in g/mol, and is numerically identical to molecular weight. Look it up on a periodic table for elements, or use the Molecular Weight Calculator to compute it directly from a chemical formula like H2O or NaCl.
Why do I need moles instead of just working in grams?+
Chemical reactions occur between individual particles (atoms, molecules, ions) in fixed whole-number ratios, not fixed mass ratios. Moles let you count particles indirectly by weighing, since one mole of anything always contains the same number of particles, Avogadro's number. Balanced chemical equations, stoichiometry, and solution concentration (molarity) are all defined in terms of moles, not grams, which is why converting grams to moles is often the very first step in a chemistry problem.
What is the difference between this calculator and the Mole Calculator?+
This calculator is deliberately narrow: it does one conversion, grams to moles (with an optional moles-to-grams reverse), as fast and simply as possible for that exact search. The general Mole Calculator is a broader hub tool that also solves for molar mass itself, or connects moles to volume at STP and particle count, switching between multiple calculation modes. Use this page when you specifically want grams converted to moles; use the Mole Calculator when you need to solve for a different unknown.
Can this calculator convert moles back to grams?+
Yes, switch to the Moles to Grams mode. Enter the number of moles and the molar mass, and the calculator multiplies them (mass = moles x molar mass) to give the mass in grams. This is the reverse of the primary grams-to-moles calculation.
Does the answer depend on which substance I am converting?+
Yes, indirectly. The formula n = mass / M is the same for every substance, but the molar mass M is different for every compound or element, so the same mass in grams gives a different number of moles depending on what substance it is. Always use the correct molar mass for your specific substance.
What if I only know the number of atoms or molecules, not the mass?+
Use the Avogadro's Number Calculator instead, which converts directly between moles and a raw particle count using Avogadro's constant, without involving mass or molar mass at all.
How many moles are in 1 gram of a substance?+
It depends entirely on the substance's molar mass: moles = 1 / M. One gram of hydrogen gas (M = 2.016 g/mol) is about 0.496 moles, while one gram of a heavy compound like glucose (M = 180.16 g/mol) is only about 0.00555 moles. There is no universal answer without knowing the molar mass.
Is grams to moles the same calculation as finding molarity?+
No, they are related but different. Grams to moles (n = mass / M) only gives an amount of substance. Molarity additionally requires a solution volume: Molarity = moles of solute / liters of solution. You typically calculate moles first, from mass, and then divide by volume to get molarity, use the Molarity Calculator for that second step.

How do you convert grams to moles?

Divide the mass in grams by the substance's molar mass in grams per mole: moles = mass / molar mass. For example, 9 grams of table salt (NaCl, molar mass 58.44 g/mol) equals 9 / 58.44 = 0.154 moles.

What is the formula for grams to moles?

n = mass / M, where n is the amount of substance in moles, mass is the sample's mass in grams, and M is the substance's molar mass in grams per mole. This is simply Avogadro's counting relationship expressed through mass instead of particle count.

How do I find the molar mass to use in this calculator?

Molar mass is the sum of the atomic masses of every atom in a compound's formula, expressed in g/mol, and is numerically identical to molecular weight. Look it up on a periodic table for elements, or use the Molecular Weight Calculator to compute it directly from a chemical formula like H2O or NaCl.

Why do I need moles instead of just working in grams?

Chemical reactions occur between individual particles (atoms, molecules, ions) in fixed whole-number ratios, not fixed mass ratios. Moles let you count particles indirectly by weighing, since one mole of anything always contains the same number of particles, Avogadro's number. Balanced chemical equations, stoichiometry, and solution concentration (molarity) are all defined in terms of moles, not grams, which is why converting grams to moles is often the very first step in a chemistry problem.

What is the difference between this calculator and the Mole Calculator?

This calculator is deliberately narrow: it does one conversion, grams to moles (with an optional moles-to-grams reverse), as fast and simply as possible for that exact search. The general Mole Calculator is a broader hub tool that also solves for molar mass itself, or connects moles to volume at STP and particle count, switching between multiple calculation modes. Use this page when you specifically want grams converted to moles; use the Mole Calculator when you need to solve for a different unknown.

Can this calculator convert moles back to grams?

Yes, switch to the Moles to Grams mode. Enter the number of moles and the molar mass, and the calculator multiplies them (mass = moles x molar mass) to give the mass in grams. This is the reverse of the primary grams-to-moles calculation.

Does the answer depend on which substance I am converting?

Yes, indirectly. The formula n = mass / M is the same for every substance, but the molar mass M is different for every compound or element, so the same mass in grams gives a different number of moles depending on what substance it is. Always use the correct molar mass for your specific substance.

What if I only know the number of atoms or molecules, not the mass?

Use the Avogadro's Number Calculator instead, which converts directly between moles and a raw particle count using Avogadro's constant, without involving mass or molar mass at all.

How many moles are in 1 gram of a substance?

It depends entirely on the substance's molar mass: moles = 1 / M. One gram of hydrogen gas (M = 2.016 g/mol) is about 0.496 moles, while one gram of a heavy compound like glucose (M = 180.16 g/mol) is only about 0.00555 moles. There is no universal answer without knowing the molar mass.

Is grams to moles the same calculation as finding molarity?

No, they are related but different. Grams to moles (n = mass / M) only gives an amount of substance. Molarity additionally requires a solution volume: Molarity = moles of solute / liters of solution. You typically calculate moles first, from mass, and then divide by volume to get molarity, use the Molarity Calculator for that second step.