Grams to Moles Calculator
Enter the mass m in grams and the molar mass M (g/mol); using n = m / M the tool instantly converts grams to moles, a basic everyday step in stoichiometry.
Input Data
Results
At a glance:A mole (symbol mol) is the SI base unit of 'amount of substance' — 1 mol of any substance contains the same number of elementary entities (about 6.022 × 10²³, Avogadro's constant N_A) as there are atoms in exactly 12 g of carbon-12. But in the lab we weigh in grams, and in chemical equations we count in moles; converting between 'mass' and 'moles' is the most basic step in stoichiometry. The bridge is the molar mass M, defined as the mass of 1 mol of a substance (unit g/mol), numerically equal to its relative molecular mass (for elements, the relative atomic mass) — e.g. water H₂O M = 2×1 + 16 = 18 g/mol, sodium chloride NaCl M = 22.99 + 35.45 ≈ 58.5 g/mol, iron Fe M = 55.85 g/mol. The conversion formula is n = m / M, where n is the amount of substance (mol), m the mass (g) and M the molar mass (g/mol). From it the reverse follows: m = n × M (moles to grams) and M = m / n (molar mass from mass and moles). Using this tool's default: 18 g of water (M = 18) gives n = 18 / 18 = 1 mol; 5.85 g of NaCl (M = 58.5) gives n = 0.1 mol. The essence of the grams↔moles conversion is 'amount of substance' as the counting unit of particles: 1 mol of any substance always contains N_A particles, so converting mass to moles means converting macroscopically weighable mass into 'how many times N_A particles', so the reaction equation (in mole ratios) can be applied. In real chemistry this conversion appears everywhere: pre-lab weighing and mole counting; using the equation to find how much product from how much reactant (n_reactant → n_product by ratio → m_product); concentration conversion (molarity = moles/volume); dilution; gas law; solution-thermochemistry quantity calculation. Using the formula: first, the molar mass M must match the substance and be in g/mol (often looked up from the periodic table or computed from the formula); the relative molecular mass is numerically equal to it. Second, mass m and molar mass M must use the same mass unit system (grams vs g/mol); mixing mg needs conversion. Third, M must be greater than 0 (a real substance has positive mass). Fourth, for compounds with water of crystallisation count it in; for mixtures use the average molar mass. In short, this simple n = m/M is the foundation of all stoichiometric computation — this calculator does it in one step, ideal for Hong Kong DSE Chemistry mass–mole conversions.
Formula
Grams to moles: n = m / M (n in mol, m in g, M in g/mol).
Reverse (moles to grams): m = n × M.
Molar mass M (g/mol) = relative molecular/formula mass numerically.
1 mol contains Avogadro's number N_A ≈ 6.022×10²³ particles.
$$n = \dfrac{m}{M}$$How to Use
- Enter the mass m of the substance (g).
- Enter the molar mass M (g/mol); for a compound compute it from the chemical formula, e.g. H₂O = 18, NaCl ≈ 58.5.
- The right panel instantly shows the amount of substance n (mol); the reverse conversion is also supported.
Molar masses and grams-to-moles of common substances
| Substance | Formula | Molar Mass (g/mol) | Mass (g) | n (mol) |
|---|---|---|---|---|
| Water | H₂O | 18.0 | 18.0 | 1.00 |
| Sodium chloride | NaCl | 58.5 | 5.85 | 0.10 |
| Carbon dioxide | CO₂ | 44.0 | 22.0 | 0.50 |
| Glucose | C₆H₁₂O₆ | 180.0 | 18.0 | 0.10 |
n = m/M; 1 mol of any substance contains N_A ≈ 6.022×10²³ particles.
Case Studies
How many moles in 18 g of water?
Water H₂O, molar mass M = 2×1 + 16 = 18 g/mol; mass m = 18 g.
n = m/M = 18 / 18 = 1 mol.
So 18 g of water is exactly 1 mol, i.e. 6.022×10²³ water molecules.
How many moles in 5.85 g of table salt?
Sodium chloride NaCl, M = 22.99 + 35.45 ≈ 58.5 g/mol; m = 5.85 g.
n = 5.85 / 58.5 = 0.1 mol.
0.1 mol of NaCl contains about 0.1 × 6.022×10²³ = 6.022×10²² NaCl ion pairs.
FAQ
What is a mole?
A mole (mol) is the SI unit of amount of substance; 1 mol of any substance contains about 6.022×10²³ elementary entities (Avogadro's constant N_A), such as molecules, atoms or ions. It is the 'counting' unit bridging the macroscopic and microscopic worlds.
How is the molar mass found?
The molar mass M (g/mol) is numerically equal to the relative molecular (or formula) mass: add up the relative atomic masses of all atoms in the formula. Example H₂O = 2×1 + 16 = 18; NaCl ≈ 22.99 + 35.45 = 58.44. For an element it equals its relative atomic mass; for a compound sum all atoms.
Is mass in grams or milligrams?
This calculator uses grams. If you have mg, divide by 1000 first (or keep consistent with M's unit system). The key is that mass and molar mass must use a consistent mass unit (g with g/mol, kg with kg/mol).
Can it be converted back to grams?
Yes. From n = m/M rearranged to m = n × M, entering the moles gives the mass in grams; many versions even support both directions at once.
Why convert grams to moles?
Because chemical equations are based on mole ratios, not mass ratios. To predict products or prepare solutions you must first change weighed grams into moles, then use the equation ratios, then convert back to grams. n = m/M is the first and most basic step in stoichiometry.
Related Tools
References
Content review: Calculatorism Science Team. Results are for reference only; please refer to the relevant authorities for the official figures.