Use the formula n = m / M to calculate the number of moles from a sample’s mass: divide its mass in grams by its molar mass in grams per mole. This calculator uses those two values and returns the amount of substance in moles, plus the equivalent number of particles.
Formula
The standard mass-based formula is n = m / M.
- n is amount of substance, measured in moles (mol).
- m is the sample mass, measured in grams (g).
- M is the substance’s molar mass, measured in grams per mole (g/mol).
Dividing grams by grams per mole leaves moles: g ÷ (g/mol) = mol. The calculator’s second result converts moles to a count of specified entities: N = n × NA, where N is the number of entities and the Avogadro constant, NA, is exactly 6.02214076 × 1023 mol−1. The entity must be understood from the substance: it may be molecules, atoms, ions, or formula units. For water, for example, the count means water molecules.
The formula assumes that the entered mass is the mass of the substance whose molar mass you entered. For a mixture, an impure sample, or a solution, the total measured mass may not be the mass of the target substance; use the mass or amount attributable to that substance.
Worked Example
The defaults describe 18.015 g of water and a molar mass of 18.015 g/mol, using the abridged standard atomic weights H = 1.008 and O = 15.999.
- Calculate water’s molar mass: 2 × 1.008 + 15.999 = 18.015 g/mol.
- Divide sample mass by molar mass: n = 18.015 g / 18.015 g/mol = 1.0000 mol.
- Convert to molecules: N = 1.0000 mol × 6.02214076 × 1023 mol−1 = 6.022 × 1023 particles (rounded to the displayed whole-particle precision).
The first result is 1.0000 mol, matching the calculator’s four decimal places. The particle count is an idealized count derived from the amount; a laboratory balance does not directly count molecules.
Assumptions
- The sample mass and molar mass refer to the same chemical substance and use compatible units.
- The sample’s stated mass is treated as the mass of that substance; purity and composition are not independently assessed.
- The particle conversion uses the exact Avogadro constant and the entities represented by the chemical formula.
How to Find Molar Mass
Molar mass is the mass of one mole of a substance. For a pure element, use its atomic molar mass. For a molecular or ionic formula, add the atomic weights of all atoms in one formula unit, multiplying each element’s atomic weight by its subscript. Use a reliable periodic table and the chemical formula for the substance in question.
For carbon dioxide, CO2, the approximate molar mass is 12.011 + 2 × 15.999 = 44.009 g/mol. A 22.0045 g sample therefore contains 22.0045 / 44.009 = 0.50000 mol, subject to the precision of the mass and atomic weights used. For an ionic solid such as sodium chloride, the formula unit—not a discrete molecule—is the relevant entity when describing particle count.
Hydrates, salts in different forms, and compounds with different isotopic compositions can have different molar masses. Include waters of crystallization where they appear in the formula. For a mixture, there is no single molar mass unless its composition is known and the calculation is defined for a particular component.
Other Ways to Calculate Moles
Mass is not the only route. Choose a relationship that matches what you know and the conditions of the problem:
- From particle count: n = N / NA. Divide the number of atoms, molecules, ions, or formula units by 6.02214076 × 1023 entities per mole.
- From solution concentration: n = cV, where c is amount concentration in mol/L and V is solution volume in L. Convert milliliters to liters by dividing by 1000 before multiplying.
- From an ideal gas: n = PV / (RT), where P is absolute pressure, V is gas volume, T is absolute temperature in kelvins, and R must use units consistent with P and V. Real gases may depart from this model, especially at high pressure or low temperature.
- From a balanced reaction: use the balanced equation’s coefficients as mole ratios. This gives a stoichiometric relationship, not a direct measurement of how much reaction actually occurred.
These equations are alternatives for different known quantities, not interchangeable shortcuts. In a gas calculation, for instance, using Celsius instead of kelvins or gauge pressure instead of absolute pressure gives an incorrect result.
Choosing Inputs and Reading Precision
Enter mass in grams and molar mass in grams per mole. If your mass is in milligrams, divide by 1000 to convert it to grams; if it is in kilograms, multiply by 1000. Keep the unit conversion explicit rather than entering a number whose unit the calculator does not expect. Molar mass should correspond to the compound’s actual formula and form.
The answer’s meaningful precision depends on the measurements and assumptions, not just the number of digits shown. If a balance reads 18.02 g, reporting a result to many decimal places does not make the measurement more precise. Retain extra digits in intermediate calculations and round the final answer to a sensible number of significant figures based on the least precise input. The calculator’s displayed decimals are a formatting choice, not a statement about experimental certainty.
A zero mass gives zero moles. A negative mass is not physically meaningful for this calculation, so the calculator accepts only nonnegative mass. A result may be mathematically valid but still unsuitable if the sample is impure, wet, mixed, or measured with insufficient precision.
Common Mistakes and Limits
- Using the wrong molar mass: Check subscripts, parentheses, hydration, and the chemical form. A mistaken formula changes the answer directly.
- Mixing units: The mass and molar mass must use compatible units. For example, grams divided by g/mol gives moles; milligrams divided by g/mol gives a value 1000 times too small unless converted.
- Confusing moles with molecules: A mole is an amount, not a particle. One mole contains Avogadro’s number of specified entities.
- Treating solution volume as sample mass: A volume alone does not provide mass or moles without additional information, such as concentration or density and composition.
- Ignoring purity: If only a fraction of a weighed sample is the target compound, calculate using the target’s actual mass rather than the gross mass.
The mass formula is simple, but it cannot determine an unknown composition or correct an inaccurate measurement. In practical laboratory work, follow your lab method, the safety data sheet (SDS), and your supervisor.
Frequently Asked Questions
What is the formula for moles from mass?
Divide the sample mass by its molar mass: n = m / M. With mass in grams and molar mass in g/mol, the result is in moles.
How do I calculate moles without mass?
Use the information available: n = N/NA for a particle count, n = cV for a solution concentration and volume, or n = PV/(RT) for an ideal gas with consistent units and absolute temperature.
How many particles are in one mole?
One mole contains exactly 6.02214076 × 1023 specified entities. Those entities may be atoms, molecules, ions, or formula units.
Can moles be negative?
No. A negative calculated amount is not physically meaningful. If an equation produces one, check the inputs, units, and how the quantities were defined.
Is molar mass the same as molecular mass?
They are related but have different units. Molecular mass describes the mass of one molecule, often in atomic mass units; molar mass describes the mass of one mole of entities, in g/mol.
Related
Formula used
in m | Sample mass | g | 18.015 | 0 in mm | Molar mass | g/mol | 18.015 | 0 out n | Amount of substance | mol | m / mm | 4 out p | Number of particles | particles | n * 6.02214076e23 | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Pressure Density Depth Formula for Fluids98,066 Pa
- Pressure Density Temperature Equation Calculator100,961.74 Pa
- Pressure Density Cup: What It Measures and How It Works1.0000 g/mL
- Pressure, Density, and Temperature: How They Relate101,307 Pa
- Pressure-Based vs Density-Based Solvers in CFD
- Pressure-Based vs Density-Based Solvers in CFD