This calculator finds the amount of an element in moles from its mass and molar mass. Enter the element’s mass in grams and its molar mass in grams per mole to get moles, plus the equivalent number of atoms.
Formula
Divide the element’s mass by its molar mass:
n = m / M
- n is the amount of element, in moles (mol).
- m is the mass of the element, in grams (g).
- M is the element’s molar mass, in grams per mole (g/mol).
The calculator also estimates the number of atoms using N = n × NA, where N is the atom count and the exact Avogadro constant, NA = 6.02214076 × 1023 mol−1. The first result is moles; the atom count is a secondary result.
Worked Example
The example uses the calculator’s default values: 12.0 g of carbon and a molar mass of 12.011 g/mol.
- Identify the known values: m = 12.0 g and M = 12.011 g/mol.
- Substitute them into the formula: n = 12.0 g / 12.011 g/mol.
- Calculate: n ≈ 0.99908 mol of carbon. The calculator displays this to four decimal places as 0.9991 mol.
- Convert moles to atoms: N = 0.99908 mol × 6.02214076 × 1023 mol−1 ≈ 6.0216 × 1023 atoms. Rounded to the calculator’s zero decimal places, this is about 6.0216 × 1023 atoms.
Assumptions
- The mass entered is the mass of the element itself, not the mass of a mixture or compound containing it.
- The molar mass represents the element’s standard atomic weight in g/mol. For an element with naturally occurring isotopes, this is an average value.
- The atom-count conversion uses the exact Avogadro constant. It treats the stated amount as moles of atoms, not moles of molecules.
- This is a study and lab-planning calculation, not a measurement of sample purity or composition. For bench work, follow your lab method, the safety data sheet (SDS) and your supervisor.
What You’ll Need
- The mass of the element, measured or provided in grams. If your value is in another unit, convert it to grams first.
- The element’s molar mass in g/mol. Use a reliable periodic table and keep enough digits for the precision of your mass measurement.
- A calculator, or the calculator above. The calculation is division, so a spreadsheet or a hand calculation also works.
Step-by-Step
- Confirm what the sample contains. This method directly calculates moles of an element when the mass is the mass of that element. If your sample is a compound, such as water, the compound’s mass is not the mass of each element in it. You must first use the compound’s formula and composition to determine the mass or mole amount of the particular element.
- Write down the element’s mass. Record the value and its unit. Convert it to grams before using the formula. For example, 250 mg = 0.250 g because 1 g = 1000 mg; 2.5 kg = 2500 g because 1 kg = 1000 g. Do not enter a number in milligrams while labeling it as grams.
- Find the molar mass. Look up the element’s atomic weight on a periodic table. The numerical value in atomic mass units is used as its molar mass in g/mol. For example, carbon is 12.011 g/mol, oxygen is 15.999 g/mol and sodium is 22.990 g/mol. Use the value that matches the element and retain the table’s digits until your final rounding.
- Check which kind of particles you are counting. For a sample made of atoms of an element, use its atomic molar mass. Some elements are commonly found as molecules rather than individual atoms; oxygen gas, for instance, is O2. If the question asks for moles of O2 molecules, use the molar mass of O2 (approximately 31.998 g/mol). If it asks for moles of oxygen atoms, use 15.999 g/mol. The wording changes the answer.
- Divide mass by molar mass. Calculate n = m / M. The units show why it works: g ÷ (g/mol) = mol. In the calculator, enter the mass in the first field and molar mass in the second field. The displayed amount is the number of moles.
- Round to a sensible precision. Match the precision of your least precise measured input. A mass written as 12.0 g has three significant figures, so it usually does not justify reporting many more significant figures in the final result. Keep extra digits during intermediate calculations and round only at the end.
- Use the atom count only when needed. The secondary result multiplies moles by Avogadro’s constant. It gives the number of atoms when the moles represent atoms. If your moles refer to molecules, it gives molecules instead; multiply by the number of atoms in each molecule to find the total atoms of an element within those molecules.
Common Mistakes
- Reversing the division: Moles are mass divided by molar mass, not molar mass divided by mass.
- Mixing units: A mass in mg or kg must be converted to g if the molar mass is in g/mol. For instance, 500 mg is 0.500 g, not 500 g.
- Using the wrong molar mass: The atomic molar mass applies to moles of atoms. A molecular substance such as O2 requires its molecular molar mass when counting molecules.
- Treating compound mass as elemental mass: The mass of a compound includes all of its constituent elements. Determine the element’s share using the chemical formula before applying this calculation.
- Rounding too early: Rounding the molar mass or intermediate quotient prematurely can change the final digits. Retain useful digits and round the result to match the input precision.
- Reporting atoms when the result is molecules: Avogadro’s constant converts moles of whichever particles are specified. It does not automatically convert molecular moles into moles of individual atoms.
Tips
- Write the units beside every value and cancel them algebraically. If the units do not reduce to mol, check your setup.
- For a quick estimate, compare the mass with the molar mass: a mass close to one molar mass in grams is close to one mole.
- Use a periodic table’s stated atomic weight rather than rounding it to a whole number, especially for small samples or calculations that need precision.
- State whether your answer is moles of atoms, molecules or another specified particle. This prevents confusion when using Avogadro’s constant.
Troubleshooting
The answer seems far too large or small: Check whether the mass was entered in the unit shown. A mg-to-g or kg-to-g conversion error changes the answer by a factor of 1000. Also confirm that you used the correct molar mass.
The answer does not match a textbook result: Check whether the question asks for atoms or molecules, and whether the sample is an element or a compound. For a compound, use its formula to find the amount of the target element rather than dividing the whole compound mass by an element’s molar mass.
The calculator rejects a value: Both mass and molar mass must be positive. Check for a minus sign, a misplaced decimal point or an incorrect unit conversion. A zero mass contains zero moles mathematically, but a molar mass of zero cannot be used as a divisor.
Only the last digits differ: Compare the molar-mass value and rounding rules used. Periodic tables may show different numbers of digits; small differences in the final rounded result can follow from those choices.
Frequently Asked Questions
What is the formula for calculating moles of an element?
Divide the element’s mass in grams by its molar mass in grams per mole: n = m / M.
How do I calculate moles from milligrams?
Convert milligrams to grams by dividing by 1000, then divide the gram mass by the element’s molar mass in g/mol.
Is atomic mass the same as molar mass?
Their numerical values are the same for this calculation, but their units differ: atomic mass is expressed in u per atom, while molar mass is in g/mol.
How many atoms are in one mole?
One mole contains exactly 6.02214076 × 1023 specified particles. For one mole of atoms, that means 6.02214076 × 1023 atoms.
Can I use this formula for an element in a compound?
Not directly with the compound’s total mass. First use its chemical formula and composition to determine the mass or moles of the element present.
Should I use the atomic molar mass for oxygen gas?
Use about 31.998 g/mol for moles of O2 molecules. Use 15.999 g/mol when calculating moles of oxygen atoms.
Related
Formula used
in m | Element mass | g | 12.0 | 0 in mm | Molar mass | g/mol | 12.011 | 0 out n | Amount of element | mol | m / mm | 4 out a | Number of atoms | atoms | 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