molecalculator

Moles & Molar Mass

Moles Equation: How to Calculate Amount of Substance

Calculator No. 01-6786 · Updated · Formula and assumptions shown below

Amount of substance 1.0003 mol
Number of particles
6.024 × 1023 particles
Result, rounded to 3 decimal places
Sample mass
18.02 g
Set in the form below
Molar mass
18.015 g/mol
Set in the form below
You enter
Sample mass (g), Molar mass (g/mol)
You get
Amount of substance (mol), Number of particles (particles)
Rounding
4 dp · 3 dp

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

To calculate moles from a sample’s mass, use n = m / M: divide the mass in grams by the substance’s molar mass in grams per mole. This calculator uses those two values to return the amount of substance in moles, with particle count as a useful related result.

Formula

The standard mass-based equation is n = m / M.

  • n is amount of substance, measured in moles (mol).
  • m is the sample’s mass, measured in grams (g).
  • M is molar mass, measured in grams per mole (g/mol).

Dividing grams by grams per mole cancels the gram units and leaves moles. The calculator’s second result converts moles to an estimated count of specified particles using Avogadro’s exact constant, 6.02214076 × 1023 particles/mol. The particle type depends on what the substance represents: it may be atoms, molecules, ions, or formula units.

Worked Example

For the calculator’s default values, the sample mass is 18.02 g and the molar mass is 18.015 g/mol. These values represent a mass close to that of one mole of water.

  1. Write the equation: n = m / M.
  2. Substitute the defaults: n = 18.02 g / 18.015 g/mol.
  3. Calculate: n ≈ 1.0002775 mol, which rounds to the calculator’s four-decimal display of 1.0003 mol.
  4. For the corresponding particle count, use the unrounded amount: 1.0002775 mol × 6.02214076 × 1023 particles/mol ≈ 6.0238 × 1023 particles.

The displayed particle count is rounded to three decimal places in its coefficient. It is a calculated count, not a claim that a sample contains a fractional particle.

Assumptions

  • The sample is represented by the molar mass entered; impurities or variable composition are not accounted for.
  • The mass and molar mass use compatible units: grams and grams per mole.
  • The particle count assumes the selected chemical formula and particle type are understood; the equation itself does not identify whether particles are atoms, molecules, ions, or formula units.

Other Ways to Calculate Moles

Mass is common, but it is not the only quantity that can determine an amount in moles. Use the relationship that matches what is measured and the assumptions that apply.

  • From particle count: n = N / NA, where N is the number of particles and NA is Avogadro’s constant, 6.02214076 × 1023 mol−1.
  • From solution concentration: n = cV, where c is amount concentration in mol/L and V is solution volume in L. Convert millilitres to litres by dividing by 1000.
  • From an ideal gas: n = PV / RT, where P is absolute pressure, V is gas volume, T is absolute temperature in kelvin, and R is the gas constant. For SI units, use R = 8.31446261815324 J/(mol·K), pressure in pascals, and volume in cubic metres.
  • From a balanced reaction: use the balanced equation’s mole ratios to relate the amount of one reactant or product to another. Balance the equation first; coefficients represent relative mole amounts.

These equations do not all use the same inputs or assumptions. For example, the gas equation describes an ideal-gas model; real gases can deviate, particularly at high pressures or low temperatures. For solution calculations, volume must be the solution’s final volume, not simply the volume of solvent added.

Choosing a Molar Mass and Using the Result

Molar mass is the mass of one mole of a specified chemical substance. For a pure compound, calculate it by adding the atomic masses of every atom in its formula. Water, H2O, has a conventional molar mass of about 18.015 g/mol: two hydrogen atoms contribute about 2 × 1.008 g/mol, and one oxygen atom contributes about 15.999 g/mol. The calculator uses 18.015 g/mol as its default.

For a compound with parentheses or multiple elements, multiply each element’s atomic mass by its total count in the formula before adding. For example, a formula containing a group in parentheses requires multiplying each atom inside that group by the number outside the parentheses. Use a reliable reference or the specified chemical form when greater precision matters; salts, hydrates, and different isotopic compositions can have different molar masses.

The result is an amount of substance, not a volume or a direct measure of concentration. To find the amount in a solution from its molarity, multiply mol/L by the solution volume in litres. To find how much mass corresponds to a chosen amount, rearrange the mass equation to m = nM.

Common Errors and Limits

  • Reversing the division: moles are mass divided by molar mass, not molar mass divided by mass.
  • Mixing units: a mass in milligrams must be converted to grams before using a molar mass in g/mol; 1000 mg = 1 g.
  • Using the wrong formula or chemical form: a hydrate, salt, or molecular compound may have a different molar mass from the unhydrated compound or its free form.
  • Rounding too early: keep extra digits through intermediate calculations, then round the final value to match the precision of the measurements.
  • Confusing moles with particles: one mole means 6.02214076 × 1023 specified entities, not necessarily molecules. Ionic solids are commonly counted in formula units.

The calculation assumes the entered mass belongs to the substance represented by the entered molar mass. It does not correct for moisture, contaminants, incomplete reactions, or measurement uncertainty. If purity is known and the goal is the amount of the pure component, account for that separately using a justified purity value.

Frequently Asked Questions

What is the equation to get moles from grams?
Divide mass in grams by molar mass in grams per mole: n = m / M. The answer is in moles.

How do I find molar mass?
Add the atomic masses of all atoms in the chemical formula, counting repeated atoms and groups. The result is expressed in g/mol.

Can I calculate moles without mass?
Yes. Depending on the data, use particle count divided by Avogadro’s constant, concentration multiplied by solution volume, or the ideal-gas equation.

How many particles are in one mole?
One mole contains exactly 6.02214076 × 1023 specified entities. The entities could be atoms, molecules, ions, or formula units.

Why do I need to convert millilitres to litres?
Molarity is expressed in moles per litre. In the equation n = cV, a volume in millilitres must be divided by 1000 to give litres before multiplying by mol/L.

Related

Formula used
in m | Sample mass | g | 18.02 | 0
in mm | Molar mass | g/mol | 18.015 | 0.001
out n | Amount of substance | mol | m / mm | 4
out p | Number of particles | particles | n * 6.02214076e23 | 3

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

The whole Moles & Molar Mass section →