Last updated: July 3, 2026
Grams to Moles Calculator
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
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.
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
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)
Worked Examples
Water: 18.015 g is 1 mol
A water sample whose mass equals water's molar mass contains one mole.
- 1Use n = m ÷ M.
- 2Substitute m = 18.015 g and M = 18.015 g/mol.
- 3n = 18.015 ÷ 18.015 = 1 mol.
Sodium chloride: 58.44 g is 1 mol
Table salt uses formula units, but the grams-to-moles relation is the same.
- 1Use n = m ÷ M.
- 2Substitute m = 58.44 g and M = 58.44 g/mol.
- 3n = 1 mol of NaCl formula units.
Twice the molar mass of water gives 2 mol
Doubling mass while molar mass stays fixed doubles the amount of substance.
- 1Use n = 36.03 g ÷ 18.015 g/mol.
- 2The units g cancel, leaving mol.
- 3n = 2 mol.
Small water sample: 9.0 g
A 9.0 g water sample is about half a mole.
- 1Use n = 9.0 g ÷ 18.015 g/mol.
- 2Keep extra digits during division.
- 3n = 0.4996 mol, approximately 0.5 mol.
Solve mass from moles
Find grams needed for 2 mol of a substance with M = 40 g/mol.
- 1Rearrange the relation to m = n × M.
- 2Substitute n = 2 mol and M = 40 g/mol.
- 3m = 80 g.
One mole as particles
Convert one mole into molecules using Avogadro's constant.
- 1First calculate moles: 18.015 ÷ 18.015 = 1 mol.
- 2Multiply by Avogadro's constant: N = 1 × 6.022×10²³.
- 3The sample contains about 6.022×10²³ molecules.
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.
| Task | Typical relation | Companion tool |
|---|---|---|
| Find moles from a weighed sample | n = m / M | This calculator |
| Prepare a molar solution | Molarity = n / V | Molarity calculator |
| Predict product mass | moles × mole ratio × molar mass | Theoretical yield calculator |
| Compare actual to theoretical mass | actual / 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.
| Substance | Formula | Molar mass (g/mol) | 1 mol mass |
|---|---|---|---|
| Water | H₂O | 18.015 | 18.015 g |
| Sodium chloride | NaCl | 58.44 | 58.44 g |
| Sodium hydroxide | NaOH | 40.00 | 40.00 g |
| Carbon dioxide | CO₂ | 44.01 | 44.01 g |
| Glucose | C₆H₁₂O₆ | 180.16 | 180.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 reference • Grams 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
⚠ 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.