Skip to content
chemistry

G To Moles Calculator

G To Moles Calculator

Convert a mass in grams to moles using the molar mass of the substance, with a full step-by-step breakdown.

In chemistry, recipes are not written in grams. They are written in moles, because chemical reactions happen between particles, and the mole is the unit that counts particles. A recipe might call for 2 moles of sodium chloride, but your scale measures grams, so you need to convert. The conversion runs through one number, the molar mass, which tells you how many grams make up one mole of a substance. The G To Moles Calculator does this conversion for you: enter the mass in grams, pick the substance or type its molar mass, and get the answer in moles, millimoles, and molecules with every step shown.

This conversion sits at the heart of almost everything done in a chemistry lab. Preparing a solution of a target concentration starts with weighing out the right number of moles. Working out how much product a reaction can make starts with converting the starting mass to moles. Even reading a safety data sheet makes more sense when you can move fluently between grams and moles. The calculator below handles the arithmetic so you can focus on the chemistry, and the breakdown shows each step so you can check the work or learn the method.

What the G To Moles Calculator Does

This calculator converts a mass in grams into an amount in moles. It uses the one formula that defines the relationship: moles = mass in grams ÷ molar mass in g/mol. The molar mass is the mass of one mole of the substance, and it is unique to each chemical. Water has a molar mass of 18.015 g/mol, which means one mole of water weighs 18.015 grams, while glucose has a molar mass of 180.156 g/mol, so one mole of glucose weighs ten times as much.

The dropdown includes six common substances with their molar masses filled in automatically: water, sodium chloride (table salt), carbon dioxide, glucose, oxygen gas, and sulfuric acid. If your substance is not in the list, choose the custom option and type the molar mass from a periodic table or a reference table. The molar mass field stays editable, so you can also adjust any listed value if your reference gives a slightly different number.

Along with the headline answer in moles, the calculator gives two extra figures that are useful in the lab. Millimoles are thousandths of a mole, and many bench-scale procedures are written in millimoles, so seeing both saves a conversion. The molecule count uses Avogadro’s number, 6.022 × 10²³ particles per mole, to show how many individual molecules your sample contains. It is a staggeringly large number for even a small sample, which is a good reminder of why chemists work in moles rather than counting particles.

How to Use the G To Moles Calculator

Start by entering the mass of your sample in grams. This is the number your balance shows, so read it carefully and keep the units in grams. If your balance reads in milligrams, divide by 1000 first: 250 milligrams is 0.25 grams.

Next, pick your substance from the dropdown. The molar mass field fills in automatically with the standard value. Check that the substance matches what you weighed, including its form: the molar mass of water is different from the molar mass of hydrogen peroxide, and a hydrate has a different molar mass from the anhydrous salt, so pick carefully. If your substance is not listed, choose the custom option and type the molar mass yourself.

Press Calculate and you will see the answer in moles with a step-by-step breakdown: the division that produced the moles, the millimole equivalent, and the molecule count. If you need to adjust the molar mass for a listed substance, just edit the field before pressing Calculate, because the field stays editable at all times.

The Formula Behind the Conversion

The whole conversion rests on one formula: moles = mass (g) ÷ molar mass (g/mol). The units show why it works: grams divided by grams per mole leaves moles. The molar mass itself comes from the periodic table. Each element has an atomic mass, and the molar mass of a compound is the sum of the atomic masses of its atoms. Water is H₂O, so its molar mass is 2 × 1.008 + 16.00 = 18.016, usually rounded to 18.015 g/mol. Sodium chloride is NaCl, so 22.99 + 35.45 = 58.44 g/mol.

Millimoles are a simple unit change: 1 mole = 1000 millimoles, so millimoles = moles × 1000. The molecule count uses Avogadro’s number, the number of particles in one mole: molecules = moles × 6.022 × 10²³. Because that number is so large, the calculator shows it as a coefficient times 10²³, which is easier to read than a 25-digit integer.

One useful check on your answer is the sense of scale. If the mass you enter is close to the molar mass, the answer should be close to 1 mole. If the mass is much smaller than the molar mass, the answer should be a small fraction of a mole. If the calculator says 90 grams of water is 5 moles, that makes sense, because 90 is about five times 18.

Worked Examples

Example 1: 90 grams of water. Suppose you have 90 g of water, H₂O, with a molar mass of 18.015 g/mol. The calculator works through it like this. Moles = 90 ÷ 18.015 = 4.9958 mol. Millimoles = 4.9958 × 1000 = 4995.84 mmol. Molecules = 4.9958 × 6.022 × 10²³ = 30.08 × 10²³ molecules. Notice that 90 grams is almost exactly five molar masses of water, so the answer landing just under 5 moles is exactly what you would expect, and the small difference from 5 comes from the molar mass being 18.015 rather than exactly 18.

Example 2: 25 grams of sodium chloride. Take 25 g of NaCl with a molar mass of 58.44 g/mol. Moles = 25 ÷ 58.44 = 0.4278 mol. Millimoles = 0.4278 × 1000 = 427.79 mmol. Molecules = 0.4278 × 6.022 × 10²³ = 2.58 × 10²³ molecules. This is a useful lab-scale result: about 0.43 moles of salt, which is the kind of quantity you would weigh out to prepare a few hundred milliliters of a roughly 1-molar solution.

Example 3: a custom substance. Suppose you have 12.5 g of a substance with a molar mass of 250.0 g/mol that is not in the dropdown. Choose the custom option, type 250.0 into the molar mass field, and enter 12.5 g. Moles = 12.5 ÷ 250.0 = 0.0500 mol. Millimoles = 0.0500 × 1000 = 50.00 mmol. Molecules = 0.0500 × 6.022 × 10²³ = 0.30 × 10²³ molecules. The same formula works for any substance once you know its molar mass.

How to Read Your Results

The headline number is the amount in moles, shown to four decimal places. That is the figure you will use in almost every downstream calculation, from preparing solutions to working out reaction yields. The millimole line is the same amount in smaller units, handy when a procedure is written in millimoles, which is common for bench-scale organic chemistry.

The molecule count is there for intuition and for teaching. It shows just how many particles are in an ordinary sample: a few grams of anything contains on the order of 10²³ molecules. Use it to sanity-check the direction of the conversion. If you entered a mass much larger than the molar mass and the mole answer comes out tiny, you probably mixed up the inputs or the molar mass, because a big mass of a light substance should give many moles.

Common Mistakes to Avoid

The most common mistake is using the wrong molar mass. People look up the atomic mass of one element instead of the molar mass of the whole compound, or they use the molar mass of the anhydrous salt when they weighed the hydrate. Always confirm that the molar mass matches the exact substance on your balance, including any waters of crystallization.

The second mistake is mixing up mass units. The calculator expects grams. If your balance reads 250 mg and you type 250, the answer will be a thousand times too large. Convert milligrams to grams by dividing by 1000 before entering the mass. Similarly, if a procedure gives the mass in kilograms, multiply by 1000 to get grams.

Third, do not confuse moles with molarity. Moles are an amount, like dozens of eggs. Molarity is a concentration, moles per liter of solution. Converting grams to moles is only the first step toward preparing a solution of a target molarity; you still need to dissolve those moles in the right volume of solvent. Finally, remember that molar mass values from different references can differ slightly in the last decimal place. That level of difference is fine for almost all practical work, but use the value your course or lab standardizes on when precision matters.

Frequently Asked Questions

1. How do you convert grams to moles?

Divide the mass in grams by the molar mass of the substance in g/mol. The formula is moles = mass ÷ molar mass. The calculator above does this division and shows each step.

2. What is molar mass?

Molar mass is the mass of one mole of a substance, measured in grams per mole. For a compound it is the sum of the atomic masses of its atoms. Water, H₂O, has a molar mass of 18.015 g/mol.

3. How many moles are in 90 grams of water?

90 ÷ 18.015 = 4.9958 moles, or about 5 moles. That is 4995.84 millimoles and about 30.08 × 10²³ molecules.

4. What is a mole in chemistry?

A mole is the chemist’s counting unit for particles: one mole contains 6.022 × 10²³ particles, a number called Avogadro’s number. It lets chemists weigh out countable numbers of atoms and molecules on an ordinary balance.

5. How do you find the molar mass of a compound?

Add up the atomic masses of all the atoms in its formula, using a periodic table. For NaCl that is 22.99 + 35.45 = 58.44 g/mol. For a custom substance you can type the result straight into the calculator’s molar mass field.

6. What are millimoles?

Millimoles are thousandths of a mole: 1 mole = 1000 millimoles. Bench-scale procedures are often written in millimoles, so the calculator shows this equivalent automatically.

7. How many molecules are in one mole?

One mole contains 6.022 × 10²³ particles, known as Avogadro’s number. The calculator multiplies your mole answer by this number to give the molecule count.

8. Can I convert grams to moles without knowing the substance?

No. The molar mass is different for every substance, so the conversion is impossible without it. You need to identify the substance and look up or calculate its molar mass first.

9. What is the difference between moles and molarity?

Moles measure an amount of substance, while molarity measures concentration in moles per liter of solution. Grams convert to moles; to get molarity you then divide the moles by the solution volume in liters.

10. Why is my molar mass slightly different from the calculator’s?

Atomic masses are averages of natural isotopes and get refined over time, so references can differ in the last decimal place. Small differences like this do not matter for most practical work.

11. How do hydrates change the molar mass?

A hydrate includes water molecules in its crystal structure, and those waters count in the molar mass. Copper(II) sulfate pentahydrate, CuSO₄·5H₂O, is much heavier per mole than anhydrous CuSO₄, so always use the form you actually weighed.

12. Do I need to convert milligrams to grams first?

Yes. The calculator expects grams, so divide milligrams by 1000. Entering 250 when you mean 250 mg gives an answer a thousand times too large.

13. What is Avogadro’s number used for?

It converts between moles and actual particle counts. Multiply moles by 6.022 × 10²³ to get the number of atoms, molecules, or formula units in a sample.

14. How many moles are in 25 grams of table salt?

25 ÷ 58.44 = 0.4278 moles of NaCl, which is 427.79 millimoles or about 2.58 × 10²³ formula units.

15. Is converting grams to moles enough to prepare a solution?

It is the first step. Once you know the moles, you still need to dissolve them in the correct volume of solvent to reach your target concentration, since concentration is moles divided by liters.

Final Thoughts

Converting grams to moles is the gateway skill of quantitative chemistry, and it never gets more complicated than one division. Weigh the sample, find the molar mass, divide, and you have the amount in moles, ready for solution preparation, yield calculations, or stoichiometry. The G To Moles Calculator handles the arithmetic and shows every step, including the millimole and molecule equivalents that put the number in context. Keep your units in grams, double-check that the molar mass matches the exact substance you weighed, and the conversion will take care of itself.