Grams to Moles Calculator

Convert mass (grams) to moles using the formula n = m / M.

Science 16 substances Bidirectional
Rate this calculator · 4.0 (3)

Grams ↔ Moles

Bidirectional · 16 preset substances · particle count

Instructions — Grams to Moles Calculator

Enter a mass in grams or a number of moles, then either pick a substance or type the molar mass. The other field updates automatically.

  1. Pick a substance from the dropdown (water, NaCl, glucose, etc.) to autofill its molar mass. Choose Custom to type your own.
  2. Enter a mass or moles in either input. The conversion runs instantly in both directions.
  3. Read the particle count below: moles × 6.02214076 × 1023. This is the actual number of molecules.

Default values show 18 g of water = 1 mole = 6.022 × 1023 molecules.

Formulas

The conversion is one of the simplest in chemistry, but the units matter.

Grams to moles: $$ n = \frac{m}{M} $$ where $n$ is moles, $m$ is mass in grams, $M$ is molar mass in g/mol.

Moles to grams: $$ m = n \times M $$

Particle count: $$ N = n \times N_A = \frac{m}{M} \times 6.02214076 \times 10^{23} $$

Avogadro's number $N_A = 6.02214076 \times 10^{23} \text{ mol}^{-1}$ has been an exact defined constant since the 2019 SI redefinition.

Reference

Common substances with rounded molar masses (IUPAC 2021 standard atomic weights):

SubstanceFormulaMolar mass (g/mol)1 g =? mol
WaterH2O18.0150.0555
Sodium chlorideNaCl58.4400.0171
Carbon dioxideCO244.0100.0227
GlucoseC6H12O6180.1560.00555
Sulfuric acidH2SO498.0790.0102
EthanolC2H6O46.0690.0217
Sodium hydroxideNaOH39.9970.0250
Hydrochloric acidHCl36.4610.0274
MethaneCH416.0430.0623
SucroseC12H22O11342.2970.00292

Article — Grams to Moles Calculator

Grams to Moles Calculator: Convert Mass to Moles Using Molar Mass

Converting grams to moles uses one formula: n = m / M, where m is mass in grams and M is molar mass in grams per mole. For water (M = 18.015 g/mol), 36 g equals 2 moles, or 1.204 × 1024 molecules. The mole is the SI unit for amount of substance and represents exactly 6.02214076 × 1023 particles since the 2019 SI redefinition.

Chemists work in moles because reactions happen between countable numbers of atoms, but balances measure mass. The grams-to-moles conversion bridges the two scales and shows up at the start of nearly every stoichiometry problem.

What grams to moles means

One mole is a fixed count: 6.02214076 × 1023 particles. The mass of one mole depends on what the substance is. One mole of water weighs 18.015 g; one mole of glucose weighs 180.16 g; one mole of mercury weighs 200.59 g. The mass per mole is the molar mass, with units of g/mol.

The conversion direction matters. To go from mass to moles, divide by molar mass. To go from moles to mass, multiply by molar mass. The grams-to-moles direction comes up first because lab work begins on the balance, where mass is the natural reading.

Did you know

One mole of water occupies about 18 mL, which is roughly one tablespoon. That tablespoon contains roughly as many molecules (6 × 1023) as the number of stars in the observable universe (estimated at about 1022 to 1024). The mole compresses unimaginably large counts into a manageable laboratory number.

The grams to moles formula

The grams to moles formula is short:

Core conversions
n = m / M grams → moles
m = n × M moles → grams
N = n × 6.022e23 moles → particles

The molar mass M comes from the periodic table. Add the standard atomic weight of every atom in the formula. For NaCl, that is 22.990 (Na) + 35.45 (Cl) = 58.44 g/mol. The arithmetic is straightforward; the trap is in identifying the right formula for the substance.

Finding molar mass for any compound

Molar mass uses the International Union of Pure and Applied Chemistry (IUPAC) standard atomic weights, updated periodically by the Commission on Isotopic Abundances and Atomic Weights. The values reflect natural isotope ratios on Earth and carry standard uncertainties that the IUPAC publishes alongside each element.

For polyatomic compounds, multiply each atomic weight by its subscript and sum. For glucose C6H12O6: 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol. For hydrates and complexes with parentheses, expand them: Ca(OH)2 contains one Ca and two each of O and H, giving 40.078 + 2 × (15.999 + 1.008) = 74.092 g/mol.

Tip

For routine work, round atomic weights: H = 1, C = 12, N = 14, O = 16, S = 32, Cl = 35.5. These rounded values stay within 0.1% of the IUPAC numbers for most compounds, which is enough for everyday calculations.

Worked grams to moles example

Question: how many moles are in 50 g of sodium hydroxide (NaOH)?

Step 1: find molar mass. NaOH = 22.990 + 15.999 + 1.008 = 39.997 g/mol. Step 2: divide mass by molar mass. n = 50 / 39.997 = 1.250 mol. Step 3 (optional): multiply by Avogadro to get particles. N = 1.250 × 6.022 × 1023 = 7.53 × 1023 formula units. Each formula unit is one Na+ ion plus one OH- ion in solution.

If you weighed out 50 g for a 1 M sodium hydroxide stock, you would dissolve it in enough water to make 1.25 L of solution. The grams-to-moles step is the first calculation; volume scaling comes next.

From moles to particle count

Multiplying moles by Avogadro's number gives the actual particle count. For 0.001 mol of water (about 0.018 g, one large drop), the number of molecules is 6.022 × 1020. That single drop contains roughly the same number of water molecules as there are seconds in 19 trillion years.

  • 1 mol H2O = 18.015 g = ~18 mL = 6.022 × 1023 molecules
  • 1 mol NaCl = 58.44 g = roughly 2 US tablespoons
  • 1 mol glucose = 180.16 g = a small drinking glass of sugar
  • 1 mol CO2 = 44.01 g = 22.4 L at STP (gas volume)
  • 1 mol electrons = 96,485 coulombs (Faraday constant)
  • 1 mol of sand grains would cover the United States ~6 km deep

Avogadro and the 2019 SI redefinition

Amedeo Avogadro proposed in 1811 that equal volumes of gases at the same temperature and pressure contain equal numbers of molecules. He never calculated the constant itself; that came in 1909, when Jean Baptiste Perrin measured it from Brownian motion. Perrin won the 1926 Nobel Prize for the work and named the number after Avogadro.

Until 2019, the mole was defined as the number of atoms in 12 grams of pure carbon-12, and Avogadro's number was measured experimentally with small but real uncertainty. On 20 May 2019 (World Metrology Day), the SI redefined the mole based on a fixed exact value of NA = 6.02214076 × 1023 mol−1. The carbon-12 standard is gone; the number is now a defined constant, like the speed of light.

Common grams to moles mistakes

The diatomic trap

Many gases exist as diatomic molecules at room temperature: H2, N2, O2, F2, Cl2. The molar mass of O2 is 31.998 g/mol, not 16. If a problem says "oxygen," check whether it means O atoms or O2 molecules; the molar masses differ by a factor of two and the resulting moles by the same factor.

Other common errors: confusing molar mass with atomic mass (numerically equal but with different units, g/mol vs. unified atomic mass unit), using grams when the problem provides kilograms or milligrams, and forgetting to use a balanced equation when continuing to a stoichiometry calculation.

Quick-reference table

For routine conversions, memorize a handful of common molar masses. Water at 18 g/mol, sodium chloride at 58.4 g/mol, glucose at 180 g/mol, and carbon dioxide at 44 g/mol cover most introductory problems. Anything else can be built atom by atom from the periodic table in under a minute.

FAQ

Divide the mass in grams by the molar mass in g/mol. The formula is n = m / M. Example: 36 g of water (M = 18.015 g/mol) = 36 / 18.015 = 2.0 mol.
18.015 g/mol. It is calculated as 2 × 1.008 (hydrogen) + 15.999 (oxygen). One mole of water weighs 18.015 grams and contains 6.022 × 1023 molecules.
Exactly 6.02214076 × 1023 particles. This is Avogadro's number, fixed as an exact constant by the 2019 SI redefinition. The value applies to atoms, molecules, ions, or any other discrete particles.
Add the standard atomic weights of every atom in the formula. For NaCl: Na (22.990) + Cl (35.45) = 58.44 g/mol. For glucose C6H12O6: 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.16 g/mol.
A mole is a counting unit, like a dozen. One mole equals 6.022 × 1023 molecules. Working in moles lets chemists handle reasonable numbers instead of counting individual particles.
Multiply the number of moles by the molar mass. The formula is m = n × M. Example: 0.5 mol of CO2 (M = 44.01 g/mol) gives 0.5 × 44.01 = 22.0 g.
Mass is what we actually measure on a balance. The mole bridges the gap between something we can weigh and the number of molecules involved in a reaction, which makes stoichiometry possible.
It connects the atomic scale (atoms and molecules) to the macroscopic scale (grams). Multiply moles by 6.022 × 1023 to get the actual particle count, or divide a particle count by it to get moles.