Skip to main content
Skip to calculator
Advertisement

Last updated: July 3, 2026

Grams to Moles Calculator

Quick Answer

The grams to moles calculator converts mass to amount of substance with n = m / M, where m is grams and M is molar mass in g/mol. It can also rearrange the same equation to solve for mass or molar mass, and optionally multiplies moles by Avogadro's constant to estimate particles.

To convert grams to moles, divide the mass in grams by the molar mass in grams per mole. For example, 18.015 grams of water divided by 18.015 grams per mole equals 1 mole.

Key Takeaways

  • The primary relation is n = m / M: moles equal grams divided by molar mass.
  • Use m = n × M to convert moles back into grams.
  • Use M = m / n when mass and moles are known and molar mass is unknown.
  • Optional particle count equals moles multiplied by Avogadro's constant, 6.022×10²³.
  • Correct units matter: mass in grams and molar mass in g/mol leave the answer in mol.
Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

n = m / M; m = n × M; M = m / n; particles = n × N_A

Where:

  • n=Amount of substance(mol)
  • m=Mass(g)
  • M=Molar mass(g/mol)
  • N_A=Avogadro constant(particles/mol)
  • N=Number of particles(particles)
Grams to Moles ConversionMass in grams is divided by molar mass in grams per mole to obtain amount of substance in moles. The worked example shows 18.015 grams of water divided by 18.015 grams per mole equals 1 mole.Grams ÷ Molar Mass → MolesA balance measurement becomes a counted chemical amount.Mass measuredm = 18.015 g÷Molar massM = 18.015g/mol for H2OMoles1.000moln = m / M = 18.015 g / 18.015 g·mol−1 = 1 molOptional particles: 1 mol × 6.022×1023 = 6.022×1023 moleculesUse after finding molar mass, then continue into stoichiometry.The same relation also solves grams or g/mol.
Convert weighed grams into moles by dividing by the compound's molar mass.

Worked Examples

Water: 18.015 g is 1 mol

A water sample whose mass equals water's molar mass contains one mole.

  1. 1Use n = m ÷ M.
  2. 2Substitute m = 18.015 g and M = 18.015 g/mol.
  3. 3n = 18.015 ÷ 18.015 = 1 mol.
Final Answer: 1 mol

Sodium chloride: 58.44 g is 1 mol

Table salt uses formula units, but the grams-to-moles relation is the same.

  1. 1Use n = m ÷ M.
  2. 2Substitute m = 58.44 g and M = 58.44 g/mol.
  3. 3n = 1 mol of NaCl formula units.
Final Answer: 1 mol

Twice the molar mass of water gives 2 mol

Doubling mass while molar mass stays fixed doubles the amount of substance.

  1. 1Use n = 36.03 g ÷ 18.015 g/mol.
  2. 2The units g cancel, leaving mol.
  3. 3n = 2 mol.
Final Answer: 2 mol

Small water sample: 9.0 g

A 9.0 g water sample is about half a mole.

  1. 1Use n = 9.0 g ÷ 18.015 g/mol.
  2. 2Keep extra digits during division.
  3. 3n = 0.4996 mol, approximately 0.5 mol.
Final Answer: 0.4996 mol

Solve mass from moles

Find grams needed for 2 mol of a substance with M = 40 g/mol.

  1. 1Rearrange the relation to m = n × M.
  2. 2Substitute n = 2 mol and M = 40 g/mol.
  3. 3m = 80 g.
Final Answer: 80 g mol

One mole as particles

Convert one mole into molecules using Avogadro's constant.

  1. 1First calculate moles: 18.015 ÷ 18.015 = 1 mol.
  2. 2Multiply by Avogadro's constant: N = 1 × 6.022×10²³.
  3. 3The sample contains about 6.022×10²³ molecules.
Final Answer: 1 mol (6.022×10²³ molecules) mol

Introduction

The grams to moles calculator converts a weighed mass into amount of substance using the core stoichiometry relation n = m / M. Enter mass in grams and molar mass in g/mol to get moles, or switch modes to solve for grams or molar mass. This tool is intentionally focused on the grams↔moles bridge: if you need to calculate molar mass from a formula first, use the molar mass calculator; if you are preparing a solution, continue with the molarity calculator. The mole definition and Avogadro constant follow the BIPM SI Brochure and IUPAC terminology.

What does grams to moles mean?

Grams are a laboratory mass measurement; moles count chemical amount. Because atoms and molecules are too small to count one by one, chemists use molar mass as the conversion factor. A molar mass of 18.015 g/mol for water means 18.015 grams of water contains 1 mole of water molecules. In symbols, n is moles, m is mass in grams, and M is molar mass in grams per mole.

  • Mass answers how much sample is on the balance.

  • Moles answer how many chemical units are present on the stoichiometric scale.

  • Molar mass connects the two with units g/mol.

  • Particle count is optional and uses Avogadro's constant.

Formula and rearrangements

The primary calculation is n = m / M. Algebra gives two useful rearrangements: m = n × M when you know moles and need grams, and M = m / n when you know mass and moles and want molar mass. The calculator returns one consistent output set, so the solved value appears alongside the other known values.

Use grams for mass and g/mol for molar mass. If your mass is in milligrams, divide by 1000 before entering it.

How to convert grams to moles

A reliable manual workflow is short: identify the compound, look up or calculate its molar mass, measure the sample mass, divide mass by molar mass, and round the final result according to your measurements. For example, 9.0 g of water divided by 18.015 g/mol gives 0.4996 mol, which is commonly reported as about 0.50 mol.

  • Find M from a label, data table, or the molar mass calculator.

  • Record mass m in grams.

  • Calculate n = m ÷ M.

  • Check that grams cancel and mol remains.

  • Use the moles in stoichiometry, yield, or concentration calculations.

Optional particle count with Avogadro's constant

One mole contains exactly 6.02214076×10²³ specified elementary entities in the SI. Multiplying moles by this constant estimates molecules for covalent compounds, atoms for elements, ions for ionic species in solution, or formula units for crystalline salts. For classroom and most laboratory work, 6.022×10²³ is the standard rounded value. See the NIST constants database for the exact constant.

Choose a clear particle label: molecules for water, atoms for helium, ions for chloride in solution, or formula units for NaCl crystals.

Where this fits in stoichiometry

Grams-to-moles conversion is usually the first or last step in a stoichiometry chain. Convert grams of a reactant to moles, use balanced-equation coefficients as mole ratios, then convert product moles back to grams. That is why this calculator pairs naturally with the theoretical yield calculator and percent yield calculator.

TaskTypical relationCompanion tool
Find moles from a weighed samplen = m / MThis calculator
Prepare a molar solutionMolarity = n / VMolarity calculator
Predict product massmoles × mole ratio × molar massTheoretical yield calculator
Compare actual to theoretical massactual / theoretical × 100%Percent yield calculator

Common molar masses used in examples

These reference values are enough for many introductory conversions, but hydrate forms, isotopic enrichment, and purity corrections may require more specific data. For authoritative terminology and quantities, compare with the IUPAC Gold Book and standard general chemistry texts.

SubstanceFormulaMolar mass (g/mol)1 mol mass
WaterH₂O18.01518.015 g
Sodium chlorideNaCl58.4458.44 g
Sodium hydroxideNaOH40.0040.00 g
Carbon dioxideCO₂44.0144.01 g
GlucoseC₆H₁₂O₆180.16180.16 g

Common mistakes to avoid

Most errors come from using the wrong molar mass, mixing units, or rounding too early. Molar mass belongs to the substance, not the sample size: doubling the sample doubles moles but does not change M. For salts such as hydrates, include waters of crystallization in M. For solution calculations, convert grams to moles before using amount concentration or reaction ratios.

  • Do not divide by atomic mass for a compound unless it is a monatomic element.

  • Do not use kilograms with a g/mol molar mass without converting units.

  • Do not round a half-mole example to 1 mol just because it is close.

  • Do not confuse moles (mol) with molecules or formula units.

Quick Reference Card

Grams to Moles — Quick Reference

Quick referenceGrams to Moles Calculator

n = m / M; m = n × M; M = m / n; particles = n × 6.022×10²³

Valid range: Use positive finite values; typical lab samples range from micromoles to several moles depending on substance and scale.

Common Values

Water18.015 g = 1 mol
Sodium chloride58.44 g = 1 mol
Sodium hydroxide40.00 g = 1 mol
Carbon dioxide44.01 g = 1 mol
Glucose180.16 g = 1 mol

Watch Out

  • Use the molar mass of the exact compound, not just one element in the formula.
  • Convert milligrams or kilograms to grams before using a g/mol molar mass.
  • Include waters of hydration and counterions when they are part of the weighed substance.
  • Do not round intermediate moles before applying stoichiometric ratios.

Pro Tips

  • Estimate with rounded molar masses first to catch order-of-magnitude mistakes.
  • Keep the full calculator result until the final reported significant figures.
  • Use particle output only after deciding whether your entities are molecules, atoms, ions, or formula units.
  • Pair this conversion with theoretical-yield calculations for balanced-equation problems.

FAQs

How do I convert grams to moles?

Divide the mass in grams by the molar mass in grams per mole: n = m / M. For water, 18.015 g divided by 18.015 g/mol equals 1 mol.

How do I convert moles back to grams?

Multiply moles by molar mass: m = n × M. For 2 mol of a substance with molar mass 40 g/mol, the mass is 80 g.

Where do I get molar mass?

Use a periodic-table calculation from the formula, a reagent label, or the molar mass calculator. The molar mass must match the exact compound, including hydrates if present.

Is one mole always 6.022×10²³ particles?

Yes, one mole contains exactly 6.02214076×10²³ specified entities in the SI. The calculator uses 6.022×10²³ for the optional displayed particle estimate.

Can this calculator solve for molar mass?

Yes. Choose the molar-mass mode and enter mass plus moles; it applies M = m / n and reports g/mol.

What is the unit cancellation in n = m / M?

Molar mass has units g/mol, so grams divided by g/mol is equivalent to grams times mol/grams. The grams cancel, leaving moles.