Grams to Moles Calculator

Convert grams to moles, moles to grams, or either to molecules and atoms using molar mass and Avogadro's number. Common compounds preloaded; steps shown.

Grams to Moles Calculator

Convert between grams and moles using molar mass. This calculator also converts to molecules, atoms, or formula units using the Avogadro constant (6.02214076 × 10²³ per mole). Essential for stoichiometry calculations in chemistry.

Conversion Type

Substance Information

g/mol

Input Value

Display Options

Grams to Moles Calculator: Convert Mass to Moles Instantly

One mole of a pure element equals its atomic mass in grams. For compounds, sum the atomic masses of every atom in the formula. A grams to moles calculator handles that step automatically, letting you enter a mass and a molar mass to get moles back in under a second. The conversion applies to any substance, water, sodium chloride, glucose, as long as you know its molar mass in grams per mole.

This tool also converts the other direction: enter moles, get grams. It connects to the Avogadro constant (exactly 6.02214076 × 10²³ per mole, per the 2019 SI redefinition) to report the number of molecules, atoms, or formula units in your sample. That makes it a single stop for the three most common conversions in stoichiometry: mass to moles, moles to mass, and moles to particles.

  • Core Formula: n = m / M (moles = mass in grams divided by molar mass in g/mol)
  • Avogadro Constant (Exact): 6.02214076 × 10²³ mol⁻¹ (BIPM SI Brochure 9th ed., 2019 redefinition)
  • Molar Mass Source: Sum of IUPAC CIAAW standard atomic weights for all atoms in the formula
  • Input Units Supported: g, kg, mg, μg, lb, oz for mass; mol, mmol, μmol, nmol, kmol for amount

How to Use the Grams to Moles Calculator

Select your conversion type first: grams to moles, moles to grams, grams to particles, moles to particles, particles to moles, or particles to grams. Then enter a substance name (optional) and the molar mass in g/mol. Click one of the common substance buttons, H₂O, O₂, CO₂, NaCl, C₆H₁₂O₆, NH₃, CH₄, H₂SO₄, to autofill the molar mass from its stored value.

Input your value and choose the unit from the dropdown. Mass units include grams, kilograms, milligrams, micrograms, pounds, and ounces. Mole units include moles, millimoles, micromoles, nanomoles, and kilomoles. Set the decimal places from 0 to 6 and decide whether to display scientific notation automatically, always, or never. Click Calculate.

The results panel shows the primary converted value (moles, mass, or particle count), plus a full set of unit conversions for all three quantities. Below that, the step-by-step calculation shows each intermediate value: the input converted to grams, the division by molar mass, and the multiplication by Avogadro's constant. Use this to check your work or to learn the method.

The Formula: n = m / M

The relationship between mass, moles, and molar mass is a direct proportion. The formula n = m / M means: the amount of substance (n, in moles) equals the mass of the sample (m, in grams) divided by the molar mass (M, in grams per mole). To reverse it, m = n × M, which you use when you know how many moles you need and want to weigh out the corresponding mass.

Both equations come from the definition of molar mass: the mass of exactly one mole of a substance. Because the molar mass in g/mol is numerically identical to the formula mass in atomic mass units (daltons), you can calculate it by summing the atomic weights from the periodic table. The IUPAC CIAAW publishes the standard atomic weights used for this purpose (current table at ciaaw.org). OpenStax Chemistry 2e sections 3.1 and 4.3 cover the mole concept and reaction stoichiometry in detail.

Worked Examples: Water, NaCl, Glucose

Water (H₂O)

Molar mass: 18.015 g/mol (2 × 1.008 for hydrogen + 15.999 for oxygen, using IUPAC CIAAW 2021 values). If you have 36.03 g of water, then n = 36.03 g / 18.015 g/mol = 2.000 mol. The calculator reports 2.000 moles and 1.204 × 10²⁴ molecules (2.000 mol × 6.02214076 × 10²³).

Sodium Chloride (NaCl)

Molar mass: 58.44 g/mol (22.990 for sodium + 35.45 for chlorine, midpoint of the CIAAW interval). A sample of 117 g gives n = 117 g / 58.44 g/mol = 2.002 mol. The calculator returns 2.002 mol and 1.205 × 10²⁴ formula units.

Glucose (C₆H₁₂O₆)

Molar mass: 180.156 g/mol (6 × 12.011 for carbon + 12 × 1.008 for hydrogen + 6 × 15.999 for oxygen). A 10.0 g sample of glucose yields n = 10.0 g / 180.156 g/mol = 0.0555 mol. The calculator shows 0.0555 mol and 3.34 × 10²² molecules.

Significant Figures in Your Answer

Every conversion is only as precise as the least precise input. If you weigh a sample to three significant figures (e.g., 10.0 g of glucose) and use a molar mass with five significant figures (180.16 g/mol), your answer is limited to three significant figures: 0.0555 mol, not 0.05551 mol. The calculator lets you set decimal places from 0 to 6, but you must decide the appropriate precision from your actual data.

For classroom problems, use the same number of decimal places as the given mass. For lab work, the molar mass from the periodic table usually has at least four significant figures, so the limiting factor is your balance. A typical lab balance reads to 0.001 g, which gives three decimal places. Report your answer to match that. If the problem provides a molar mass value (e.g., 58.44 g/mol for NaCl), use that number exactly and apply the significant figures of the mass input.

Molar Masses for Common Compounds (IUPAC CIAAW 2021 Values)
CompoundFormulaMolar Mass (g/mol)Source Atomic Weights
WaterH₂O18.015H: [1.00784, 1.00811], O: [15.99903, 15.99977]
Sodium ChlorideNaCl58.44Na: 22.990, Cl: [35.446, 35.457]
GlucoseC₆H₁₂O₆180.156C: [12.0096, 12.0116], H: [1.00784, 1.00811], O: [15.99903, 15.99977]
Carbon DioxideCO₂44.01C: [12.0096, 12.0116], O: [15.99903, 15.99977]
Sulfuric AcidH₂SO₄98.079H: [1.00784, 1.00811], S: [32.059, 32.076], O: [15.99903, 15.99977]

Convert Grams to Moles: The Step-by-Step Process

Write the chemical formula of your substance. Look up the atomic mass of each element on the periodic table (use the IUPAC CIAAW current table for precision). Multiply each atomic mass by the number of atoms of that element in the formula. Add those products to get the molar mass in g/mol. Then divide the sample mass (in grams) by that molar mass.

The most common failure is using the atomic mass of an element instead of the molecular mass of a compound, for example, dividing by 16 g/mol for oxygen when the sample is O₂ gas, which has a molar mass of 31.998 g/mol. The calculator eliminates that error because you enter the molar mass explicitly or select a common substance button.

Moles to Grams: Reverse the Operation

When a reaction requires a specific number of moles, multiply by the molar mass to find the mass you must weigh. The equation m = n × M is the direct inverse of the grams-to-moles conversion. Select Moles to Grams in the calculator, enter the moles and the unit, and the tool returns the mass in your chosen unit.

For example, to obtain 0.500 mol of NaCl, you need 0.500 mol × 58.44 g/mol = 29.22 g. The calculator converts that to milligrams (29,220 mg) and ounces (1.03 oz) automatically.

Moles to Molecules and Beyond

Once you have moles, multiply by the Avogadro constant (6.02214076 × 10²³) to get the number of particles, molecules, atoms, or formula units. The calculator does this in the Grams to Particles and Moles to Particles modes. For a compound like H₂O, the particle count is the number of water molecules. To count the atoms inside those molecules (three atoms per water molecule), multiply the particle count by the number of atoms per formula unit.

The calculator reports particles as units of whatever the molar mass describes. If you enter the molar mass of NaCl, the particles are formula units of NaCl, not individual sodium or chlorine atoms.

Mass to Moles: Handle Any Unit

Mass input is not limited to grams. The calculator accepts kilograms, milligrams, micrograms, pounds, and ounces. It converts everything to grams internally before dividing by molar mass. A 2.5 mg sample of glucose becomes 0.0025 g, then 0.0025 g / 180.156 g/mol = 1.39 × 10⁻⁵ mol. The tool reports the result in moles and offers conversions to millimoles and micromoles automatically.

For mass input in pounds or ounces, the conversion uses the exact NIST-defined factors: 1 lb = 453.59237 g, 1 oz = 28.349523125 g.

Common Questions

What is a mole in chemistry?

A mole is the SI base unit for amount of substance. Since the 2019 SI redefinition, one mole contains exactly 6.02214076 × 10²³ elementary entities, atoms, molecules, ions, or formula units (BIPM SI Brochure 9th ed.). It is a counting unit, like a dozen, but for particles at the atomic scale. The Avogadro constant (Nₐ) has units of mol⁻¹ and carries that exact value.

Where do I get the molar mass of a substance?

You calculate it from the chemical formula using the IUPAC CIAAW standard atomic weights (current table at ciaaw.org). Sum the atomic weight of each element multiplied by the number of atoms of that element in the formula. The result in g/mol is numerically equal to the molecular or formula mass in daltons. For common compounds, the calculator's autofill buttons provide the value directly.

Can I input mass in milligrams or kilograms?

Yes. The calculator accepts grams, kilograms, milligrams, micrograms, pounds, and ounces for mass input. It converts all values to grams internally using the exact conversion factors (1 kg = 1000 g, 1 mg = 0.001 g, 1 lb = 453.59237 g) before dividing by molar mass. You can also input moles in millimoles, micromoles, nanomoles, or kilomoles.

How many significant figures should I use in my answer?

Your answer is limited by the least precise input. If your mass has three significant figures (e.g., 10.0 g), your mole value should also have three significant figures regardless of how many decimal places the molar mass has. The calculator lets you choose 0 to 6 decimal places, but you must apply the significant figure rule from your own data. For most lab work, report to the precision of your balance.

What is the exact Avogadro constant value?

The Avogadro constant is exactly 6.02214076 × 10²³ mol⁻¹ by definition since the 2019 SI redefinition (effective 20 May 2019). This is fixed in the BIPM SI Brochure 9th edition and is the value used by the CODATA-recommended set of constants. Many textbooks and older sites round this to 6.022 × 10²³, which is adequate for most classroom problems, but the exact value is 6.02214076 × 10²³ mol⁻¹.

Guides on this site