Grams to Moles Calculator -- n = m/M Converter | LazyTools
Chemistry

Grams to Moles Calculator

Convert grams to moles (n = m/M) or moles to grams (m = n x M). Enter a chemical formula for automatic molar mass calculation, or type the molar mass directly. Avogadro number shown alongside moles result.

n = m/M formula Formula auto-fills MW Moles to grams too Avogadro number shown Free, no signup
Grams to Moles Calculator
n = m/M -- mass, moles and molar mass converter
Examples:

Explore all Stoichiometry Calculators

Molarity, mole calculator, empirical formula and more -- all free.

Browse Stoichiometry Tools
⭐ User Ratings

Rate this tool

4.9
Based on 3,876 ratings
5
3,565
4
193
3
77
2
38
1
19
Was this Grams to Moles Calculator helpful?
Thank you for your rating!
Key features

Why use the LazyTools Grams to Moles Calculator?

Formula auto-fills molar mass

Type H2O, NaCl or any formula and the molar mass is calculated automatically.

Both directions

Grams to moles (n = m/M) and moles to grams (m = n x M) in the same tool.

Avogadro number shown

Number of molecules displayed alongside the mole count for every calculation.

Four quick examples

Water, NaCl, glucose and iron pre-loaded for instant calculation.

Manual MW override

Enter molar mass directly for any compound not auto-parsed.

Free, no signup

Runs in your browser.

How to use

How to use this tool in three steps

Enter formula or molar mass

Type any chemical formula for auto MW, or enter MW directly.

Enter mass or moles

Fill in grams (to find moles) or moles (to find grams). Leave the other blank.

Click Calculate

Result appears with the formula and Avogadro number of molecules.

Copy result

Click Copy for lab reports.

Comparison

LazyTools vs other Grams to Moles Calculator tools

FeatureLazyToolsOmnicalculatorChemTeamWebqc
Formula auto-MWYES✓ Yes✗ No✓ Yes
Both directionsYES✓ Yes✓ Yes✓ Yes
Avogadro shownYES✗ No✗ No✗ No
Pre-loaded examplesYES✗ No✗ No✗ No
No signupYES✓ Yes✓ Yes✓ Yes
Reference

Grams to moles for common substances

SubstanceFormulaM (g/mol)1 mol mass0.5 mol mass
WaterH2O18.01518.015 g9.008 g
Sodium chlorideNaCl58.44358.443 g29.222 g
Carbon dioxideCO244.01044.010 g22.005 g
AmmoniaNH317.03117.031 g8.516 g
GlucoseC6H12O6180.156180.156 g90.078 g
IronFe55.84555.845 g27.923 g
Calcium carbonateCaCO3100.086100.086 g50.043 g
Sulfuric acidH2SO498.07998.079 g49.040 g
Sodium hydroxideNaOH39.99739.997 g19.999 g
Hydrochloric acidHCl36.46136.461 g18.231 g
Guide

Grams to Moles Calculator: Complete Guide

Converting between grams (mass) and moles (amount of substance) is the most fundamental calculation in quantitative chemistry. The formula is n = m / M, where n = moles, m = mass in grams, and M = molar mass in g/mol. Rearranged: m = n x M (mass from moles). The LazyTools calculator solves in either direction and auto-calculates the molar mass from any chemical formula.

How to convert grams to moles

Step 1: find the molar mass (M) of the substance. For an element, use the atomic weight from the periodic table. For a compound, sum the atomic weights of all atoms. Step 2: n = m / M. Example 1: how many moles in 36.0 g of water (H2O)? M(H2O) = 2(1.008) + 15.999 = 18.015 g/mol. n = 36.0 / 18.015 = 1.999 mol (approximately 2 mol). Example 2: how many moles in 5.85 g NaCl? M(NaCl) = 22.990 + 35.453 = 58.443 g/mol. n = 5.85 / 58.443 = 0.1001 mol. Example 3: how many moles in 100 g of iron (Fe)? M(Fe) = 55.845 g/mol. n = 100 / 55.845 = 1.791 mol. The LazyTools calculator auto-fills the molar mass from the formula.

How to convert moles to grams

Rearrange to m = n x M. Example 1: what mass of CO2 is 0.500 mol? M(CO2) = 12.011 + 2(15.999) = 44.010 g/mol. m = 0.500 x 44.010 = 22.005 g. Example 2: what mass of CaCO3 is 2.50 mol? M(CaCO3) = 40.078 + 12.011 + 3(15.999) = 100.086 g/mol. m = 2.50 x 100.086 = 250.22 g. Example 3: what mass of glucose (C6H12O6) is 0.250 mol? M = 180.156 g/mol. m = 0.250 x 180.156 = 45.039 g. These examples cover the standard question types for grams-to-moles in GCSE, A-level and AP Chemistry.

Grams to moles in reaction stoichiometry

In stoichiometry problems, mass is converted to moles, then the balanced equation molar ratio is applied, then moles are converted back to mass. For the reaction: CaCO3 -> CaO + CO2. What mass of CO2 is produced from 25.0 g CaCO3? Step 1: moles CaCO3 = 25.0 / 100.086 = 0.2498 mol. Step 2: moles CO2 = 0.2498 mol (1:1 from equation). Step 3: mass CO2 = 0.2498 x 44.010 = 10.99 g. For limiting reagent problems: convert all reactant masses to moles, divide by stoichiometric coefficients, the smallest result identifies the limiting reagent, and that determines the theoretical yield.

Moles and Avogadro's number

One mole of any substance contains exactly 6.02214076 x 10^23 particles (Avogadro's number, N_A). Number of molecules = n x N_A. For 1.00 mol H2O: molecules = 1.00 x 6.022 x 10^23 = 6.022 x 10^23 water molecules, each containing 2 hydrogen atoms and 1 oxygen atom, so: atoms of H = 2 x 6.022 x 10^23 = 1.204 x 10^24; atoms of O = 6.022 x 10^23. For 0.100 mol NaCl: formula units = 0.100 x 6.022 x 10^23 = 6.022 x 10^22; Na+ ions = 6.022 x 10^22; Cl- ions = 6.022 x 10^22. The LazyTools calculator shows the number of molecules alongside the moles result for any grams-to-moles conversion.

Common molar masses to memorise

For quick mental arithmetic in exams: H2O = 18 g/mol; CO2 = 44 g/mol; NaCl = 58.5 g/mol; CaCO3 = 100 g/mol; NH3 = 17 g/mol; H2SO4 = 98 g/mol; NaOH = 40 g/mol; HCl = 36.5 g/mol; KOH = 56 g/mol; Ca(OH)2 = 74 g/mol; Na2CO3 = 106 g/mol. Memorising these allows rapid estimation in multiple-choice questions and quick sanity checks in longer calculations. For any compound not in this list, calculate using the periodic table values and the LazyTools molar mass calculator.

Using this calculator in lab reports and coursework

All LazyTools chemistry calculators run in your browser with no data sent to any server. Results can be copied with one click for use in lab reports, assignments and problem sets. The formula is displayed with every result for easy verification. For effective exam preparation, attempt calculations by hand first and use this tool to check your answer -- this builds fluency alongside error-checking skill. The LazyTools stoichiometry suite covers all major quantitative chemistry calculations; see the related tools section for the calculators used most often alongside this one.

Stoichiometry: the central skill in quantitative chemistry

Stoichiometry is the quantitative study of the relationships between reactants and products in chemical reactions. Every stoichiometry calculation ultimately involves converting between mass (grams), amount of substance (moles), number of particles (atoms, molecules, ions) and concentration (mol/L or mol/kg). The mole is the central unit that connects these quantities: moles = mass / molar mass; moles = volume x concentration; particles = moles x Avogadro's number (6.022 x 10^23). Mastering these interconversions -- and the stoichiometric ratios from balanced equations -- is the single most important quantitative skill in A-level, IB and undergraduate general chemistry.

Grams to moles in limiting reagent problems

In reactions with two or more reactants, the limiting reagent (limiting reactant) is the one that is completely consumed first and determines the maximum theoretical yield. To identify it: convert all reactant masses to moles, divide each moles value by its stoichiometric coefficient from the balanced equation, and the reactant with the smallest result is the limiting reagent. Example: 10.0 g of H2 reacts with 56.0 g of O2 to form water (2H2 + O2 -> 2H2O). Moles H2 = 10.0/2.016 = 4.96 mol; stoich coeff = 2; ratio = 4.96/2 = 2.48. Moles O2 = 56.0/32.00 = 1.75 mol; stoich coeff = 1; ratio = 1.75/1 = 1.75. O2 has the smaller ratio -- O2 is the limiting reagent. Moles H2O formed = 1.75 x 2 = 3.50 mol. Mass H2O = 3.50 x 18.015 = 63.05 g. Excess H2 = 4.96 - 2(1.75) = 1.46 mol remaining.

Worked A-level and AP Chemistry problems

Problem 1: A 3.50 g sample of magnesium burns in oxygen: 2Mg + O2 -> 2MgO. What mass of MgO is produced? Moles Mg = 3.50/24.305 = 0.1440 mol. Moles MgO = 0.1440 mol (1:1 ratio). Mass MgO = 0.1440 x 40.304 = 5.804 g. Problem 2: What mass of silver nitrate (AgNO3, M=169.87 g/mol) is needed to react completely with 5.00 g of sodium chloride (NaCl)? AgNO3 + NaCl -> AgCl + NaNO3 (1:1). Moles NaCl = 5.00/58.443 = 0.0856 mol. Moles AgNO3 needed = 0.0856 mol. Mass AgNO3 = 0.0856 x 169.87 = 14.54 g. These two problems cover the fundamental stoichiometry pattern: mass -> moles -> stoich ratio -> moles -> mass, which appears in the majority of quantitative chemistry exam questions.

Grams to moles in gas law calculations

The ideal gas law PV = nRT connects moles to pressure, volume and temperature for gases. To use it, mass must first be converted to moles. Example: what pressure does 4.40 g of CO2 exert in a 2.50 L container at 300 K? M(CO2) = 44.010 g/mol. n = 4.40/44.010 = 0.0999 mol. P = nRT/V = 0.0999 x 8.314 x 300 / 2.50 = 99.7 kPa (approximately 1 atm). Conversely, from gas density: density of a gas at STP = M/22.414. For CO2: density = 44.010/22.414 = 1.963 g/L. Knowing 1.963 g of CO2 occupies 1 L at STP: n = 1.963/44.010 = 0.0446 mol/L -- the molar concentration of CO2 at STP. These gas-law stoichiometry problems combine the grams-to-moles conversion with the ideal gas law in a standard two-step calculation type.

The grams-to-moles conversion appears in virtually every quantitative chemistry calculation: synthesis planning, analytical chemistry, environmental monitoring, pharmaceutical formulation and industrial process chemistry all require converting between the practical gram-scale quantities measured in the laboratory and the mole-scale quantities used in equations. Mastering n = m/M is the single most important calculation skill in undergraduate chemistry.

Frequently asked questions

n = m / M. Divide the mass in grams by the molar mass in g/mol. For 36 g H2O: n = 36 / 18.015 = 2.00 mol.

m = n x M. Multiply moles by the molar mass. For 0.500 mol CO2: m = 0.500 x 44.010 = 22.005 g.

M(H2O) = 2(1.008) + 15.999 = 18.015 g/mol.

M(NaCl) = 58.443. n = 100 / 58.443 = 1.711 mol.

Avogadro's number: 6.02214076 x 10^23 molecules per mole.

M(Fe) = 55.845. n = 100 / 55.845 = 1.791 mol.

M(C6H12O6) = 6(12.011) + 12(1.008) + 6(15.999) = 180.156 g/mol.

Yes. Free, no signup, runs in your browser.