What does the Grams to Moles Converter do?
The Grams to Moles Converter does the chemistry-class staple in two clicks: pick a compound from the dropdown (water, NaCl, glucose, ethanol, CO₂, and 15 more), or type a molar mass directly. Then enter mass in grams. The amount in moles updates instantly — and so does the formula line, with values plugged in: moles = 18 g ÷ 18.015 g/mol = 0.999 mol. Copy the formula straight into your homework. The converter works in both directions: type a mole value, get the equivalent grams. Tap any row in the reference table to load that compound.
Quick anchors: 18 grams of water ≈ 1 mole. 58.44 grams of NaCl = exactly 1 mole. 180 grams of glucose ≈ 1 mole. The rule is moles = mass ÷ molar mass, where molar mass is the mass (in grams) of one mole of the substance — for water 18.015, for NaCl 58.44, for glucose 180.16.
Grams and moles explained
What is a gram?
A gram is a unit of mass — about the weight of a paperclip, or one cubic centimeter of water. SI base unit (technically the SI standard is the kilogram, but for chemistry-scale work the gram is the everyday unit). Every digital scale in a chemistry lab reads in grams.
What is a mole?
A mole is just a count, like "a dozen" is 12. One mole = 6.022 × 10²³ particles (Avogadro's number). The reason chemists use moles instead of just counting atoms or molecules is that the number was chosen so that one mole of carbon-12 atoms weighs exactly 12 grams. That single calibration makes the math between everyday-scale grams and atomic-scale particle counts work out cleanly.
So when a recipe says "dissolve 0.1 moles of NaCl," that's 6.022 × 10²² molecules — and weighing it out is a matter of doing the math: 0.1 × 58.44 g/mol = 5.844 grams. The mole is what bridges the gap between what we can weigh on a scale (grams) and what we need to count for a reaction (molecules).
How the grams-to-moles conversion works
moles = mass (g) ÷ molar mass (g/mol)
mass (g) = moles × molar mass (g/mol)
The molar mass (M) is the mass of one mole of the substance. For an element, it's the atomic weight in grams (carbon = 12.011 g/mol, oxygen = 15.999, hydrogen = 1.008). For a compound, it's the sum of all atomic weights in the formula.
Worked example: how many moles are in 18 grams of water (H₂O)?
- Molar mass of water: 2(1.008) + 15.999 = 18.015 g/mol
- moles = 18 g ÷ 18.015 g/mol = 0.999 mol
- (Almost exactly 1 mole. To get exactly 1 mole of water, you'd need 18.015 g.)
Reverse direction: how many grams in 0.5 moles of glucose (C₆H₁₂O₆)?
- Molar mass of glucose: 6(12.011) + 12(1.008) + 6(15.999) = 180.16 g/mol
- mass = 0.5 mol × 180.16 g/mol = 90.08 g
The molar mass column is the only thing that changes from compound to compound. Once you have it, the math is one multiplication or division.
Common molar masses for chemistry-class lookups
The 20 compounds most often searched for in classroom and lab work, with their molar masses and the grams equivalent of 1 mole:
| Compound | Formula | Molar mass (g/mol) | 1 mole = |
|---|---|---|---|
| Water | H₂O | 18.015 | 18.015 g |
| Sodium chloride (table salt) | NaCl | 58.44 | 58.44 g |
| Glucose | C₆H₁₂O₆ | 180.16 | 180.16 g |
| Ethanol | C₂H₆O | 46.07 | 46.07 g |
| Carbon dioxide | CO₂ | 44.01 | 44.01 g |
| Sodium bicarbonate (baking soda) | NaHCO₃ | 84.01 | 84.01 g |
| Calcium carbonate (chalk) | CaCO₃ | 100.09 | 100.09 g |
| Potassium chloride | KCl | 74.55 | 74.55 g |
| Magnesium chloride | MgCl₂ | 95.21 | 95.21 g |
| Ammonia | NH₃ | 17.03 | 17.03 g |
| Hydrogen chloride | HCl | 36.46 | 36.46 g |
| Sulfuric acid | H₂SO₄ | 98.08 | 98.08 g |
| Sodium hydroxide | NaOH | 40.00 | 40.00 g |
| Potassium hydroxide | KOH | 56.11 | 56.11 g |
| Iron(III) oxide (rust) | Fe₂O₃ | 159.69 | 159.69 g |
| Methane | CH₄ | 16.04 | 16.04 g |
| Oxygen (gas) | O₂ | 32.00 | 32.00 g |
| Hydrogen (gas) | H₂ | 2.02 | 2.02 g |
| Nitrogen (gas) | N₂ | 28.01 | 28.01 g |
Two patterns worth noticing. Diatomic gases are double their atomic weight — N₂ is 28.01, not 14.01, because nitrogen exists naturally as N₂ molecules. Same for O₂, H₂. Salts are roughly the sum of their parts — NaCl (58.44) is just sodium (22.99) plus chlorine (35.45). Once you've memorized a few atomic weights, you can build most molar masses in your head.
The molar masses above are IUPAC standard atomic weights rounded to 2–4 decimal places. Sufficient for school chemistry, lab dilutions, and most analytical work. For ultra-high-precision (analytical reference standards, isotope-specific measurements) consult the IUPAC 2021 standard atomic weights publication.
When you'll need to convert grams to moles
Pretty much any time chemistry meets a scale.
Stoichiometry homework. The classic chemistry-class problem: "How many grams of NaOH do you need to neutralize 25 mL of 0.1M HCl?" The answer requires converting molarity (mol/L) into moles (multiplying by volume in liters), then converting moles into grams (multiplying by molar mass). The grams-to-moles step happens at every stage of stoichiometry.
Preparing solutions in a lab. A protocol calls for "10 mM glucose solution, 500 mL." That's 0.010 mol/L × 0.500 L = 0.005 moles of glucose. Multiply by 180.16 g/mol = 0.9008 g of glucose. Weigh that out, dissolve in water to 500 mL final volume. Done.
Calculating reaction yields. "We added 5 grams of NaCl and 3 grams of AgNO₃ — what's the limiting reagent?" Convert each to moles, compare to the stoichiometric ratio (1:1 for this reaction), the smaller mole count is the limiting reagent. Without converting to moles, the gram ratio is misleading.
Reading nutrition labels analytically. "60 g of carbohydrates" doesn't tell you the molecular impact directly — but converting to moles (60 ÷ 180 ≈ 0.33 mol of glucose-equivalent) gives you a count that maps to metabolic-pathway calculations. Useful for biochemistry students working through cellular respiration math.
Air and water quality calculations. Pollutant concentrations in air get reported as ppm or μg/m³, but reaction rates and atmospheric models use moles per cubic meter. Converting between is a daily reality for environmental chemists.
Edge cases and gotchas
The molar mass of an element vs. the molar mass of its molecular form. "Hydrogen" can mean H (1.008 g/mol) or H₂ (2.02 g/mol). For practical chemistry — anything you'd weigh in a lab — you almost always want the molecular form. Hydrogen gas you measure with a pressure gauge is H₂; an oxygen molecule in air is O₂; nitrogen is N₂. The picker in this calculator uses the molecular forms by default.
Molar mass changes with isotope composition. The standard atomic weights are weighted averages of natural isotopes. For deuterium-labeled compounds (²H₂O, "heavy water"), the molar mass is 20.03, not 18.015 — a 11% difference. For ¹³C-labeled glucose, the molar mass shifts up by 6 × 1 ≈ 6 g/mol. If you're working with isotopically labeled compounds, manually enter the molar mass.
Hydrates have water in their formula. Copper sulfate pentahydrate (CuSO₄·5H₂O) has molar mass 249.69, not the 159.61 of anhydrous CuSO₄. Many lab chemicals are sold as hydrates, and confusing the two gives you a 56% mass error. Always check the bottle label for "·xH₂O" or "anhydrous."
Moles is dimensional, not just a ratio. Sometimes textbooks treat "1 mole" as a dimensionless count. It's actually a unit (mol), formally one of the seven SI base units. Treat it like meters or seconds — when you write equations, the mol units cancel where they should: (g) ÷ (g/mol) = mol. Keep track of units; they save you from algebra mistakes.
Significant figures matter. If your scale reads "18 g" with no decimal, you have 2 significant figures — meaning the moles answer should be reported as 1.0 mol (2 sig figs), not 0.99917 (5 sig figs). The calculator displays more precision than the input warrants because the math is exact; the user is responsible for rounding to the appropriate sig figs for their measurement.
Related converters and tools
Grams ↔ moles is one piece of the chemistry-calculation toolkit. Related Microapp tools:
- For weighing in cooking and lab contexts where you need ounces too, the Grams to Ounces Converter handles avoirdupois ounce conversions.
- For unit conversions in physics and engineering more broadly (length, weight, temperature), see the Length Converter, Weight Converter, and Temperature Converter.
- For lab-specific volume conversions (mL, fl oz, cups), the mL to fl oz Converter covers the common ones.
- If you're working through more abstract chemistry calculations, the long-form Area of a Circle and other geometry calculators sometimes show up unexpectedly in surface-area-of-reaction problems.
Frequently asked questions
What's the formula?
moles = mass (g) ÷ molar mass (g/mol). Or going the other way: mass (g) = moles × molar mass. The molar mass is the mass of one mole of the substance — for water it's 18.015 g/mol, for sodium chloride 58.44, for glucose 180.16. The picker fills it in for the 20 most-common compounds; for anything else, type it manually.
What's a mole, exactly?
A mole is just a count, like a dozen is 12. One mole = 6.022 × 10²³ particles (Avogadro's number). It was chosen so that 1 mole of carbon-12 atoms weighs exactly 12 grams, which makes the math between everyday-scale grams and atomic-scale counts work out cleanly. So 1 mole of water (M = 18.015) weighs 18.015 grams; 1 mole of glucose (M = 180.16) weighs 180.16 grams.
How do I find the molar mass of a compound that's not in the picker?
Add up the atomic masses (from the periodic table) of every atom in the formula. For example, sucrose is C₁₂H₂₂O₁₁: 12 × 12.01 + 22 × 1.008 + 11 × 16.00 = 342.30 g/mol. Then choose "Custom" in the picker and type that into the Molar mass field.
Why does the converter show 0.999 mol for 18 grams of water and not exactly 1?
Because the molar mass of water is 18.015 g/mol — slightly more than 18. So 18 g ÷ 18.015 g/mol = 0.999 mol. To get exactly 1 mole of water, you'd need 18.015 grams. The 0.015 g difference comes from the average atomic masses of natural hydrogen and oxygen (which include trace heavier isotopes like deuterium and ¹⁸O). For typical school problems, "1 mole ≈ 18 g of water" is fine.
Are the molar masses in the picker exact?
They're standard IUPAC atomic-weight values rounded to 2–4 decimal places — accurate to 4 significant figures. Sufficient for school chemistry, lab dilutions, and stoichiometry homework. For analytical reference standards or isotope-specific work, consult the IUPAC 2021 standard atomic weights publication.
Can I convert moles to grams in the same view?
Yes — the calculator is bidirectional. Type a value in the moles field and the grams field updates instantly. The formula line flips to show the calculation in the direction you asked for: "grams = X mol × M g/mol = Y g."
What's the difference between molar mass and molecular weight?
For most everyday chemistry, they're used interchangeably. Strictly: molecular weight is dimensionless (a ratio of an atom's mass to 1/12 the mass of a carbon-12 atom); molar mass has units of g/mol. Numerically they're the same — molecular weight 18.015 = molar mass 18.015 g/mol. Don't lose sleep over it; use whichever your textbook prefers.
Is my data saved or sent anywhere?
No. The math runs entirely in your browser. Nothing is logged, stored, or transmitted — your numbers stay local.