Skip to content
chemistry

G To Mol Calculator

G To Mol Calculator

Enter the mass in grams and the molar mass to convert grams into moles instantly.

grams
g/mol

Your Result

Mass entered
Molar mass
Amount in moles

Chemistry problems often start with a simple question: how many moles are in this many grams? The answer decides how much product a reaction will make, how to prepare a solution, or whether your lab calculations are correct. Doing the division by hand is easy, but it is also easy to slip up.

This calculator does the grams-to-moles conversion for you in one step. You enter the mass of your substance and its molar mass, and it returns the amount in moles with the full working shown. It is a small tool that removes one of the most common sources of silly mistakes in chemistry homework and lab work.

What This Calculator Does

This tool converts a mass in grams into an amount in moles. Moles are the standard way chemists count particles, and almost every formula in chemistry uses them. Recipes for reactions, solution strengths, and gas calculations all run on moles, not grams.

You give the calculator two numbers: the mass of the substance you have, and the molar mass of that substance in grams per mole. It divides the first by the second and shows the answer to four decimal places, along with the exact calculation it performed. Nothing is hidden, so you can copy the working straight into your notes.

This is a one-direction converter: grams to moles. That keeps it fast and simple for the most common task in introductory chemistry. If you need to go the other way, from moles back to grams, just multiply the moles by the molar mass.

How To Use This Calculator

First, find the molar mass of your substance. This is the mass of one mole of it, measured in grams per mole. You can look it up in a table, or add up the atomic masses of its elements. Water, for example, has a molar mass of 18.015 grams per mole.

Type your mass into the first box and the molar mass into the second. Press "Convert." The result appears immediately: your mass, your molar mass, the answer in moles, and the division written out in full. Press Reset if you want to start over with a new substance.

Double-check your units before you trust the answer. The mass must be in grams, not milligrams or kilograms. If your sample is measured in another unit, convert it to grams first, or your answer will be off by a factor of ten or a thousand.

The Formula And Why It Works

The formula is beautifully simple: moles = mass in grams / molar mass in g per mol. One mole of any substance weighs exactly its molar mass in grams. So if you have 36 grams of water and water's molar mass is 18.015 grams per mole, you have 36 divided by 18.015 moles, which is 1.9983 moles, almost exactly two moles.

Think of it like buying eggs by the dozen. If one dozen eggs weighs 720 grams and you have 360 grams of eggs, you have half a dozen. Molar mass is the "weight of one mole," and the division tells you how many of those mole-sized portions fit into your sample.

Notice that the units cancel neatly. Grams on top divided by grams per mole leaves moles on their own. Whenever your units cancel correctly, it is a good sign that your formula is right. If the units do not cancel, something is wrong with the setup.

Worked Examples With Full Arithmetic

Example 1, water: A student has 36 grams of water. The molar mass of water is 18.015 grams per mole. Step 1: write the formula, moles = 36 / 18.015. Step 2: divide, 36 / 18.015 = 1.9983. Step 3: attach the unit, giving 1.9983 moles, which is essentially 2 moles. You can check it backwards: 1.9983 x 18.015 = 36.0 grams.

Example 2, table salt: A cook weighs out 100 grams of sodium chloride for a brine solution. The molar mass of NaCl is 58.44 grams per mole. Step 1: moles = 100 / 58.44. Step 2: divide, 100 / 58.44 = 1.7112. Step 3: the answer is 1.7112 moles. Checking backwards, 1.7112 x 58.44 = 100.0 grams, which confirms the division.

Example 3, baking soda: A lab needs 21 grams of sodium bicarbonate. Its molar mass is 84.007 grams per mole. Step 1: moles = 21 / 84.007. Step 2: divide, 21 / 84.007 = 0.2500. Step 3: the answer is 0.2500 moles, exactly a quarter of a mole. Backwards check: 0.2500 x 84.007 = 21.0 grams.

Example 4, glucose: A biology student dissolves 9 grams of glucose. The molar mass of glucose is 180.156 grams per mole. Step 1: moles = 9 / 180.156. Step 2: divide, 9 / 180.156 = 0.0500. Step 3: the answer is 0.0500 moles. Backwards check: 0.0500 x 180.156 = 9.0 grams.

Example 5, sodium hydroxide: A technician weighs 45 grams of NaOH. The molar mass is 40.00 grams per mole. Step 1: moles = 45 / 40.00. Step 2: divide, 45 / 40.00 = 1.1250. Step 3: the answer is 1.1250 moles. Backwards check: 1.1250 x 40.00 = 45.0 grams exactly.

Interpreting Your Result

The headline number is the amount in moles. A result like 1.9983 moles means you have almost exactly two moles of the substance. A result like 0.0500 moles means one twentieth of a mole, which is common when working with expensive or dangerous chemicals in small amounts.

The answer is shown to four decimal places. That is more precision than most school labs need, but extra digits are harmless because rounding early is one of the classic ways to lose marks. Keep the full value while you work, and round only at the very end of your calculation.

If the answer looks surprising, sanity-check it. One mole is a fairly large amount for most classroom chemicals, often tens or hundreds of grams. If you entered a small mass and got a huge number of moles, check that your molar mass is correct and in grams per mole, not kilograms per mole.

Where You Will Use This Conversion

Balancing and using chemical equations is the most common use. Equations speak in moles, but your balance speaks in grams. Converting grams to moles is the bridge between what you weigh out and what the equation predicts.

Preparing solutions is another big one. To make a solution of a certain molarity, you need to know how many moles to dissolve in each liter. Convert your weighed mass to moles first, then divide by the volume in liters to get the concentration.

Gas calculations use it too. The ideal gas law works with moles, so a question that gives you grams of a gas always starts with this exact conversion before anything else can happen.

Common Mistakes To Avoid

The most frequent mistake is dividing the wrong way round: molar mass divided by mass instead of mass divided by molar mass. Remember the egg analogy. Mass is what you have, molar mass is the size of one portion, so mass divided by portion size gives the number of portions.

Mixing up units is the second trap. If your sample is 500 milligrams, that is 0.5 grams, and entering 500 will give an answer a thousand times too large. Always convert to grams before you start.

Using the wrong molar mass is the third. Water is 18.015, but hydrogen peroxide is 34.015, and students mix up similar formulas all the time. Double-check the formula of your substance, then add up the atomic masses carefully or look the value up.

Finally, do not round in the middle of a longer calculation. A value like 1.9983 rounded to 2.0 is fine as a final answer, but if that number feeds into more steps, keep the digits until the end.

Frequently Asked Questions

1. What is the formula to convert grams to moles?

Moles = mass in grams / molar mass in grams per mole. Divide the mass you have by the mass of one mole of the substance. For example, 36 grams of water / 18.015 g per mol = 1.9983 moles.

2. What is a mole in chemistry?

A mole is a counting unit for particles, equal to 6.022 x 10^23 particles. Chemists use it because atoms are far too small to count individually. One mole of water weighs 18.015 grams, and one mole of table salt weighs 58.44 grams.

3. How do I find the molar mass of a substance?

Add up the atomic masses of all the atoms in its formula. Water is H2O, so 2 x 1.008 + 16.00 = 18.016, usually rounded to 18.015. You can also look molar masses up in reference tables or on the label of lab chemicals.

4. Can I convert milligrams to moles with this calculator?

Yes, but convert milligrams to grams first by dividing by 1000. Then enter the gram value. For example, 500 milligrams becomes 0.5 grams before you enter it into the mass box.

5. Why does my answer have so many decimal places?

The calculator shows four decimal places so you do not lose accuracy in longer calculations. You can round the final answer to whatever your teacher or lab manual asks for, usually two or three significant figures.

6. What is the difference between molar mass and molecular mass?

They have the same number but different units. Molecular mass is the mass of one molecule in atomic mass units, while molar mass is the mass of one mole in grams per mole. Water has a molecular mass of 18.015 and a molar mass of 18.015 g per mol.

7. How do I convert moles back to grams?

Multiply the moles by the molar mass. This is the reverse of this calculator's conversion. For example, 2 moles of water x 18.015 g per mol = 36.03 grams.

8. Does this work for gases?

Yes. The conversion is the same for solids, liquids, and gases. For oxygen gas, use the molar mass of O2, which is 31.998 grams per mole, not the atomic mass of a single oxygen atom.

9. What if I do not know the molar mass?

You need the molar mass for this conversion, because it is the link between grams and moles. Look it up in a data table, calculate it from the chemical formula, or check the label on the reagent bottle.

10. Why do chemists use moles instead of grams?

Chemical reactions happen between particles, not between grams. One mole of anything always contains the same number of particles, so moles let chemists compare substances fairly. Grams alone cannot do that because different substances have different particle masses.

11. Can the answer be more than one mole?

Absolutely. If your mass is larger than the molar mass, the answer is more than one mole. For example, 100 grams of table salt gives 1.7112 moles, because 100 is larger than 58.44.

12. What are significant figures, and do they matter here?

Significant figures are the meaningful digits in a measurement. Your answer should not claim more precision than your inputs have. If you weighed 36 grams on a kitchen scale, reporting 1.9983 moles overstates the accuracy, and 2.0 moles is more honest.

13. Is molar mass always in grams per mole?

In chemistry it is the standard unit, and this calculator expects it. Some tables list kilograms per mole, which is a thousand times smaller, so always check the unit before entering the value.

14. Why do I keep getting the wrong answer in homework?

The usual suspects are dividing the wrong way round, entering milligrams instead of grams, or using the wrong molar mass. Work through the three steps in the examples above and compare your working line by line.

15. Can I use this for mixtures?

Only if you know the molar mass of the specific component you care about. For a mixture with no single formula, there is no single molar mass, so convert each known component separately instead.

Final Thoughts

Converting grams to moles is one small division, but it sits underneath almost everything in chemistry. Getting it right, with the units checked and the working shown, saves you from a whole family of downstream mistakes. Keep this calculator handy for homework and lab prep, remember the simple rule of mass divided by molar mass, and always do the quick backwards check: multiply your answer by the molar mass and confirm you get your original grams back.