You divide the mass by the molar mass. That's the whole calculation: moles (n) equals mass in grams (m) divided by molar mass in grams per mole (M). The one condition that breaks it is unit mismatch, because a mass in milligrams or kilograms must be converted to grams before you divide, and a formula unit count must be converted to moles of formula units first. Get both units right and the arithmetic is a single division.

Why the Molar Mass Is the Only Number You Need

The molar mass is the bridge between the balance reading and the mole count, and it comes straight from the periodic table. For an element, the atomic weight in atomic mass units is numerically the same as its molar mass in grams per mole; the International Union of Pure and Applied Chemistry publishes these atomic weights through its Commission on Isotopic Abundances and Atomic Weights. For sodium, that value is 22.99 g/mol.

For a compound, you add the atomic weights of every atom the formula lists. Water, H₂O, carries two hydrogen atoms at 1.008 and one oxygen at 16.00, which gives 18.016 g/mol. That addition, and nothing else, is what most worked examples in textbooks skip over in a single line.

Compounds containing water of crystallization change the number. Copper(II) sulfate pentahydrate, CuSO₄·5H₂O, includes five water molecules in every formula unit, so its molar mass is roughly 249.7 g/mol rather than the 159.6 g/mol of the anhydrous salt. If you weigh a hydrate and use the anhydrous value, you will overstate the moles by about 56 percent.

The molar mass is a property of the formula, not of the sample. Heating a hydrate drives the water off and the molar mass of what remains changes, even though the mass you weighed originally was correct. Match the M you divide by to the substance actually sitting on the balance.

Reading the Molar Mass Off the Periodic Table Without Errors

Locate the atomic weight, ignore the unit label, and attach grams per mole. The number printed under an element's symbol is its standard atomic weight in atomic mass units, and for the mole calculation you simply relabel it as g/mol. For chlorine the figure is 35.45, which reflects the natural mix of isotopes rather than any single atom.

Use the table's value, not a rounded one from memory, when precision matters. Iron appears as 55.85, carbon as 12.01, and oxygen as 16.00. A laboratory that needs three significant figures will lose the third if you round chlorine to 35.5 before adding it to anything.

Count every atom in the formula before you add. Calcium hydroxide, Ca(OH)₂, contains one calcium, two oxygens, and two hydrogens, and the parentheses apply the subscript 2 to the whole hydroxide group. Missing that doubling gives a molar mass that is short by roughly 34 g/mol.

Watch for formulas where the subscript applies to a polyatomic ion, a hydrate dot, or a coefficient. Aluminum sulfate, Al₂(SO₄)₃, has three sulfate groups, so you add three sulfurs and twelve oxygens. A quick cross-check is to compute the molar mass twice, once by element and once by group, and confirm the totals agree.

One Master Method for Grams to Moles in Any State

Write the molar mass of the formula, confirm your mass is in grams, and divide. That three-part routine works for a solid weighed on a balance, a liquid measured by volume and converted through density, and a gas weighed in a sealed vessel. The chemistry does not care what state the sample is in; the molar mass of the formula is the same number.

For a liquid, you need the density to get from volume to mass, and density belongs to the specific substance at a stated temperature. Ethanol at 20 °C has a density near 0.789 g/mL, so 25.0 mL carries about 19.7 g. Then divide by the molar mass of ethanol, 46.07 g/mol, to reach roughly 0.428 mol.

For a solution, the mass of solute is not the mass of the solution. A 10.0 percent sodium chloride solution means 10.0 g of NaCl in every 100.0 g of the mixture, so 250.0 g of that solution holds 25.0 g of NaCl. Divide 25.0 by 58.44 and you get 0.428 mol, coincidentally close to the ethanol figure.

Compounds that dissociate need one extra decision. If you weigh 5.85 g of NaCl and want moles of chloride ions rather than moles of formula units, the ratio is one to one, so the answer is the same. For calcium chloride, CaCl₂, each formula unit releases two chloride ions, and 5.55 g of CaCl₂ at 110.98 g/mol gives 0.0500 mol of formula units and therefore 0.100 mol of chloride ions.

A Worked Example From a Weighed Sample to a Final Answer

Start with a sample you can picture: 10.0 g of sodium chloride weighed on a balance that reads to two decimal places. The formula is NaCl, so the molar mass is 22.99 plus 35.45, or 58.44 g/mol. Divide 10.0 by 58.44 and the sample contains 0.171 mol of NaCl.

Now scale that to something a technician would actually do. Suppose the balance reads 4.25 g of sodium bicarbonate, NaHCO₃, and the question asks for moles. Sodium contributes 22.99, hydrogen 1.008, carbon 12.01, and three oxygens 48.00, for a molar mass of 84.01 g/mol. The division gives 0.0506 mol.

Check the answer against a rough estimate before trusting it. Ten grams of table salt is a bit less than a fifth of a mole, and one mole of NaCl would weigh 58.44 g. If your calculator returns 17.1 mol from 10 g, you divided by the wrong molar mass or misplaced a decimal.

Carry the units through the division as a habit. Grams divided by grams per mole leaves moles, and the unit cancellation is the cheapest error check available. If your answer comes out in grams per mole squared, you multiplied when you should have divided.

When the Mass Isn't in Grams: Milligrams, Kilograms, and Tonnes

Convert to grams first, every time, and treat the conversion as a separate step you write down. A pharmaceutical sample labeled 250 mg is 0.250 g, so dividing by 180.16 g/mol for glucose gives 0.00139 mol. Skipping the conversion gives an answer that is off by a factor of a thousand.

Pressures and densities push beginners toward the wrong unit more often than laboratory balances do. Kilograms are common in industrial settings, and a 2.50 kg drum of sodium hydroxide holds 2500 g. Divide by 40.00 g/mol and the drum contains 62.5 mol of NaOH.

Tonnes appear in bulk chemistry and in emissions reporting. One metric tonne is 1,000,000 g, so a 3.2 tonne batch of calcium carbonate, CaCO₃, at 100.09 g/mol, contains about 32,000 mol. Writing the conversion as a fraction with grams on top keeps the cancellation honest.

The failure case worth memorizing is the milligram trap. A 500 mg tablet of aspirin, C₉H₈O₄, at 180.16 g/mol, contains 0.00278 mol, not 2.78 mol. Decimal errors in the conversion step produce answers that are wrong by three orders of magnitude and still look plausible on the page.

Two-Step Calculations: From Formula Units to Grams and Back

Avogadro's constant connects particle counts to moles, and the molar mass connects moles to mass, so any route between particles and grams needs both. The constant is defined as exactly 6.02214076 × 10²³ per mole by the International System of Units definition that took effect in May 2019. A sample containing 1.20 × 10²⁴ formula units of NaCl therefore holds two moles, which weigh 116.88 g.

Run the chain in either direction and label each stage. Going from formula units to mass, divide by Avogadro's constant, then multiply by molar mass. Going from mass to formula units, divide by molar mass, then multiply by the constant.

A common question asks how many water molecules sit in 18.0 g of water. The molar mass is 18.016 g/mol, so the mass is almost exactly one mole, and the answer is the same constant, 6.022 × 10²³ molecules. Change the sample to 1.00 g and the route still works: 0.0555 mol, then 3.34 × 10²² molecules.

The hydrate case is where two-step problems go wrong. If a student weighs 4.99 g of CuSO₄·5H₂O and uses the anhydrous molar mass of 159.6, the calculator returns 0.0313 mol instead of 0.0200 mol. The water of crystallization is part of the formula being weighed, so it belongs in the molar mass.

Practice Set: Five Masses, Five Moles, One Table

Work each row independently before reading across to the answer. The table keeps the same three-step structure for every entry: formula, molar mass, then division. Values come from standard atomic weights rounded to two decimal places, which is enough for most coursework and laboratory prep.

Substance Mass weighed Molar mass (g/mol) Moles
NaCl 10.0 g 58.44 0.171
H₂O 18.0 g 18.02 0.999
CaCO₃ 50.0 g 100.09 0.500
C₆H₁₂O₆ (glucose) 4.50 g 180.16 0.0250
KMnO₄ 1.58 g 158.03 0.0100

Notice how the answers cluster. Fifty grams of calcium carbonate is almost exactly half a mole because its molar mass sits near 100, which makes it a favorite textbook example. Glucose at 180 g/mol means 18.0 g would be 0.100 mol, so 4.50 g lands at a quarter of that.

The potassium permanganate row rewards precision. Potassium contributes 39.10, manganese 54.94, and four oxygens 64.00, for 158.03 g/mol. If you dropped manganese's contribution, the answer would jump to about 0.0155 mol, a 55 percent error.

Redo the table with a different rounding and the answers shift in the third digit. That is expected and acceptable. What is not acceptable is an answer whose magnitude you never sanity-checked.

Spotting a Wrong Answer Before Your Instructor Does

A molar mass that is too small pushes the mole count up, while too large a mass pushes it down. The first sign of trouble is an answer that contradicts your estimate. Ten grams of a light compound like methane, at 16.04 g/mol, should give well over half a mole, and if your figure is 0.05 mol, something in the setup is wrong.

Check the formula unit count against the subscript pattern. Succinic acid, C₄H₆O₄, has four carbons, six hydrogens, and four oxygens, totaling 118.09 g/mol. A student who reads the formula as C₄H₆O and computes 70.09 g/mol will overstate the moles by 68 percent, and the mistake hides in plain sight.

Watch the mass unit in the question text. A problem that says "2.5 grams of magnesium ribbon" and one that says "2.5 milligrams" look nearly identical in a fast read, but the answers differ by a thousand. Underline the unit before you touch the calculator.

Recompute by a second route when the answer matters. Multiply your moles back by the molar mass and confirm you recover the original mass. That reverse check catches inverted fractions, dropped conversions, and transcription errors, and it takes ten seconds.

Hydrates, Precision, and Significant Figures in Real Work

Hydrated salts make the molar mass depend on a water count written after a dot. Magnesium sulfate heptahydrate, MgSO₄·7H₂O, includes seven waters, putting its molar mass near 246.5 g/mol. A student who weighs 12.3 g of the hydrate and divides by the anhydrous 120.4 gets 0.102 mol instead of 0.0499 mol, and the lab result will not match the expected yield.

Water of crystallization can be partly lost to the air before weighing. Epsom salt left open in a dry room loses water slowly, and the mass on the balance no longer matches the formula on the label. This is one edge case where the honest answer is to note that the sample composition is uncertain rather than to report a precise figure.

Significant figures should follow the weakest measurement. A balance reading of 10.0 g carries three significant figures, so an answer of 0.171 mol is defensible while 0.17107 mol overstates the precision. Standard atomic weights vary in their own significant figures, and chlorine's 35.45 is the limit for a simple chloride calculation.

The isotope question sits behind all of this. Atomic weights are average values for the natural isotopic mixture, so a sample enriched in one isotope will not obey the table value. For ordinary laboratory work this does not matter; for isotopic labeling studies it does, and the molar mass must be computed from the enriched composition instead.

FAQ

What is the formula for moles from mass?

Moles equal mass in grams divided by molar mass in grams per mole, usually written n = m ÷ M. The molar mass comes from summing atomic weights in the formula. For 20.0 g of NaOH at 40.00 g/mol, the result is 0.500 mol. Unit cancellation confirms the arithmetic.

Can I use density instead of mass in this calculation?

Yes, but only after multiplying volume by density to get mass in grams. A 50.0 mL sample of acetone at 0.784 g/mL is 39.2 g, and dividing by 58.08 g/mol gives 0.675 mol. Never divide a volume by a molar mass. The units would not cancel, and the answer would be meaningless.

Why did my answer differ from the textbook by a factor of 1000?

You almost certainly divided milligrams by grams per mole without converting. A 750 mg sample of citric acid, at 192.12 g/mol, is 0.00390 mol rather than 3.90 mol. Milligrams, kilograms, and tonnes all must become grams first. Write the conversion down separately so it cannot be skipped.

Is molar mass the same as molecular mass?

They share a number but differ in unit and scope. Molecular mass is measured in atomic mass units for one molecule, while molar mass is measured in grams per mole for a mole of formula units. For ionic compounds like NaCl there is no molecule at all, so molar mass is the correct term to use.

How do I handle water of crystallization in the molar mass?

Add the water molecules to the formula mass before dividing. Washing soda, Na₂CO₃·10H₂O, has a molar mass near 286.1 g/mol, roughly double the anhydrous 105.99. Using the anhydrous value on a weighed hydrate inflates the mole count by about 170 percent. Confirm the hydration state on the reagent label first.

What happens if I zero the balance without its weighing vessel?

You will subtract the vessel's mass from the sample without knowing it. A 250 mL beaker typically masses somewhere between 80 and 120 g depending on the maker, so a tared wrongly balance can throw the mass off by that amount. Always tare with the empty vessel on the pan and confirm the reading returns to zero before adding sample.

Does temperature change the calculated moles?

Not for solids, and only slightly for solutions, but it matters for liquids through density. Ethanol's density falls from about 0.789 g/mL at 20 °C toward roughly 0.772 g/mL near 50 °C, which shifts the moles in a fixed 25.0 mL sample by around two percent. Record the temperature whenever a volume-to-mass conversion is involved.

How precise should my final answer be?

Match the significant figures of the least precise measurement you used. A four-decimal balance reading supports four figures, while a molar mass quoted to two decimals limits you further. For 3.000 g of CaCO₃ divided by 100.09 g/mol, the defensible answer is 0.02998 mol, not 0.03 mol.