Grams to Moles Calculator
How it Works
01Pick Calc Mode
Enter molar mass directly OR choose from 80+ preset substances (auto-fill M).
02Set Molar Mass M
g/mol — the mass of 1 mole of substance. Look up on PubChem or compute from atomic weights.
03Enter Mass m
Sample mass on a balance — accept kg / g / mg / µg / lb / oz; auto-converted.
04Apply n = m / M
Get moles in best unit (mol / mmol / µmol / nmol / pmol) plus molecule count.
What is a Grams to Moles Calculator?
The preset list covers the substances most frequently encountered in undergraduate and analytical chemistry: water (H₂O 18.015), sodium chloride (NaCl 58.44), glucose (C₆H₁₂O₆ 180.16), sucrose (C₁₂H₂₂O₁₁ 342.30), sulfuric acid (H₂SO₄ 98.08), sodium hydroxide (NaOH 40.00), the major aluminum / calcium / magnesium / sodium / potassium salts, and common organic solvents (ethanol, methanol, acetone, DMSO, ethyl acetate, hexane, toluene, chloroform). Mass inputs accept 6 units (g default; also kg, mg, µg, lb, oz) and the calculator auto-converts to grams internally. Output gives moles in the cleanest auto-selected unit (mol → mmol → µmol → nmol → pmol → fmol depending on magnitude), simultaneous display in 4 standard units, and the equivalent number of molecules / atoms / formula units calculated from Avogadro's constant.
Designed for chemistry students working through stoichiometry homework, analytical chemists preparing standards, biochemists making buffers, pharmacists compounding solutions, and any researcher converting between mass measurements and molar amounts, the tool runs entirely in your browser — no account, no data stored.
Pro Tip: Pair this with our Molarity Calculator for solution preparation, our Serial Dilution Calculator for concentration series, or our Dilution Factor Calculator for sample prep.
How to Use the Grams to Moles Calculator?
How is grams to moles calculated?
The mole-mass conversion is the single most-cited equation in stoichiometry — every chemistry textbook starts here, and every wet-lab calculation refers back to it. Despite the simplicity, mole calculations remain a perennial student stumbling block because of the four interconnected units (mass, moles, molecular weight, molecules) and the unit conversions among them.
Standard stoichiometry formula. Avogadro's constant SI-defined value adopted by IUPAC in 2019.
Core Formula
For a sample of mass m (grams) of a substance with molar mass M (g/mol):
n = m / M
N = n × N_A = (m / M) × 6.022 × 10²³
where n is moles, N is the number of entities (molecules, atoms, ions, formula units), and N_A = 6.02214076 × 10²³ mol⁻¹ is Avogadro's constant.
What Is a Mole?
The mole is the SI base unit of amount of substance. Since the 2019 SI redefinition, 1 mole = exactly 6.02214076 × 10²³ entities — Avogadro's constant N_A is now an exact defined number, not an experimentally measured quantity. The mole was historically defined as "the number of atoms in 12 g of carbon-12", which gave essentially the same numerical value but tied the mole to the kilogram standard. The 2019 redefinition decoupled the mole from any specific reference substance.
Why this matters: the mole is just a counting unit, like "dozen" but for huge numbers — a dozen eggs = 12 eggs; a mole of eggs = 6.022 × 10²³ eggs (more eggs than have ever existed; about a googol times the world's chicken egg production per year).
What Is Molar Mass?
The molar mass M of a substance is the mass of 1 mole of it, in grams. Equivalently, it is the molecular weight (or formula weight) expressed in g/mol. Numerically:
M (g/mol) = molecular weight (Da or u)
where Da (dalton) and u (unified atomic mass unit) are the same thing — a unit of molecular mass with 1 Da defined as 1/12 the mass of a ¹²C atom = 1.66 × 10⁻²⁷ kg. So a molecule with mass 100 Da has molar mass 100 g/mol — exactly. To compute M for a compound, sum the atomic masses of all atoms in the molecular formula using IUPAC standard atomic weights.
Common Atomic Weights (IUPAC 2021)
- H 1.008 · C 12.011 · N 14.007 · O 15.999 · F 18.998 · Na 22.990 · Mg 24.305 · Al 26.982 · Si 28.085 · P 30.974
- S 32.06 · Cl 35.45 · K 39.098 · Ca 40.078 · Fe 55.845 · Cu 63.546 · Zn 65.38 · Br 79.904 · Ag 107.868 · I 126.904
- Pb 207.2 · Au 196.967 · Hg 200.592 · U 238.029
Example computation: H₂SO₄ molar mass = 2(1.008) + 32.06 + 4(15.999) = 2.016 + 32.06 + 63.996 = 98.07 g/mol (rounds to 98.08 with standard precision).
Worked Example — Common Salt
How many moles are in 5.85 g of NaCl?
- M (NaCl) = 22.990 + 35.45 = 58.44 g/mol.
- n = m / M = 5.85 / 58.44 = 0.1001 mol = 100.1 mmol.
- Number of formula units N = 0.1001 × 6.022 × 10²³ = 6.027 × 10²² NaCl formula units.
- Each NaCl unit contains one Na⁺ and one Cl⁻, so 6.03 × 10²² of each ion.
Hydrates — A Common Trap
Many salts crystallize with water of hydration that is part of the crystal structure and contributes to the molar mass. Common examples:
- CuSO₄·5H₂O (copper sulfate pentahydrate, blue crystals): M = 159.61 + 5(18.015) = 249.69 g/mol; vs anhydrous CuSO₄ at 159.61.
- MgSO₄·7H₂O (Epsom salt): M = 120.37 + 7(18.015) = 246.47 g/mol.
- Na₂CO₃·10H₂O (washing soda): M = 105.99 + 10(18.015) = 286.14 g/mol.
- CaCl₂·2H₂O: M = 110.98 + 2(18.015) = 147.01 g/mol.
Always verify whether your reagent is anhydrous or hydrated — the supplier's Certificate of Analysis (CoA) will state the exact form and purity. Using the wrong M for hydrate vs anhydrous gives 30-100% concentration errors in the final solution.
Grams to Moles – Worked Examples
- M (H₂O) = 2(1.008) + 15.999 = 18.015 g/mol.
- n = 100 / 18.015 = 5.55 mol.
- Molecules N = 5.55 × 6.022 × 10²³ = 3.34 × 10²⁴ water molecules.
- For reference: 1 L of water (essentially 1 kg at room T) contains 55.5 mol — the standard reference for water as a 55.5 M solvent.
Example 2 — Bench Glucose Stock. 0.500 g of glucose (C₆H₁₂O₆).
- M (glucose) = 6(12.011) + 12(1.008) + 6(15.999) = 180.16 g/mol.
- n = 0.500 / 180.16 = 2.776 × 10⁻³ mol = 2.776 mmol.
- If dissolved in 100 mL of water → 27.76 mM glucose stock; if in 50 mL → 55.5 mM.
Example 3 — Acid Concentrate. 49.04 g of sulfuric acid (H₂SO₄).
- M (H₂SO₄) = 2(1.008) + 32.06 + 4(15.999) = 98.08 g/mol.
- n = 49.04 / 98.08 = 0.500 mol = 500 mmol.
- If dissolved in 1 L → 0.500 M H₂SO₄ — a common standard for titrations.
- Note: real H₂SO₄ is delivered as 95-98% concentrated liquid (density ~1.84 g/mL); 49.04 g of pure H₂SO₄ corresponds to 27.7 mL of 98% concentrated × 1.84 = 27.7 mL.
Example 4 — Pharmaceutical Sample. 250 mg of aspirin (acetylsalicylic acid C₉H₈O₄, M = 180.16 g/mol — coincidentally same as glucose).
- m = 250 mg = 0.250 g.
- n = 0.250 / 180.16 = 1.388 × 10⁻³ mol = 1.388 mmol.
- Standard adult aspirin tablet (325 mg) contains 1.80 mmol; the lower 250 mg (low-dose / pediatric) contains 1.39 mmol.
- This is the molar amount that interacts with cyclooxygenase enzymes in vivo.
Example 5 — Hydrate Trap. 25 g of "copper sulfate" — anhydrous CuSO₄ vs the more common CuSO₄·5H₂O (pentahydrate, the blue crystals).
- If anhydrous: M = 159.61 g/mol; n = 25 / 159.61 = 0.1567 mol.
- If pentahydrate: M = 159.61 + 5(18.015) = 249.69 g/mol; n = 25 / 249.69 = 0.1001 mol.
- Difference: ~36% fewer moles in the hydrate for the same mass — a major source of solution-prep errors. Always verify the form on the supplier's CoA.
Who Should Use the Grams to Moles Calculator?
Technical Reference
SI Definition of the Mole (2019 revision). Since 20 May 2019 the mole is defined by an exact value of Avogadro's constant: N_A = 6.02214076 × 10²³ mol⁻¹ exactly. The mole is the amount of substance containing exactly N_A entities. This decouples the mole from the kilogram (previously: "the amount of substance in 12 g of ¹²C") and brings it in line with the SI's other base units now defined by exact natural constants.
Molar Mass vs Molecular Weight. Numerically identical but with different units conventions:
- Molar mass M: mass of 1 mole, units g/mol (or kg/mol in strict SI).
- Molecular weight (Mr) or formula weight: dimensionless ratio = mass relative to 1/12 of ¹²C mass.
- Molecular mass: mass of one molecule, units Da (dalton) or u (unified atomic mass unit).
- Conversion: 1 Da = 1.66053907 × 10⁻²⁷ kg = 1/N_A grams. So a molecule with mass 100 Da has molar mass 100 g/mol exactly.
IUPAC 2021 Standard Atomic Weights (selected). Standard atomic weights are the abundance-weighted averages of natural isotope mixtures, updated periodically by IUPAC's CIAAW (Commission on Isotopic Abundances and Atomic Weights):
- H 1.008 (range 1.00784–1.00811) — the only element with a hydrogen-isotope range in food/water samples.
- C 12.011 (range 12.0096–12.0116).
- N 14.007.
- O 15.999.
- S 32.06 (range 32.059–32.076).
- Cl 35.45 (range 35.446–35.457).
- Other element-by-element values: see IUPAC's "Atomic Weights of the Elements 2021" (Pure Appl. Chem. 94, 573, 2022).
Avogadro's Constant — Historical Note. Amedeo Avogadro (1776-1856) hypothesized in 1811 that equal volumes of gases at the same T, P contain equal numbers of molecules. The numerical value of N_A wasn't measured experimentally until ~1900 (by Perrin from Brownian motion, earning him the 1926 Nobel Prize in Physics). For most of the 20th century, N_A was an experimentally-determined constant with uncertainty ~10⁻⁷. The 2019 SI redefinition fixed it at exactly 6.02214076 × 10²³, eliminating measurement uncertainty by definition — the same way the speed of light was fixed exactly in the 1983 metre redefinition.
Hydrates — Comprehensive Reference. Many salts crystallize with water of hydration; the molar mass MUST include the water molecules for accurate stoichiometry:
- CuSO₄·5H₂O: 249.69 g/mol (vs CuSO₄ anhydrous 159.61).
- FeSO₄·7H₂O: 278.02 g/mol.
- MgSO₄·7H₂O (Epsom salt): 246.47 g/mol.
- Na₂CO₃·10H₂O (washing soda): 286.14 g/mol; vs Na₂CO₃ anhydrous 105.99.
- Na₂SO₄·10H₂O (Glauber's salt): 322.20 g/mol.
- CaCl₂·2H₂O: 147.01 g/mol; CaCl₂·6H₂O: 219.08; vs CaCl₂ anhydrous 110.98.
- Na₂B₄O₇·10H₂O (borax): 381.37 g/mol.
- Co(NO₃)₂·6H₂O: 291.03 g/mol.
- NiSO₄·6H₂O: 262.85 g/mol.
- K₂CO₃·1.5H₂O: 165.23 g/mol; vs K₂CO₃ 138.21.
Practical rule: always check the bottle label and Certificate of Analysis. Anhydrous salts are usually labelled "anhydrous" or with "(A)"; hydrates explicitly state "·nH₂O". A 30-50% concentration error from using the wrong M is enough to ruin most quantitative experiments.
Isotopically Labelled Compounds. The preset molar masses use natural-abundance isotope mixtures. For isotopically pure or labelled compounds, use a custom M:
- D₂O (heavy water, 99.9% ²H): M = 20.03 g/mol vs H₂O 18.02. Used as NMR solvent and biological tracer.
- ¹³CH₄ (carbon-13 methane): M = 17.04 vs ¹²CH₄ 16.04. Used in NMR studies, isotope-ratio mass spectrometry.
- ¹⁵N-glycine: M = 76.06 vs natural 75.07. Used in protein-folding studies, plant-uptake research.
- ¹⁸O-water: M = 20.01 vs H₂¹⁶O 18.01. Used in oxygen-cycle and metabolic-flux studies.
Polymers and Macromolecules. For high-molecular-weight species, "molar mass" becomes a distribution rather than a single value:
- Number-average molar mass M_n: arithmetic mean weighted by number of molecules.
- Weight-average molar mass M_w: weighted by mass; M_w ≥ M_n always; ratio M_w/M_n is the polydispersity index (PDI).
- Z-average molar mass M_z: further weighted by mass², sensitive to high-MW tails.
- For a monodisperse (single-MW) sample like a pure protein, M_n = M_w = M_z = M. For polymers, PDI typically 1.5-3 for synthetic polymers; ~1.0 for living-polymerization samples.
- For grams-to-moles calculations on polymers, use M_n (the "average" molar mass measured by colligative methods like osmometry or end-group analysis).
Practical Precision Considerations.
- Analytical balance: ±0.1 mg = relative error 0.01% at 1 g samples; 1% at 10 mg samples; 10% at 1 mg samples. The dominant error source for sub-mg samples.
- Top-loading balance: ±10 mg typical; suitable only for > 1 g samples in serious quantitative work.
- Microbalance: ±1 µg, suitable for sub-mg samples in trace analysis, isotope work.
- Molar-mass precision: low-MW compounds (M < 100): typically 4-5 significant figures from atomic-weight summation. High-MW compounds: 3-4 figures.
- Hydrate uncertainty: partial dehydration during weighing (especially for hygroscopic samples) can introduce 1-3% error; weigh in a dry box or under N₂ for hygroscopic samples.
Reference Resources for Molar-Mass Lookup.
- PubChem (pubchem.ncbi.nlm.nih.gov): NIH database with 100+ million compounds; molar mass on every compound page.
- CRC Handbook of Chemistry and Physics: the standard lab reference; contains atomic weights, common compound molar masses, hydrate forms.
- NIST WebBook (webbook.nist.gov): rigorous physical-property data; molar masses with full uncertainty.
- Sigma-Aldrich / Merck product pages: for any commercial reagent — the bottle label molar mass is what you should use for stoichiometry from that specific lot.
- Atomic-mass calculators (like ours): sum atomic weights from the molecular formula; useful for compounds not in standard reference tables.
Key Takeaways
Frequently Asked Questions
What is the Grams to Moles Calculator?
Pro Tip: Pair this with our Molarity Calculator for solution preparation.
What's the formula for converting grams to moles?
What is a mole, exactly?
How do I find a substance's molar mass?
What's the difference between molar mass and molecular weight?
Why does my answer differ from the textbook?
What's Avogadro's constant?
How many molecules are in 1 gram of water?
Can I use this for proteins and polymers?
What if my mass is in pounds or ounces?
How precise should my molar mass be?
Disclaimer
Molar masses use IUPAC 2021 standard atomic weights for natural-abundance isotope mixtures. For isotopically labelled compounds (D₂O, ¹³C, ¹⁵N), use custom M. For hydrate forms, ensure correct M (CuSO₄·5H₂O 249.69 vs anhydrous CuSO₄ 159.61 — major error source). Always verify against supplier Certificate of Analysis. Avogadro's constant N_A = 6.02214076 × 10²³ mol⁻¹ exactly (SI-defined since 2019). References: PubChem, CRC Handbook of Chemistry and Physics, NIST WebBook, IUPAC 2021 atomic weight tables.