Boneyard Tools

Empirical formula versus molecular formula

What separates the simplest ratio from the true molecular formula, and how to get from one to the other using the compound's molar mass.

Two formulas, two questions

The empirical formula answers what ratio the atoms come in, while the molecular formula answers how many atoms are actually in one molecule. Glucose is the classic example: its empirical formula is CH2O, a one to two to one ratio, but a real glucose molecule is C6H12O6, exactly six times larger. Both are correct, they just describe the compound at different levels of detail. This calculator finds the empirical formula, the reduced ratio, from mass or percent data alone.

The classic step by step method

The procedure this tool automates is the one taught in every introductory chemistry course. First, assume a 100 gram sample so percentages become grams. Second, divide each mass by that element's atomic mass to convert to moles. Third, divide every mole count by the smallest of them, which sets the least abundant element to one. Fourth, if the ratios are not already whole, multiply them all by the smallest integer that clears the fractions. The result is the empirical formula, and the tool prints the moles and the final subscript for each element so you can follow along.

Getting to the molecular formula

To promote an empirical formula to a molecular formula you need one more piece of data: the compound's molar mass, usually from an experiment like mass spectrometry or freezing point depression. Add up the atomic masses in the empirical unit to get its formula mass, then divide the measured molar mass by that number. The whole number you get is the multiple. For CH2O the empirical mass is about 30 g/mol, and glucose at roughly 180 g/mol divides to 6, giving C6H12O6. This tool stops at the empirical step, so pair it with a molar mass calculator to finish.

Where rounding can trip you up

Empirical formula problems live and die by clean arithmetic. Real lab percentages carry measurement error, so a ratio that should be 2 might compute as 1.98 or 2.03. The calculator treats any scaled value within 0.12 of an integer as that integer, which forgives normal textbook rounding while still telling 1.5 apart from 1 or 2. If your data is noisy the multiplier search up to six may pick an unintended factor, so enter percentages to at least one decimal place and make sure they sum close to 100 for the most reliable result.

Frequently asked questions

Do empirical and molecular formulas ever match?

Yes. When the ratio cannot be reduced further and the molecule contains exactly that many atoms, the two are the same. Water H2O, ammonia NH3 and carbon dioxide CO2 all have identical empirical and molecular formulas.

Why assume a 100 gram sample for percentages?

It is a convenience. Because the formula depends only on ratios, any sample size gives the same answer, and picking 100 grams makes each percent equal a mass in grams so the mole conversion is direct.

What if my percentages do not add to 100?

The tool still computes a ratio from whatever you enter, but a large gap usually signals a missing element or a typo. For an accurate formula make sure every element is included and the percentages total close to 100.