Grams to Moles Calculator: Mass, Moles & Molar Mass

Grams to Moles Calculator

Convert between mass, moles, and molar mass using the molar mass of your chosen substance and Avogadro's constant (NA = 6.02214076 × 1023 mol-1).

Calculation mode
Know the molar mass: pick a substance (or enter a custom molar mass), then enter either mass or moles and the other will be computed.
Substance
Picking a substance fills in its molar mass automatically. Select Custom substance to enter any molar mass you like.
Quantities
g/mol
g
mol
In know the molar mass mode, edit mass or moles and the other follows. Scientific notation is accepted, for example 6.022e23 or 6.022 × 10^23.
Grams to moles results
Amount in moles (n)
N/A
N/A N/A N/A
Enter a positive value in the input fields to convert between grams and moles.
Mass (m)
N/A
Moles (n)
N/A
Molar mass (M)
N/A
Particles (N)
N/A
Calculation breakdown
QuantityValueFormulaNotes
Step-by-step working
StepQuantityFormulaValue
Full summary
MetricValueNotes
Powered by Toolraxy
Embed this calculator
Embed code
Live preview, identical to the main calculator EXACT MATCH
Cite this calculator
N/A

Select a citation style above. Click the citation text to select it all, then copy.

ADVERTISEMENT

Creator & Maintainer

Image of Faiq Ur Rahman, CEO & Founder Toolraxy

Faiq Ur Rahman

Founder & CEO, Toolraxy

Faiq Ur Rahman is a web designer, digital product developer, and founder of Toolraxy, a growing platform of web-based calculators and utility tools. He specializes in building structured, user-friendly tools focused on health, finance, productivity, and everyday problem-solving.

Share:

Rate this Tool

User Ratings:

0
0 out of 5 stars (based on 0 reviews)
Excellent
Very good
Average
Poor
Terrible

ADVERTISEMENT

ADVERTISEMENT

What Is a Grams to Moles Conversion?

A grams to moles conversion turns a measured mass into an amount of substance by dividing the mass by the substance’s molar mass. The formula is n = m / M, where n is moles, m is mass in grams, and M is molar mass in g/mol. The IUPAC Gold Book defines molar mass as mass divided by amount of substance, which is why the unit g/mol makes the grams cancel and leaves moles.

The mole is the SI unit for amount of substance, fixed at exactly 6.02214076 × 10²³ elementary entities . Molar mass is the bridge between that count and a balance reading. For water, the molar mass is 18.015 g/mol, so 18.015 g of water is one mole. For sodium chloride, it’s 58.44 g/mol, so 58.44 g of salt is one mole of formula units. Every substance has its own molar mass, and that’s why this calculator asks you to pick one or enter a custom value. The conversion itself is one division, but getting the molar mass right is where most errors happen.

How Do You Convert Grams to Moles Without Guessing the Molar Mass?

Pick a substance from the preset list, or choose Custom and type its molar mass. Then enter either a mass or a mole count, and the other field updates automatically.

  1. Leave the mode on “I know the molar mass of the substance.”

  2. Choose a substance from the dropdown. Water is selected by default at 18.015 g/mol.

  3. Click into the Mass field and type a value in grams. The moles field fills in.

  4. Or click into the Moles field and type an amount. The mass field fills in.

  5. Check the hero panel for the mole count, then scroll to the step-by-step table to see the formula that ran.

Grams to Moles Formula: n = m / M

The core relationship is n = m / M. Divide mass by molar mass to get moles. Multiply moles by molar mass to get grams back.

Formula: n = m / M
Formula: m = n × M
Formula: M = m / n

n is moles, m is mass in grams, and M is molar mass in g/mol. The first formula is the grams-to-moles path; the second is the moles-to-grams path; the third is what the calculator uses in “find the molar mass” mode. The tool accepts scientific notation in every field, so 6.022e23 and 6.022 × 10^23 both parse. It displays results to four decimal places by default and keeps full precision internally. It does not support unit switching; mass must be in grams and molar mass in g/mol. If the molar mass is missing or zero, the tool cannot compute moles from mass, and the verdict banner says so. The CK-12 chemistry module states the conversion plainly: divide grams by molar mass to get moles, multiply moles by molar mass to get grams.

Converting 36.03 g of Water to Moles

Suppose you weigh 36.03 g of water and need the mole amount for a dilution calculation. The molar mass of water is 18.015 g/mol. Click into the Mass field, type 36.03, and the calculator runs n = m / M: 36.03 ÷ 18.015 = 2.000 mol. The hero panel shows 2.0000 mol, and the particle tile shows 1.2044 × 10²⁴ molecules.

Now switch to the second mode, “I know the mass and number of moles,” and enter 36.03 g with 2.0000 mol. The calculator computes M = m / n = 36.03 ÷ 2.0000 = 18.015 g/mol, and the verdict banner confirms that the closest known substance is Water. The step table shows the division that produced the molar mass.

Where Are Grams to Moles Conversions Applied?

The conversion shows up in any setting where someone weighs a solid and needs a mole-based quantity. Pharmacy, analytical chemistry, and teaching labs are the obvious ones, but the same math runs in geochemistry and materials work.

 

Pharmaceutical compounding

A compounding pharmacist receives an API in grams but the formula is written in moles. Dividing the weighed mass by the drug’s molar mass gives the mole amount, which then feeds the concentration calculation. A 500 mg dose of a compound with M = 250 g/mol is 0.00200 mol, and that number decides the final volume.

 

Analytical chemistry sample prep

An analyst preparing a calibration standard weighs a primary standard and needs its mole amount to calculate concentration. The conversion is the first step in every standard prep. A 0.1000 g sample of potassium dichromate (M = 294.18 g/mol) is 3.399 × 10⁻⁴ mol, and that mole count sets the standard’s molarity.

 

Undergraduate teaching labs

Students meet grams-to-moles in the first weeks of general chemistry. A calculator that shows the division and the units makes the unit-cancellation logic visible. An instructor can demonstrate that 5.00 g of CaCO₃ (M = 100.09 g/mol) is 0.0500 mol, and that multiplying back returns the same mass.

 

Geochemistry and materials characterization

A geologist weighing a mineral sample needs the mole amount of a specific oxide to compare against a norm calculation. The mass-to-mole step is routine, and the molar mass comes from the mineral’s formula. A 2.50 g sample of CaCO₃ is 0.0250 mol, which then feeds the carbonate content calculation.

Molar Mass of Common Substances

This table lists molar masses for substances in the calculator’s preset database. Values are calculated from IUPAC 2021 standard atomic weights and rounded to three decimal places. Water’s value of 18.015 g/mol is consistent with the NIST Chemistry WebBook entry for water.

SubstanceMolar mass (g/mol)
Water (H₂O)18.015
Carbon dioxide (CO₂)44.010
Sodium chloride (NaCl)58.440
Glucose (C₆H₁₂O₆)180.156
Sucrose (C₁₂H₂₂O₁₁)342.297
Ethanol (C₂H₅OH)46.069
Methanol (CH₃OH)32.042
Hydrogen gas (H₂)2.016
Oxygen gas (O₂)31.998
Nitrogen gas (N₂)28.014
Methane (CH₄)16.043
Ammonia (NH₃)17.031

Grams to Moles Table

Use this table to estimate mole amounts from common masses without running the calculator. Values assume a pure substance and the exact molar mass from the preset database.

Mass and substanceMole amount
18.015 g water1.000 mol
36.03 g water2.000 mol
1.000 g water0.05551 mol
58.44 g NaCl1.000 mol
5.844 g NaCl0.1000 mol
180.156 g glucose1.000 mol
18.016 g glucose0.1000 mol
44.01 g CO₂1.000 mol
4.401 g CO₂0.1000 mol
100.09 g CaCO₃1.000 mol

Frequently Asked Questions

How do you convert grams to moles?

Divide the mass in grams by the molar mass in g/mol. For example, 36.03 g of water divided by 18.015 g/mol is 2.000 mol.

 

What is the formula for grams to moles?

n = m / M, where n is moles, m is mass in grams, and M is molar mass in g/mol. The units cancel: g ÷ (g/mol) = mol.

 

How many grams are in a mole?

One mole of a substance weighs its molar mass in grams. Water is 18.015 g/mol, sodium chloride is 58.44 g/mol, and glucose is 180.156 g/mol. The number of grams per mole is different for every substance.

 

How do you find molar mass from mass and moles?

Divide the mass by the mole amount: M = m / n. If you have 36.03 g and 2.000 mol, the molar mass is 18.015 g/mol. The calculator’s second mode does this for you.

 

How many moles are in 100 grams of water?

About 5.551 mol. Divide 100 by 18.015. The result is 5.5512 mol, which the calculator shows to four decimal places.

 

What is the molar mass of sodium chloride?

58.44 g/mol. That’s the sum of the atomic masses of sodium (22.99 g/mol) and chlorine (35.45 g/mol).

 

Can I use this calculator for gases?

Yes, if you know the gas’s molar mass. The calculator doesn’t apply the ideal gas law or correct for non-ideal behavior, so it’s a mass-to-mole conversion only.

 

How many moles are in 5 grams of NaCl?

0.08556 mol. Divide 5 by 58.44. The calculator returns 0.0856 mol when rounded to four decimal places.

 

What’s the difference between molar mass and molecular mass?

Molar mass is the mass of one mole in grams per mole. Molecular mass is the mass of one molecule in atomic mass units. The numerical values are the same when expressed in g/mol and Da, respectively.

Sources:

The BIPM SI Brochure defines the mole by fixing the Avogadro constant at 6.02214076 × 10²³ mol⁻¹, the foundation of every mole calculation.

The IUPAC Gold Book entry for molar mass defines molar mass as mass divided by amount of substance and states that the numerical values of molar mass and relative molecular mass are equal when the unit is g/mol.

The IUPAC Gold Book entry for the mole states that one mole contains exactly 6.02214076 × 10²³ elementary entities.

The CK-12 Chemistry module on grams-to-moles conversions states that to convert grams to moles you divide by molar mass, and to convert moles to grams you multiply by molar mass.

The NIST Chemistry WebBook entry for water lists the molecular weight of water as 18.0153 g/mol, the value used in the Water preset.

The IUPAC Periodic Table of Elements provides the standard atomic weights used to calculate the molar masses in the topic data table.

Disclaimer

This calculator is for educational and informational purposes. It uses the molar mass you enter, which may differ from the true value for a specific sample. Do not use it as the sole basis for pharmaceutical dosing, safety-critical material specifications, or regulatory compliance without independent verification.

Last updated: October 29, 2026

ADVERTISEMENT

ADVERTISEMENT