To convert grams to moles, divide the sample’s mass in grams by the substance’s molar mass in grams per mole: n = m ÷ M. Enter a mass and molar mass in the calculator below to get the amount in moles, with the inputs and result expressed in consistent units.
Formula
The grams-to-moles formula is:
n = m / M
- n is the amount of substance, in moles (mol).
- m is the sample mass, in grams (g).
- M is the molar mass, in grams per mole (g/mol).
The units cancel as they should: g ÷ (g/mol) = mol. The calculator’s second output estimates the number of particles represented by that amount using Avogadro’s exact constant, 6.02214076 × 1023 particles per mole. “Particles” means the relevant entities for the substance: atoms, molecules, ions, or formula units.
Worked Example
For the calculator’s default values, the sample mass is 18.02 g and the molar mass is 18.015 g/mol, the molar mass of water calculated from the standard atomic weights H = 1.008 and O = 15.999:
n = m / M = 18.02 g / 18.015 g/mol = 1.0002775 mol
Rounded to the four decimal places displayed, the amount is 1.0003 mol. For the particle-count output, use the unrounded amount:
1.0002775 mol × 6.02214076 × 1023 particles/mol ≈ 6.0238 × 1023 particles
The particle count is an estimate based on the sample’s stated mass and molar mass. In a real measurement, balance precision, purity, and the chosen molar-mass value limit how many digits are meaningful.
Assumptions
- The sample’s mass is entered in grams, and the molar mass is entered in g/mol.
- The sample is treated as the substance represented by the molar mass; impurities or mixtures are not corrected for.
- The particle count uses the exact SI Avogadro constant, but the calculated count is not a direct count of individual particles.
How to Find Molar Mass
Molar mass is the mass of one mole of a specified chemical entity. For a pure compound, find its chemical formula and add the atomic masses of all atoms in one formula unit. Multiply each element’s atomic mass by its subscript before adding. The result is commonly reported in g/mol.
For water, H2O, using H = 1.008 and O = 15.999:
M(H2O) = 2(1.008) + 15.999 = 18.015 g/mol
For sodium chloride, NaCl, the corresponding sum is 22.990 + 35.45 = 58.44 g/mol. Atomic weights are generally averages that reflect naturally occurring isotopes; the isotope composition can matter for specially enriched samples. For a hydrate, include the water molecules shown in the formula. For an ionic compound, use its formula-unit molar mass rather than describing the particles as molecules.
When to Use the Conversion
Mass is easy to measure on a balance, while chemical equations and many calculations use moles. Converting grams to moles lets you compare quantities of different substances on the basis of their particle amounts. It is a foundation for reaction stoichiometry, determining limiting reactants, and preparing calculations for solution concentration. The conversion itself does not tell you how much of a substance reacts; that requires a balanced chemical equation and, for an actual solution, the relevant volume and concentration information.
- Identify the substance and its correct formula.
- Find its molar mass in g/mol, including every atom or formula-unit component.
- Measure or otherwise establish the sample mass in grams.
- Divide mass by molar mass, and report the result in moles with sensible precision.
If the mass is given in milligrams, convert it first: 1 g = 1000 mg, so divide milligrams by 1000 to obtain grams. If mass is in kilograms, multiply by 1000 to obtain grams. Alternatively, convert the molar mass to matching mass units, but using grams for both inputs is less error-prone.
Common Mistakes and Limits
- Multiplying instead of dividing: grams-to-moles conversion uses n = m/M. Multiplying mass by molar mass does not give moles.
- Using the wrong molar mass: Different substances, salts, hydrates, and isotopic forms can have different values. Confirm the formula and chemical form.
- Mixing units: A mass in milligrams entered as though it were grams gives an answer 1000 times too large. Keep mass and molar mass units consistent.
- Rounding too early: Carry extra digits through the calculation, then round the final answer according to the precision of the measurements. A calculator’s displayed digits do not make a measured mass more precise.
- Confusing moles with molecules: A mole is an amount containing Avogadro’s number of specified entities; it is not itself a mass or a single molecule.
The formula assumes the stated mass corresponds to the material whose molar mass you entered. It cannot identify a sample, correct for water or impurities, or determine a compound’s chemical formula. For a mixture, calculate each component’s amount separately if its mass and composition are known. For a pure substance with known mass and formula, the conversion is direct and does not depend on temperature or pressure.
For bench work, follow your lab method, the safety data sheet (SDS), and your supervisor. This calculator is for general chemistry and lab-planning arithmetic, not for clinical or medication work.
Frequently Asked Questions
What is the formula for converting grams to moles?
Divide the mass in grams by the molar mass in grams per mole: n = m/M. The answer is in moles.
How many moles are in 10 grams?
It depends on the substance. Divide 10 g by that substance’s molar mass in g/mol. For water, for example, 10 ÷ 18.015 ≈ 0.5551 mol.
How do I convert moles back to grams?
Multiply the amount in moles by the molar mass: m = nM. The units are mol × g/mol = g.
Can I use milligrams in the grams-to-moles formula?
Yes, after converting milligrams to grams by dividing by 1000, or after converting the molar mass to matching units. Do not mix mg and g in the same calculation.
Does one mole always mean one molecule?
No. A mole is a fixed number of specified entities. Depending on the substance, those entities may be atoms, molecules, ions, or formula units.
Related
Formula used
in m | Sample mass | g | 18.02 | 0 in mm | Molar mass | g/mol | 18.015 | 0 out n | Amount of substance | mol | m / mm | 4 out particles | Number of particles | particles | n * 6.02214076e23 | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Pressure Density Depth Formula for Fluids98,066 Pa
- Pressure Density Temperature Equation Calculator100,961.74 Pa
- Pressure Density Cup: What It Measures and How It Works1.0000 g/mL
- Pressure, Density, and Temperature: How They Relate101,307 Pa
- Pressure-Based vs Density-Based Solvers in CFD
- Pressure-Based vs Density-Based Solvers in CFD