How to Calculate Formula Units
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This guide explains how to calculate the number of formula units in a given mass of an ionic compound. You enter the mass and the compound’s molar mass, and you get the count of formula units (the ionic equivalent of molecules). This is essential for stoichiometry, preparing solutions, and understanding the scale of chemical quantities.
Formula
The number of formula units (N) is calculated using Avogadro’s constant (6.022 × 10²³ formula units per mole):
N = (m / M) × 6.022 × 10²³
- m = mass of the ionic compound (in grams, g)
- M = molar mass of the compound (in grams per mole, g/mol)
- N = number of formula units (dimensionless, a pure count)
The first step, m / M, gives the amount in moles. Multiplying by Avogadro’s constant converts moles to individual formula units.
Worked Example
Using the calculator defaults: mass = 58.44 g, molar mass = 58.44 g/mol (this is the molar mass of sodium chloride, NaCl).
- Calculate moles: 58.44 g ÷ 58.44 g/mol = 1.0000 mol
- Multiply by Avogadro’s constant: 1.0000 mol × 6.022 × 10²³ = 6.022 × 10²³ formula units
The calculator rounds to 0 decimal places, so it shows 6.022 × 10²³, which matches. If you had 29.22 g of NaCl, you would get 3.011 × 10²³ formula units (half a mole).
When to Use This Calculation
Use this whenever you need to convert a weighed mass of an ionic compound into a count of its fundamental units. This is common in:
- Stoichiometry problems involving ionic compounds (e.g., predicting product masses)
- Preparing solutions where you need a specific number of formula units (rare in practice, but used in teaching)
- Understanding the scale of chemical reactions at the atomic level
The result tells you how many formula units are present. For example, 58.44 g of NaCl contains 6.022 × 10²³ formula units, each consisting of one Na� and one Cl� ion. This number is the same as the number of molecules in one mole of a covalent compound, but the term “formula unit” is used because ionic compounds do not exist as discrete molecules.
Common Mistakes
- Using molecular mass instead of formula mass: For ionic compounds, the molar mass is the sum of the atomic masses of all atoms in the empirical formula. For NaCl, that’s 22.99 + 35.45 = 58.44 g/mol. Do not double-count or use the wrong formula.
- Forgetting to convert mass to grams: If your mass is in kilograms or milligrams, convert to grams first. The molar mass is in g/mol, so mass must be in grams.
- Rounding Avogadro’s constant too early: Use 6.022 × 10²³ or more precise values (6.02214076 × 10²³) in intermediate steps. Rounding to 6.02 × 10²³ can change your final answer by 0.3%.
- Confusing moles with formula units: Moles are a unit of amount, while formula units are a count. The calculator’s first output is the count, not the moles.
Tips
- Always write the units in each step. If the units do not cancel to give a count, you have made an error.
- Use the periodic table to find atomic masses to at least two decimal places for accuracy.
- For hydrated compounds (e.g., CuSO₄·5H₂O), include the mass of the water molecules in the molar mass.
- If you are working with a covalent compound, the term “molecule” is used instead of “formula unit”, but the calculation is identical.
Troubleshooting
Your result seems too large or too small: Check that the mass is in grams and the molar mass is correct. A common issue is using the molar mass of a single atom instead of the whole compound. For example, for CaCl₂, the molar mass is 40.08 + 2(35.45) = 110.98 g/mol, not 75.53 g/mol.
You get a decimal number of formula units: That is fine—formula units can be fractional in calculations because you are dealing with averages over a huge number. The calculator rounds to a whole number, but the unrounded value is valid.
You do not know the molar mass: Look up the atomic masses from a periodic table and sum them. For a compound like (NH₄)₂SO₄, count each atom: 2 N, 8 H, 1 S, 4 O.
The calculator shows an error: Make sure the molar mass is not zero. If you enter 0 for molar mass, the division fails. Use a realistic positive value.
Frequently Asked Questions
What is a formula unit?
A formula unit is the smallest whole-number ratio of ions in an ionic compound. For NaCl, one formula unit is one Na� and one Cl�. It is the ionic equivalent of a molecule.
Is a formula unit the same as a molecule?
No. Molecules are discrete groups of covalently bonded atoms. Ionic compounds form a lattice, so the “formula unit” represents the ratio of ions, not a discrete particle.
Why do we use Avogadro’s number?
Avogadro’s number (6.022 × 10²³) is the number of particles in one mole of any substance. It allows conversion between macroscopic mass and microscopic count.
Can I calculate formula units from moles directly?
Yes. Multiply the number of moles by Avogadro’s constant. The calculator does this automatically, but you can do it manually: moles × 6.022 × 10²³.
What if my compound is covalent?
For covalent compounds, use the same calculation but call the result “molecules” instead of “formula units”. The math is identical.
Does the calculation work for elements?
Yes, for elements that exist as individual atoms (e.g., helium) or molecules (e.g., O₂). Use the molar mass of the entity you are counting. For O₂, the molar mass is 32.00 g/mol, not 16.00.
Related
Formula used
in m | Mass of compound | g | 58.44 | 0 in M | Molar mass of compound | g/mol | 58.44 | 0.01 out n | Number of formula units | - | (m / M) * 6.022e23 | 0 out mol | Amount in moles | mol | m / M | 4
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, rounded as each result states. See how the calculators work or report an error.