DataToolsLab
Chemistry Calculators

Grams to Moles Converter

Convert between grams and moles in either direction, using a formula's molar mass.

Loading tool…

What is Grams ↔ Moles?

Grams and moles are the two ways of saying how much of a substance you have. A balance gives you grams; every reaction calculation needs moles. This converter is the bridge, in both directions, and it also reports millimoles and milligrams because laboratory concentrations are usually expressed in those.

How it works

m = n × M converts moles to mass and n = m ÷ M converts the other way, where M is the molar mass derived from the formula you enter. If you already know the molar mass — it is printed on every reagent bottle — type it directly instead of a formula.

  1. Enter what you know. Every field recalculates as you type — there is no submit button. Leave the quantity you want blank and the page solves for it.
  2. Read the answer and the working. The result appears above the fold; underneath it is the formula with your numbers substituted, so the arithmetic can be checked rather than trusted.
  3. Check the units and the size. Units are shown on every value and selectable per field, so a result in kJ, kPa or km/h is converted rather than assumed. Sanity-check the magnitude against a known landmark such as 1 g/cm³ for water.

Examples

A textbook problem with a known answer

Every tool here is checked against standard example problems — the molar mass of C6H12O6 is 180.16 g/mol, and free fall from 20 m takes about 2.02 s at g = 9.8 m/s².

A result you want to reason backwards from

Leave the quantity you already know blank instead: given the final answer, most tools recover the starting value — the mass needed for a target concentration, or the height a fall must have had.

Common mistakes

Forgetting that a formula is only as good as its subscripts

H2O and H2O2 are different compounds. The formula field shows its parse — element by element — so a mis-typed subscript is visible before it reaches the arithmetic.

Mixing units in the middle of a calculation

The most common source of a wrong answer is a value in grams next to a formula expecting kilograms, or Celsius next to a gas constant expecting kelvin. This category converts on the way in and labels what it used.

Frequently asked questions

How many moles are in 25 g of water?

About 1.39 mol. The molar mass of H2O is 18.015 g/mol, so n = 25 ÷ 18.015 = 1.388 mol — load the example to see exactly that working.

Which direction do I use for a solution?

Weigh out grams, convert to moles, then divide by the volume to get molarity. The Molarity Calculator does the last step.

Online