Grams to Moles Calculator - CalcVenue

Grams to Moles Calculator

Convert between grams and moles for any substance using the formula n = m / M (moles = mass ÷ molar mass). Enter any two of mass, molar mass, and moles and the calculator finds the third — or let it work out the molar mass automatically from a chemical formula.

Molar mass source
Molar mass
Mass
Number of moles

Fill in any two of molar mass, mass, and number of moles — leave the one you want blank. In "From formula" mode the molar mass is calculated for you from the chemical formula.

Grams to Moles Calculator: Convert Mass and Amount of Substance

The grams to moles calculator converts between the mass of a substance and the number of moles it contains, using the fundamental chemistry formula n = m / M. It works in both directions — as a grams-to-moles converter and a moles-to-grams converter — and it can even find the molar mass when you know the mass and the number of moles. Enter any two of the three quantities and the calculator returns the third, with full support for units from nanograms to kilograms and from picomoles to moles. If you do not know the molar mass, type a chemical formula and the calculator works it out for you from the periodic table.

This page explains what a mole is, the grams-to-moles formula and how to use it, step-by-step worked examples you can reproduce, how molar mass is calculated, and answers to the questions students ask most. Whether you are balancing equations, preparing a solution in the lab, or studying for a chemistry exam, this tool takes the arithmetic off your plate.

What Is a Mole?

The mole is the SI unit for the amount of a substance. One mole contains exactly 6.02214076 × 10²³ elementary entities — atoms, molecules, ions, or whatever you are counting — a figure known as Avogadro's number. Just as a "dozen" always means twelve, a "mole" always means about 6.022 × 10²³. Chemists use the mole because atoms and molecules are far too small and numerous to count individually; instead, they weigh a sample and convert that mass into a number of moles, which tells them how many particles are present. This bridge between the mass you can measure on a balance and the number of particles that actually react is what makes the mole the beating heart of quantitative chemistry.

The Grams to Moles Formula

Converting grams to moles relies on one compact equation:

n = m / M

where n is the number of moles, m is the mass in grams, and M is the molar mass in grams per mole (g/mol). The molar mass is the mass of one mole of the substance, and it is numerically equal to the substance's atomic or molecular weight. Because the equation is a simple ratio, it rearranges easily to solve for whichever quantity you need:

Moles: n = m / M  ·  Mass: m = n × M  ·  Molar mass: M = m / n

That flexibility is why the calculator is bidirectional: give it any two of the three values and it computes the missing one.

How to Calculate Molar Mass

The molar mass of a compound is the sum of the molar masses of every atom in its chemical formula, read from the periodic table. To find it by hand, you multiply each element's atomic weight by how many of that atom appear in the formula, then add the results. For water, H₂O, there are two hydrogen atoms (about 1.008 g/mol each) and one oxygen atom (about 15.999 g/mol):

M(H₂O) = 2 × 1.008 + 15.999 = 18.015 g/mol

The calculator automates exactly this process: switch to "From formula" mode, type a formula such as H2O, Na2SO4, or C6H12O6, and it parses the elements and their counts — including bracketed groups like Ca(OH)2 — and returns the molar mass instantly.

Worked Example 1: Grams to Moles of Water

How many moles are there in 100 grams of water? Water has a molar mass of about 18.015 g/mol, so:

n = 100 g / 18.015 g/mol ≈ 5.551 mol

There are about 5.551 moles in 100 grams of water. This is the calculator's default (100 g of H₂O), so you can press Calculate to confirm it. Scaling up, 5,988 grams of water gives n = 5,988 / 18.015 ≈ 332.4 moles — the same formula, larger numbers.

Worked Example 2: Moles to Grams

Working the other way, how many grams are in 2 moles of sodium chloride (table salt, NaCl)? The molar mass of NaCl is about 58.44 g/mol, so:

m = n × M = 2 mol × 58.44 g/mol = 116.88 g

You would weigh out about 116.88 grams of salt to have 2 moles of it. Enter 2 in the moles field and the NaCl molar mass, leave the mass blank, and the calculator returns this figure — handy when preparing solutions of a known concentration.

Worked Example 3: Finding Molar Mass

If you know the mass and the number of moles, you can find the molar mass. Suppose 90 grams of a substance is known to be 0.5 moles. Then:

M = m / n = 90 g / 0.5 mol = 180 g/mol

The molar mass is 180 g/mol — which happens to be the molar mass of glucose, C₆H₁₂O₆. Leaving the molar mass field blank and entering the mass and moles lets the calculator identify it for you.

How to Use the Grams to Moles Calculator

  1. Decide how you will supply the molar mass. Choose "Enter molar mass" to type it directly, or "From formula" to have it calculated from a chemical formula.
  2. Enter two of the three quantities — molar mass, mass, and number of moles — choosing the units you prefer.
  3. Leave the unknown blank and press Calculate.
  4. Read the result, shown in your chosen units along with the equation used.

Units of Mass and Amount

Real chemistry problems span an enormous range of scales, so the calculator accepts many units. On the mass side you can work in nanograms, micrograms, milligrams, grams, decagrams, or kilograms; on the amount side in moles, millimoles, micromoles, nanomoles, or picomoles. Internally the tool converts everything to grams and moles, applies n = m / M, and then converts the answer back to the units you selected. This means you can, for example, find how many micromoles are in a few milligrams of a drug, or how many kilograms of reactant you need for a given number of moles in an industrial process, without doing any unit conversion by hand. Note that molar mass in grams per mole (g/mol) is numerically identical to kilograms per kilomole (kg/kmol), so those two options give the same number.

Why Converting Grams to Moles Matters

Chemical reactions happen between particles in whole-number ratios, not between equal masses, so almost every quantitative problem in chemistry starts by converting a measured mass into moles. Balancing equations, working out how much product a reaction will yield, figuring out which reactant runs out first (the limiting reagent), preparing a solution of a target molarity, and scaling a recipe up from the lab bench to the factory all depend on knowing the number of moles. Because you can weigh a substance but cannot directly count its molecules, the grams-to-moles conversion is the essential first step that turns a reading on a balance into the particle counts that chemistry actually cares about. Mastering it — and having a reliable calculator to check your work — unlocks the rest of stoichiometry.

Common Molar Masses

For quick reference, here are the approximate molar masses of some common substances, all of which the calculator can compute from their formulas:

SubstanceFormulaMolar mass (g/mol)
WaterH₂O18.015
Table saltNaCl58.44
Carbon dioxideCO₂44.01
GlucoseC₆H₁₂O₆180.16
Sodium hydroxideNaOH40.00
Sulfuric acidH₂SO₄98.08

Tips for Avoiding Mistakes

  • Match the state to the formula. Make sure the molar mass corresponds to the exact species you mean — anhydrous versus hydrated salts, for instance, have different molar masses.
  • Mind the units. The core formula needs grams and g/mol; the calculator converts for you, but check you have selected the right unit for each field.
  • Count atoms carefully. In formulas with brackets, the subscript outside multiplies everything inside — Ca(OH)₂ has two oxygen and two hydrogen atoms.
  • Keep significant figures sensible. Your answer should not be more precise than your least precise measurement.

Molar Mass vs. Molecular Weight vs. Atomic Weight

These three terms are closely related and often used interchangeably, but it is worth knowing the distinctions. Atomic weight (more properly, relative atomic mass) is the average mass of an element's atoms relative to a defined standard, and it is the number you read off the periodic table for a single element. Molecular weight (relative molecular mass) is the same idea applied to a whole molecule — the sum of the atomic weights of its atoms — and it is a dimensionless ratio. Molar mass is that same numerical value but expressed with units of grams per mole, describing the mass of exactly one mole of the substance. In everyday chemistry the number is identical for all three; the difference is really about whether you attach units and whether you mean one atom, one molecule, or one mole. This calculator works with molar mass in g/mol, which is what the n = m / M formula requires, and it computes that value for you from any chemical formula.

The Role of Avogadro's Number

Underneath every grams-to-moles conversion sits Avogadro's number, 6.02214076 × 10²³ particles per mole. It is the bridge between the macroscopic world of grams that you can weigh and the microscopic world of individual atoms and molecules. Once you have converted a mass into moles with this calculator, multiplying by Avogadro's number tells you the actual count of molecules present. For instance, the 5.551 moles in 100 grams of water correspond to about 5.551 × 6.022 × 10²³ ≈ 3.34 × 10²&sup4; individual water molecules — an almost unimaginable number that shows why chemists prefer to count in moles rather than in raw particles. The mole and Avogadro's number together let scientists move seamlessly between what they can measure on a balance and what is actually happening at the level of atoms.

Using Grams and Moles in Stoichiometry

The grams-to-moles conversion is the first step in almost every stoichiometry problem. A balanced chemical equation tells you the ratio in which substances react — but that ratio is given in moles, not grams. So the standard workflow is: convert the grams of your starting material to moles, use the equation's coefficients to find the moles of product or of another reactant, and then convert back to grams if you need a mass. For example, to find how much product a reaction yields, you begin by turning the mass of your reactant into moles with n = m / M, exactly what this calculator does. The same conversion identifies the limiting reagent — the reactant that runs out first — because you must compare amounts in moles, not in grams, to see which one restricts the reaction. Being fluent with grams-to-moles conversions therefore unlocks yield calculations, limiting-reagent analysis, and solution preparation alike.

Frequently Asked Questions

How do you convert grams to moles?

Divide the mass in grams by the molar mass in grams per mole: n = m / M. For example, 100 g of water divided by 18.015 g/mol gives about 5.551 moles.

How do you convert moles to grams?

Multiply the number of moles by the molar mass: m = n × M. For example, 2 moles of NaCl × 58.44 g/mol = 116.88 grams.

What is molar mass?

Molar mass is the mass of one mole of a substance, in grams per mole. It equals the sum of the atomic weights of all the atoms in the chemical formula.

How many moles are in 100 grams of water?

About 5.551 moles, because 100 g ÷ 18.015 g/mol ≈ 5.551 mol.

Is g/mol the same as kg/kmol?

Yes, numerically. A molar mass of 18.015 g/mol is the same as 18.015 kg/kmol, so the value does not change when you switch between those two units.

Can I find molar mass from mass and moles?

Yes. Rearrange the formula to M = m / n. Enter the mass and the number of moles, leave the molar mass blank, and the calculator returns it.

Disclaimer

This Grams to Moles Calculator is provided for general educational purposes. Molar masses are computed from standard atomic weights and may differ very slightly from values that use different isotopic conventions. Always double-check critical laboratory calculations against an authoritative source.