Grams to Moles Calculator

One mole of water weighs 18.015 grams, one mole of table salt weighs 58.44 grams, and one mole of glucose weighs 180.156 grams, so the same mass in grams means a very different number of moles for each substance. This free grams to moles calculator turns a weighed mass into moles with one division: mass divided by molar mass. At the defaults, 18.015 g of water with a molar mass of 18.015 g/mol is 1.000 mol, which is 1000 mmol and contains 6.022 times 10 to the power 23 particles. The calculator also gives the particle count, using the Avogadro constant, and the mass in kilograms, so a single weighing answers the three questions a stoichiometry problem usually asks: how many moles, how many millimoles, and how many particles. Enter 10 g of carbon dioxide instead and the answer is 0.2272 mol, or 1.368 times 10 to the power 23 molecules. Enter 100 g of glucose and the answer is 0.5551 mol. The arithmetic is simple, but the molar mass has to be right, and that is where most mistakes happen.

Your Sample

Moles are mass divided by molar mass, and nothing else. Enter the mass in grams, kilograms or milligrams, and the molar mass of the substance in grams per mole. The calculator first converts your mass to grams, then divides by the molar mass. Check the molar mass against the exact chemical form in the bottle, because a hydrate such as copper sulfate pentahydrate has a different molar mass from the anhydrous salt, and the answer is only right if the sample is pure.

Water 1.000 mol 18.015 g of Water BEAKER, YOUR SAMPLE 10 1 0.1 0.01 0.001 mol 1.000 mol 32 particles shown More dots means more moles in the beaker
Your moles
Substance
Moles (mol)
Millimoles (mmol)
Number of Particles
In mass terms
Mass (kg)
Formula Used
The division is only as good as the molar mass you enter, so check it against the exact chemical form in the bottle: copper sulfate is 159.602 g/mol, but copper sulfate pentahydrate, CuSO4.5H2O, is 249.677 g/mol, because the five waters add 90.075 g/mol. The answer also assumes a pure substance, so a damp or impure sample weighs more than the substance in it, and the mole count comes out too high.
SubstanceFormulaMolar Mass (g/mol)Moles in the Entered Mass

Eight common substances at your entered mass of 18.015 g. At the defaults, the Water row is highlighted, because its molar mass of 18.015 g/mol matches the molar mass you entered.

Powered by Techraxy

Creator & Reviewer

Faiq Ur Rahman

Founder & CEO, Techraxy

Faiq Ur Rahman is a web designer, digital product developer, and Founder of Techraxy, a growing platform of online calculators and utility tools. He specializes in building structured, user-friendly tools focused on finance, health, conversions, productivity, and everyday problem-solving. He is passionate about developing practical digital solutions that make complex tasks simpler for users worldwide.

Share:

Rate this Tool

User Ratings:

0
0 out of 5 stars (based on 0 reviews)
Excellent
Very good
Average
Poor
Terrible

ADVERTISEMENT

ADVERTISEMENT

What is a Grams to Moles Calculator?

A grams to moles calculator is a tool that converts a mass in grams into an amount of substance in moles by dividing by the molar mass: moles equals mass in grams divided by molar mass in grams per mole. The mole is the SI unit of amount of substance, and one mole contains exactly 6.02214076 times 10 to the power 23 elementary entities, a number called the Avogadro number. That count is exact since the 2019 revision of the SI, when the mole was redefined as exactly that many entities. The conversion works because the molar mass is defined as the mass of one mole. If one mole of water weighs 18.015 g, then 18.015 g of water is one mole, 36.030 g is two moles, and 9.008 g is half a mole. The same logic holds for any substance, provided the molar mass matches the substance as it actually is. A mole of sodium chloride is a mole of NaCl formula units, because sodium chloride forms a crystal lattice rather than separate molecules, but the counting works the same way, and the calculator counts formula units for ionic compounds just as it counts molecules for water or glucose. The particle count follows from the mole count by multiplying by the Avogadro constant. One mole is 6.022 times 10 to the power 23 particles, so 0.2272 mol of carbon dioxide is 1.368 times 10 to the power 23 molecules, and 0.02775 mol of water is 1.671 times 10 to the power 22 molecules. The particles are whatever the formula unit is: molecules for water, formula units for sodium chloride, ions for a single ion, so read the count with the formula in mind.

How to Use the Grams to Moles Calculator

Enter the mass of your sample, in grams, kilograms or milligrams, then enter the molar mass in grams per mole, and type the name of the substance so the results and the diagram are labelled with it. The calculator updates as soon as you change any input, and the Calculate button runs it again at any time. If you do not know the molar mass, work it out first with the Molar Mass Calculator, which builds it from the chemical formula using the IUPAC 2021 conventional standard atomic weights. The molar masses in the Compare Substances tab use the same convention, so the two calculators can never disagree about a substance they both list. Read the results in order. Moles is the headline number, to four significant figures. Millimoles is the same amount in smaller units, useful when the mole count is below one. Number of particles is the mole count multiplied by the Avogadro constant, written in scientific notation. Mass in kilograms is your entered mass converted to kilograms, as a check that the unit conversion did what you expected: 18015 mg should read 0.018015 kg, and 0.018015 kg should read the same. The diagram shows your sample in a beaker. The liquid level rises with the mass, on a log scale from 0.1 g to 1000 g, the particle dots multiply with the number of moles, on a log scale from 0.0001 mol to 10 mol, and the gauge on the right fills with the mole count on a log scale from 0.001 to 10 mol. Changing the molar mass alone moves the dots and the gauge even though the liquid level stays put, because the mass has not changed but the number of moles has. The Compare Substances tab puts eight common substances side by side at your entered mass, with the molar mass and the moles in that mass for each. The row whose molar mass matches the molar mass you entered is highlighted, so you can check at a glance whether the substance you typed matches a table value. If no row matches, no row is highlighted, and the table still works as a quick reference.

Grams to Moles Calculator Formula

The formula is moles equals mass in grams divided by molar mass in grams per mole. Millimoles equals moles times 1000. Number of particles equals moles times the Avogadro constant, 6.02214076 times 10 to the power 23 per mole. Mass in kilograms equals mass in grams divided by 1000. Written out for the defaults, 18.015 g of water with a molar mass of 18.015 g/mol: 18.015 divided by 18.015 is 1.000 mol. Times 1000 is 1000 mmol. Times the Avogadro constant, 1.000 times 6.02214076 times 10 to the power 23, is 6.022 times 10 to the power 23 particles. Divided by 1000, the mass is 0.018015 kg. Unit conversion happens before the division. A mass entered in kilograms is multiplied by 1000 first, and a mass entered in milligrams is divided by 1000 first, because the molar mass is in grams per mole. So 0.018015 kg of water is 18.015 g, which is 1.000 mol, and 18015 mg of water is the same 18.015 g and the same 1.000 mol. Entering the mass in the wrong unit is the most common slip with this conversion, which is why the result also shows the mass in kilograms as a check.

Worked Example

Take 58.44 g of sodium chloride, NaCl, with a molar mass of 58.44 g/mol. Divide the mass by the molar mass: 58.44 divided by 58.44 is 1.000 mol. Times 1000 is 1000 mmol. Times the Avogadro constant, 1.000 times 6.02214076 times 10 to the power 23, is 6.022 times 10 to the power 23 formula units of NaCl. The mass in kilograms is 58.44 divided by 1000, which is 0.05844 kg. The same steps check a case where the answer is not a round number. Take 10 g of carbon dioxide, CO2, with a molar mass of 44.009 g/mol. Divide 10 by 44.009, which is 0.2272 mol. Times 1000 is 227.2 mmol. Times the Avogadro constant, 0.2272 times 6.02214076 times 10 to the power 23, is 1.368 times 10 to the power 23 molecules. Take 5 g of sodium hydroxide, NaOH, with a molar mass of 39.997 g/mol, and the same steps give 5 divided by 39.997, which is 0.1250 mol, 125.0 mmol, and 7.528 times 10 to the power 22 formula units.

Benefits of Using a Grams to Moles Calculator

The first benefit is getting stoichiometry started correctly. Nearly every stoichiometry problem begins by converting a weighed mass into moles, and a wrong mole count at this step makes every step after it wrong. The calculator does the division and the unit conversion in one place, and shows the mass in kilograms alongside, so a grams and kilograms mix-up is visible immediately instead of surfacing three steps later as an impossible yield. The second benefit is seeing the particle count without reaching for a calculator twice. Moles are an abstract counting unit, and multiplying by 6.02214076 times 10 to the power 23 by hand is where decimal places get lost. The calculator gives the count in scientific notation next to the mole count, so 0.5 g of water reads as 0.02775 mol and 1.671 times 10 to the power 22 molecules in the same glance, which is the form a question about the number of molecules actually wants. The third benefit is comparing substances at the same mass. The Compare Substances tab shows why 18.015 g is one mole of water but only 0.3083 mol of sodium chloride and 0.1000 mol of glucose, and why the same 18.015 g is 1.058 mol of ammonia and 1.123 mol of methane. Seeing the mole counts fall as the molar mass rises makes the inverse relationship concrete in a way the formula alone does not, and the highlighted row confirms which substance matches the molar mass you entered. The fourth benefit is catching a wrong molar mass before it costs a result. If you enter the molar mass of anhydrous copper sulfate, 159.602 g/mol, for a sample that is actually the pentahydrate at 249.677 g/mol, every mole count comes out about 56 percent too high, and nothing in the division itself warns you. The tip under the results states the hydrate warning plainly, and the compare table gives eight checked molar masses to measure your value against.

Frequently Asked Questions

How do you convert grams to moles?

Divide the mass in grams by the molar mass in grams per mole: moles equals mass divided by molar mass. For 58.44 g of sodium chloride with a molar mass of 58.44 g/mol, 58.44 divided by 58.44 is 1.000 mol. If your mass is in kilograms, multiply by 1000 first, and if it is in milligrams, divide by 1000 first, because the molar mass is in grams per mole. Millimoles are moles times 1000, so 1.000 mol is 1000 mmol.

Where do I find the molar mass if I do not know it?

Work it out from the chemical formula by adding up the standard atomic weight of each atom in the formula, or use the Molar Mass Calculator on this site, which does that from the formula you type in. For water, H2O, that is 2 times 1.008 for hydrogen plus 15.999 for oxygen, which is 18.015 g/mol. For glucose, C6H12O6, it is 6 times 12.011 plus 12 times 1.008 plus 6 times 15.999, which is 180.156 g/mol. The values use the IUPAC 2021 conventional standard atomic weights, the same convention as the compare table in this calculator.

How many particles are in one mole?

Exactly 6.02214076 times 10 to the power 23, which is the Avogadro number, and it is exact since the 2019 revision of the SI redefined the mole as exactly that many elementary entities. Multiply your mole count by it to get the particle count: 0.2272 mol of carbon dioxide is 1.368 times 10 to the power 23 molecules. The particles are whatever the formula unit is, molecules for water, formula units for sodium chloride, so the count means one mole of the formula as written.

What happens if I enter zero, a negative number, or leave a box empty?

The calculator shows a message and dashes out all the result fields, and the compare table dashes out its mole column until you enter a mass and a molar mass greater than zero. A mass of zero or less and a molar mass of zero or less are both rejected, because dividing by zero has no answer and a negative mass has no physical meaning. Leaving the substance name empty is not an error: the results simply call it Substance, and the calculation runs as normal.

Why does the same mass give fewer moles for a heavier substance?

Because moles count particles, and a heavier substance packs fewer particles into each gram. One mole of glucose weighs 180.156 g, so 18.015 g of glucose is only 0.1000 mol, while the same 18.015 g of water is 1.000 mol, because one mole of water weighs only 18.015 g. The mole count is the mass divided by the molar mass, so as the molar mass grows, the mole count for a fixed mass falls in direct proportion. That is also why the compare table is useful: it shows the fall across eight substances at one mass.

Calculator Sources

Wikipedia — Mole (unit), with the mole as the SI unit of amount of substance, one mole containing exactly 6.02214076 times 10 to the power 23 elementary entities, and the 2019 redefinition.

Wikipedia — Avogadro constant, with the exact value 6.02214076 times 10 to the power 23 per mole as an SI defining constant, and the relation between amount of substance and number of entities.

NIST — Avogadro constant, with the exact value 6.02214076 times 10 to the power 23 per mole from the NIST reference on constants, units and uncertainty.

Khan Academy — The mole and Avogadro’s number, with the mole as a counting unit, the Avogadro number, and worked conversions between mass, moles and number of particles.

Wikipedia — Molar mass, with the definition as the mass of one mole in grams per mole, the sum of the atomic weights of the atoms in the formula, and the link between molar mass and the mole.

Disclaimer

This calculator converts a mass into moles by dividing by the molar mass you enter, and it is for study, lab preparation and stoichiometry only. The answer is only as good as the molar mass: check it against the exact chemical form in the bottle, because hydrates, such as copper sulfate pentahydrate at 249.677 g/mol against anhydrous copper sulfate at 159.602 g/mol, have different molar masses, and the calculator cannot tell which form your sample is. The result also assumes a pure substance, so a damp or impure sample weighs more than the substance in it, and the mole count comes out too high. Molar masses here follow the IUPAC 2021 conventional standard atomic weights, and a table using older weights or a different rounding can differ in the last decimal places. For analytical work, confirm the molar mass against the current IUPAC table and your own lab standard, and check the substance name and units before using a result in the lab.

Last updated: 30 November 2026

ADVERTISEMENT

ADVERTISEMENT