Mole Calculator
Calculate moles from mass and molar mass, number of atoms/molecules, or gas volume at STP. Three modes via the "Calculate From" selector.
Moles (n)
—
Calculation Details
Embed This Calculator
Copy the code and paste it into any webpage to embed this calculator.
WordPress users: add a Custom HTML block (not the Embed block) and paste the code there.
Free to use. A small "Powered by Blucalculator" credit is appreciated but not required.
How to use this calculator
The first thing to do is choose a mode from the Calculate From dropdown. There are 3 options, and they correspond to 3 different starting situations.
Mode 1: Mass + Molar Mass (n = m / M)
Use this when you know the mass of a substance in grams and its molar mass in g/mol.
- Mass (m): Enter the mass of your sample in grams. If you have 18.015 g of water, enter 18.015.
- Molar Mass (M): Enter the molar mass of the substance in g/mol. For water (H₂O), that’s 18.015 g/mol. You can look this up from a periodic table by summing the atomic masses of all atoms in the formula.
This is the most common mode. Most lab problems give you a mass and ask for moles.
Mode 2: Number of Particles (n = N / Nₐ)
Use this when you know how many individual atoms or molecules you have.
- Number of Particles (N): Enter the count of atoms or molecules. The default shown is 6.02214076 × 10²³, which is exactly 1 mole. Enter your value in scientific notation or as a plain number.
Avogadro’s number (Nₐ = 6.02214076 × 10²³) is the denominator. The calculator handles that automatically.
Mode 3: Gas Volume at STP (n = V / 22.414)
Use this for ideal gases at standard temperature and pressure (0°C, 1 atm).
- Gas Volume (V): Enter the volume of gas in liters. At STP, 1 mole of any ideal gas occupies 22.414 L. Enter your measured volume and the calculator divides by that molar volume.
This mode only applies to gases at STP. Room temperature (25°C) uses a different molar volume (24.465 L/mol), so don’t use Mode 3 for gases measured at room conditions.
Click Calculate to get your moles. Click Clear to reset all fields.
Example: converting 36 g of water to moles (Mode 1)
Mass (m) = 36 g Molar Mass of H₂O = 18.015 g/mol
n = 36 / 18.015 = 1.998 mol (effectively 2.0 mol)
Only the fields relevant to your selected mode are used in the calculation. Mass and Molar Mass are greyed out in Modes 2 and 3. You can still see them, but the calculator ignores them. Don’t let that confuse you.
What problem this calculator solves
Every stoichiometry problem in chemistry eventually needs moles. Reaction equations are written in molar ratios: 2H₂ + O₂ → 2H₂O means 2 moles of hydrogen react with 1 mole of oxygen. To use that ratio, you need to convert your actual quantities (grams, liters, particle counts) into moles first.
Without moles, the ratios don’t apply. You can’t say “2 grams of hydrogen reacts with 1 gram of oxygen” because the atomic masses are different. But “2 moles of hydrogen” and “1 mole of oxygen” is exact.
The other place this shows up constantly is in concentration problems. Molarity (mol/L) requires moles. Mole fraction requires moles. Virtually every quantitative chemistry concept routes through this unit at some point.
The calculator makes the entry step fast so you can focus on what comes after.
The concept explained simply
Avogadro figured out that equal volumes of gases at the same temperature and pressure contain the same number of molecules, regardless of what the gas is. That’s a remarkable fact. It means the “amount” of a substance can be described independently of what the substance is.
That amount is the mole. One mole of anything contains 6.02214076 × 10²³ of that thing. One mole of carbon atoms. One mole of water molecules. One mole of electrons. The count is the same.
What changes is the mass. Carbon atoms are heavier than hydrogen atoms, so 1 mole of carbon (12.011 g) weighs more than 1 mole of hydrogen gas (2.016 g). The molar mass is just the gram equivalent of that count. It’s the bridge between “how many” and “how much.”
One mole is to atoms what a dozen is to eggs. The only difference is scale: 6.02 × 10²³ instead of 12, and the "unit" on the scale is the atomic mass unit instead of nothing.
The three formulas explained
Each calculator mode uses a different formula depending on what you’re starting with.
Mode 1: from mass
n is moles, m is mass in grams, M is molar mass in g/mol. Divide grams by grams-per-mole and you get moles. The units cancel cleanly: (g) / (g/mol) = mol.
Mode 2: from particle count
N is the number of particles (atoms or molecules), Nₐ is Avogadro’s number (6.02214076 × 10²³ mol⁻¹). Divide your particle count by Avogadro’s number to get moles.
Mode 3: from gas volume at STP
V is the volume of gas in liters, 22.414 L/mol is the molar volume of an ideal gas at STP (0°C, 1 atm). Divide volume by 22.414 to get moles.
All 3 formulas are solving for the same thing. They just start from different knowns. The mole is the output in every case.
Mode 3 uses 22.414 L/mol, which is valid only at STP (0°C, 1 atm). At SATP (25°C, 100 kPa), the molar volume is 24.789 L/mol. If your gas is at room temperature, Mode 3 will give you a wrong answer. Use Mode 1 with mass and molar mass instead, or calculate moles from the ideal gas law (PV = nRT) manually.
Reference table: molar masses for common substances
You need the molar mass for Mode 1. Here are values for substances that come up constantly in general chemistry.
| Substance | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H₂O | 18.015 |
| Sodium chloride | NaCl | 58.443 |
| Carbon dioxide | CO₂ | 44.010 |
| Glucose | C₆H₁₂O₆ | 180.156 |
| Sulfuric acid | H₂SO₄ | 98.079 |
| Ammonia | NH₃ | 17.031 |
| Oxygen gas | O₂ | 31.999 |
| Hydrogen gas | H₂ | 2.016 |
| Methane | CH₄ | 16.043 |
| Calcium carbonate | CaCO₃ | 100.087 |
| Iron | Fe | 55.845 |
| Ethanol | C₂H₅OH | 46.068 |
For anything not listed, sum the atomic masses from the periodic table. Carbon = 12.011, Hydrogen = 1.008, Oxygen = 15.999, Nitrogen = 14.007, and so on.
Real-world examples
The lab preparation problem
A student needs to prepare a 0.5 mol/L solution of NaCl and wants to make 250 mL. How many grams of NaCl do they need?
Working backward from a target mole count
Target moles = 0.5 mol/L × 0.250 L = 0.125 mol
To verify with the calculator: if they weigh out 7.305 g of NaCl:
n = m / M = 7.305 / 58.443 = 0.125 mol ✓
Weigh 7.305 g, dissolve, dilute to 250 mL. Done.
The gas cylinder scenario
A technician has a 5.0 L sample of nitrogen gas collected at STP. How many moles is that, and how many molecules?
Mode 3, then Mode 2 in reverse
Mode 3: n = V / 22.414 = 5.0 / 22.414 = 0.223 mol
Number of molecules = n × Nₐ = 0.223 × 6.022 × 10²³ = 1.343 × 10²³ molecules
The reaction stoichiometry check
A combustion reaction burns 44 g of propane (C₃H₈, molar mass = 44.097 g/mol). The balanced equation is C₃H₈ + 5O₂ → 3CO₂ + 4H₂O. How many moles of CO₂ are produced?
Moles in, stoichiometry, moles out
n(C₃H₈) = 44 / 44.097 = 0.998 mol (essentially 1.0 mol)
From the balanced equation: 1 mol propane produces 3 mol CO₂
n(CO₂) = 0.998 × 3 = 2.994 mol (essentially 3.0 mol)
Mass of CO₂ = 2.994 × 44.010 = 131.8 g
Common mistakes people make
Mixing up mass and molar mass. Mass (m) is specific to your sample. Molar mass (M) is a property of the substance itself. If you have 5 g of NaCl, the mass is 5 g and the molar mass is 58.443 g/mol, always, regardless of how much you have. Swapping these gives you a nonsense answer.
Using Mode 3 at the wrong temperature. This comes up constantly. A student measures 2.5 L of oxygen at room temperature (25°C), plugs it into Mode 3, and gets n = 2.5 / 22.414 = 0.111 mol. The correct answer using 24.465 L/mol is 0.102 mol. For a quick estimate that’s fine. For a graded lab report, it’s a mistake. Check your conditions before choosing Mode 3.
Counting formula units vs. atoms. Mode 2 asks for atoms or molecules depending on what you’re tracking. 1 mole of NaCl gives you 6.022 × 10²³ formula units, but 1.204 × 10²⁴ ions (Na⁺ and Cl⁻ combined). If your problem asks for moles of ions, not moles of NaCl, the answer differs by a factor of 2. The calculator gives you moles of whatever particle count you enter.
Forgetting to convert units before entering. The mass field expects grams. If your mass is in milligrams, divide by 1000 first. If it’s in kilograms, multiply by 1000. The molar mass field expects g/mol. These aren’t flexible.
Computing molar mass incorrectly. CaCO₃ has 1 calcium (40.078), 1 carbon (12.011), and 3 oxygens (3 × 15.999 = 47.997). Total: 100.086 g/mol. A common error is counting only 1 oxygen. Double-check subscripts in the formula.
Polyatomic ions in parentheses multiply everything inside. Ca(OH)₂ has 1 Ca, 2 O, and 2 H. The subscript outside the parenthesis applies to the whole group. Getting this wrong makes your molar mass wrong, which makes your moles wrong, which breaks every calculation downstream.
Hidden factors most people ignore
Hydrated salts have extra mass. CuSO₄·5H₂O (blue vitriol) has a molar mass of 249.68 g/mol, not 159.61 g/mol (anhydrous CuSO₄). If you weigh out a hydrated salt and use the anhydrous molar mass, you’ll undercount your moles. Always check whether your compound is hydrated.
Isotopic composition matters at high precision. The molar mass of carbon is 12.011 g/mol, not exactly 12, because about 1.1% of natural carbon is carbon-13. For most chemistry, this is negligible. For isotope-specific work or mass spectrometry, the distinction matters.
Purity affects actual moles. A bottle labeled “58.44 g of NaCl” might be 99.2% pure. That means you actually have 57.96 g of NaCl and 0.47 g of something else. In a teaching lab this rarely matters. In analytical work, it does. Reagent grade vs. lab grade vs. technical grade have different purity levels.
Avogadro’s number was redefined in 2019. The SI system redefined the mole so that Avogadro’s constant is exactly 6.02214076 × 10²³ mol⁻¹, with no uncertainty. Before that, it was a measured value. For all practical purposes this changes nothing, but it’s worth knowing if you see a slightly different value in older textbooks.
The mole isn't arbitrary. It was chosen so that the molar mass in g/mol numerically equals the atomic mass in atomic mass units. That alignment is what makes the m/M conversion exact.
What to do with the result
For stoichiometry: once you have moles of your starting material, multiply by the molar ratio from the balanced equation. If the equation says 1:2, you multiply by 2. If it says 3:1, you multiply by 1/3. Then convert back to grams if needed using n × M.
For solution preparation: if you know the molarity (C) and volume (V) you want, the moles you need is n = C × V. Use Mode 1 in reverse: grams needed = n × M. Weigh that mass, dissolve, dilute to the target volume.
For particle-level problems: multiply your moles by 6.022 × 10²³ to get the number of atoms or molecules. This comes up in statistical mechanics and when problems ask “how many molecules are in…”
For ideal gas problems: moles connects to pressure and temperature via PV = nRT. Once you have n from the calculator, you can find pressure, volume, or temperature given the other two.
For mole fraction: this is where the mole calculator and the mole fraction calculator work together. Use this calculator to convert each component from grams to moles. Then enter those mole values into the mole fraction calculator.
You’re ready to move to the next step when your mole value is positive and makes physical sense given your sample size. A 10 g sample of any normal compound should give you something between 0.05 and 5 moles. If you get 10⁻⁸ or 10⁶, you’ve probably entered mass in milligrams or molar mass in kg/mol by accident.
Limitations and misconceptions
The calculator assumes pure substances. If your sample is a mixture, you can’t use a single molar mass for the whole thing. You’d need to know the composition, separate out the components, and calculate moles for each individually.
Mode 3 assumes ideal gas behavior. Real gases deviate from ideal behavior at high pressures and low temperatures. For most intro chemistry problems at or near room conditions, this deviation is small enough to ignore. For high-pressure industrial applications, it’s not.
A persistent misconception is that the mole is somehow a physical object or a container. It’s a count. “One mole of water” is just a name for 6.022 × 10²³ water molecules. Nothing special happens at that exact quantity. The number was chosen because it lines up the atomic mass scale with the gram scale.
The calculator also doesn’t help you find molar mass. If you don’t know the molar mass of your compound, you’ll need a periodic table and the molecular formula. The molar mass reference table in this article covers the most common cases.
If you’re working with a compound and can’t find the molar mass, look up the molecular formula and sum the atomic masses yourself. Every periodic table lists atomic mass below the element symbol. Add them up based on the subscripts in the formula.
The bottom line
The mole is the unit that makes chemistry quantitative. Without it, balanced equations are just symbolic. With it, you can predict how many grams of product a reaction will yield, how much reagent to weigh out for a solution, or how many molecules are in a gas sample.
This calculator handles the 3 most common entry points: mass, particle count, and gas volume at STP. Pick the mode that matches your starting information, enter the numbers, and you have moles in one step.
Get the moles right and everything downstream works. Get them wrong and every calculation after this point is off by the same factor.
Frequently Asked Questions
What is a mole?
A mole is 6.02214076 × 10²³ particles (Avogadro's number), defined by the 2019 SI revision as an exact value. One mole of carbon-12 atoms has a mass of exactly 12 grams.
How do I find the molar mass?
Add the atomic masses of all atoms in the formula. For H₂O: 2×1.008 + 1×15.999 = 18.015 g/mol. Use our Molar Mass Calculator to parse any chemical formula automatically.
Does the gas volume method work at room temperature?
No — 22.414 L/mol applies only at STP (0 °C, 1 atm). At 25 °C and 1 atm the molar volume is about 24.465 L/mol. Use the Liters to Moles Calculator for non-STP conditions.
How do you convert grams to moles?
Divide the mass in grams by the molar mass of the substance: n = m / M. Example: 36 g of water (M = 18.015 g/mol) → 36 / 18.015 = 1.999 mol ≈ 2 mol. You must know the molar mass first — look it up on a periodic table or use a molar mass calculator.
How do you convert moles to grams?
Multiply the number of moles by the molar mass: m = n × M. Example: 3 moles of NaCl (M = 58.44 g/mol) → 3 × 58.44 = 175.32 g. This is the reverse of the grams-to-moles conversion and is used constantly in lab preparation and stoichiometry.
How many molecules are in 1 mole?
Exactly 6.02214076 × 10²³ molecules (Avogadro's number, Nₐ). This figure was fixed as an exact integer by the 2019 SI redefinition of the mole. In practical terms: 1 mole of water contains 6.022 × 10²³ H₂O molecules, and 1 mole of oxygen gas (O₂) contains 6.022 × 10²³ O₂ molecules — but 1.204 × 10²⁴ individual oxygen atoms.
How do you calculate moles in a chemical reaction?
Use stoichiometric coefficients from the balanced equation. Example: N₂ + 3H₂ → 2NH₃. If you start with 2 mol of N₂, the coefficients tell you 3 × 2 = 6 mol H₂ is needed and 2 × 2 = 4 mol NH₃ is produced. The mole ratio from the balanced equation is the key — always balance first, then apply n = m/M to convert masses to moles.
How do moles relate to molarity (concentration)?
Molarity (M) = moles of solute / litres of solution. So moles = Molarity × Volume (in litres). Example: 250 mL of a 2 M NaOH solution contains 2 × 0.250 = 0.5 mol NaOH = 0.5 × 40 = 20 g. This is the foundation of all solution chemistry: titrations, dilutions, and reaction yield calculations all start with moles.
Why is molar volume at STP exactly 22.414 litres?
It follows from the ideal gas law: PV = nRT. At STP (T = 273.15 K, P = 101.325 kPa), for n = 1 mol: V = nRT/P = 1 × 8.314 × 273.15 / 101325 = 0.022414 m³ = 22.414 L. All ideal gases have the same molar volume at the same T and P regardless of their molecular mass — this is a direct consequence of Avogadro's law.
What is the difference between a mole and a molecule?
A molecule is a single chemical unit (e.g., one H₂O molecule). A mole is a counting unit — 6.022 × 10²³ of anything. Just as "a dozen" means 12 of any object, "a mole" means 6.022 × 10²³ of any particle. The mole bridges the atomic scale (individual molecules) to the lab scale (measurable grams), making it the central unit of quantitative chemistry.
Related Calculators
Molarity Calculator
Calculate the molarity (molar concentration) of a solution — moles of solute per litre. Enter mass of solute, its molar mass, and volume of solution.
Grams to Moles Calculator
Convert grams of a substance to moles using molar mass. Supports any compound by entering its molar mass manually.
Atoms to Moles Calculator
Convert a number of atoms to moles using Avogadro's number (6.022 × 10²³). Supports scientific notation input.
Molar Mass Calculator
Calculate the molar mass of any chemical compound by entering its formula. Shows atomic mass breakdown for each element.
Liters to Moles Calculator
Convert gas volume (liters) to moles using the ideal gas law. Choose STP, SATP, or enter custom pressure and temperature.
Percent Yield Calculator
Calculate percent yield of a chemical reaction by comparing actual yield to theoretical yield.