Mass ↔ Moles Calculator
Convert between mass (g), moles and molar mass (g/mol). Choose what you want to find, enter the other two values, and get the answer with step-by-step working. Don’t know the molar mass? Type a formula such as C6H12O6 or a name such as calcium hydroxide and the calculator works it out.
Background
The mole is one of the most important concepts in chemistry. It connects the macroscopic world of grams and liters to the microscopic world of atoms and molecules. The mole allows chemists to count particles by weighing them, since one mole of any substance contains 6.02214076 × 1023 particles (the Avogadro constant, exact by definition and usually rounded to 6.022 × 1023).
This calculator converts between mass, molar mass and moles. It’s perfect for homework, lab work or exam preparation, and it handles very small quantities (micromoles, milligrams) without losing digits.
How to use this calculator
- Choose what you want to find: moles, mass or molar mass.
- Enter the other two values. Scientific notation is fine: type 3.4e-6 or 3.4 x 10^-6.
- For the molar mass you can type a number, a formula such as C6H12O6 or Ca(OH)2, or a common name such as glucose.
- Choose how many significant figures you want, then click Calculate (or press Enter).
- Use Show visuals to turn the unit-cancellation picture and the composition bar on or off.
How this calculator works
Exact arithmetic. Your numbers are read exactly as typed, and the answer is rounded only once, at the end, using the usual half-up rule.
Atomic weights. Molar masses of formulas are built from the IUPAC (CIAAW) abridged standard atomic weights, 2024 table. A textbook that rounds atomic weights differently can give a slightly different molar mass — for example 180.16 g/mol instead of 180.156 g/mol for glucose.
What it understands. Formulas with brackets and hydrates (Ca(OH)2, Al2(SO4)3, CuSO4·5H2O), about 130 common compounds by name, and every element by name. Elements with no standard atomic weight — technetium, promethium, polonium to actinium, and everything heavier than uranium — are not supported.
Visuals. The unit strip shows which units cancel, the way a teacher marks the working. When the molar mass comes from a formula or name, the composition bar shows each element’s share of the mass, rounded to 0.1%.
Scientific notation. Answers below 0.001, or too large to show with the chosen number of significant figures, are written as a × 10n.
Formula & Equation Used
The fundamental relationship is:
- mass = moles × molar mass
- molar mass = mass ÷ moles
- molar mass of a compound = the sum of (number of atoms × atomic weight) for every element in its formula
Example Problems & Step-by-Step Solutions
Example 1 — Moles from mass
How many moles are in 18 g of water (H2O), if the molar mass is 18 g/mol?
Step: moles = mass ÷ molar mass = 18 ÷ 18.
Result: 1.000 mol (4 significant figures).
Example 2 — Mass from moles
What is the mass of 0.5 mol of sodium chloride (NaCl), if the molar mass is 58.44 g/mol?
Step: mass = moles × molar mass = 0.5 × 58.44.
Result: 29.22 g.
Example 3 — Molar mass
A student has 12 g of carbon (C) and 1 mol. What is the molar mass?
Step: molar mass = mass ÷ moles = 12 ÷ 1.
Result: 12.00 g/mol (4 significant figures).
Example 4 — A very small amount
Determine the mass (in g) of 3.4 × 10−6 mol of glucose (C6H12O6).
Step: molar mass of C6H12O6 = 6(12.011) + 12(1.008) + 6(15.999) = 180.156 g/mol. mass = moles × molar mass = 3.4 × 10−6 × 180.156.
Result: 6.125 × 10−4 g (that is 0.0006125 g).
Example 5 — From a name
How many moles are in 25 g of calcium hydroxide?
Step: Calcium hydroxide is Ca(OH)2: 40.078 + 2(15.999) + 2(1.008) = 74.092 g/mol. moles = 25 ÷ 74.092.
Result: 0.3374 mol.
Frequently Asked Questions
How do you calculate moles from grams?
Divide the mass of the substance (in grams) by its molar mass (g/mol).
What is molar mass?
Molar mass is the mass of one mole of a substance, usually measured in g/mol. It equals the atomic or molecular weight from the periodic table.
Why are moles important in chemistry?
Moles connect measurable amounts (grams) to the actual number of atoms, molecules, or ions. They are the foundation for stoichiometry and chemical equations.
How do I find the molar mass of a compound?
Add up the atomic weights of every atom in its formula. For Ca(OH)2 that is 1 × 40.078 + 2 × 15.999 + 2 × 1.008 = 74.092 g/mol. You can also type the formula, or a common name such as calcium hydroxide, into the molar mass box and this calculator does the adding for you.
How do I enter scientific notation such as 3.4 × 10−6?
Type 3.4e-6, or 3.4 x 10^-6, or 3.4×10^-6. The shorthand 3.4 x 10-6 and a pasted 3.4 × 10⁻⁶ are understood too, and the result shows how your entry was read.
Why is my answer written as 6.125 × 10−4 instead of 0.0006125?
Very small answers are written in scientific notation so that every significant figure is visible. Answers below 0.001, or too large to show with the chosen number of significant figures, use it.
Which atomic weights does this calculator use?
The IUPAC (CIAAW) abridged standard atomic weights from the 2024 table. Some textbooks round them differently, so a molar mass can differ in the last digit or two — for example 180.156 g/mol here and 180.16 g/mol in many textbooks for glucose.