School · Chemistry · Intermediate

Empirical formula calculator

Enter each element with its percentage or its mass. This works through all five steps to the simplest whole-number ratio, and finds the molecular formula too if you give it the molar mass.

Give this and you also get the molecular formula, which is the real formula rather than just the ratio.

Empirical versus molecular formula

The empirical formula is the simplest whole-number ratio of atoms. The molecular formula is how many atoms are actually in one molecule. They are often different.

Glucose is the standard example. Its molecular formula is C6H12O6, but the ratio 6:12:6 simplifies to 1:2:1, so its empirical formula is CH2O. Analysing glucose in a lab gives you CH2O, and you need one extra piece of information, the molar mass, to work back up to the real formula.

Why you divide by the smallest: you are looking for a ratio, and dividing every number by the smallest one guarantees the smallest value becomes exactly 1. Everything else then sits in proportion to it, which is what makes the ratio readable.

The step that trips people up

After dividing by the smallest, you sometimes get numbers that are not whole, like 1 : 1.5 or 1 : 1.33. Do not round these. A value of 1.5 means the real ratio is 2 : 3, and rounding to 2 would give you the wrong compound entirely.

Instead, multiply every number by whatever turns them all into whole numbers. For 1.5, multiply by 2. For 1.33, which is a third, multiply by 3. For 1.25, a quarter, multiply by 4. This calculator does that automatically and tells you what factor it used.

Genuinely small errors are different. If you get 1.98, that is experimental rounding and the answer is 2. The rule of thumb is that anything within about 0.1 of a whole number can be rounded, and anything further away is a real fraction.

Common questions

My percentages do not add up to exactly 100. Is that a problem?
Not usually. Real experimental data rarely totals exactly 100 because of measurement error and rounding. Anything close is fine. If you are a long way off, check whether an element has been left out of the question, often oxygen, which you find by subtracting everything else from 100.
Can I use masses instead of percentages?
Yes, and the method is identical. Percentages are just masses out of 100, so you can skip straight to dividing by atomic masses. Switch the mode above.
Why did I get the same empirical and molecular formula?
Because the molar mass turned out to be exactly one empirical unit, so the multiplier is 1. Water is like this: H2O is both its empirical and molecular formula, since 2:1 is already the simplest ratio.
Does this tell me the structure of the compound?
No. Both formulas only count atoms, not how they are joined. Different compounds can share a molecular formula and behave completely differently, which is what isomers are.