Empirical Formula Calculator

Empirical formula—
Whole-number ratio—
Moles (in input order)—

How Empirical Formula Calculator is calculated: Moles = mass / atomic mass. Divide all moles by the smallest. Multiply by the smallest whole number (up to 8) that makes every ratio a whole number within 0.12.

What is an empirical formula calculator?

An empirical formula calculator works out the simplest whole-number formula of a compound, from the mass or the percentage of each element in it. Enter up to three elements and their masses, and the tool gives you the empirical formula, the whole-number ratio, and the moles of each element. The defaults are the composition of glucose: 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen, which gives the empirical formula CH2O, a ratio of 1 : 2 : 1, and moles of 3.33 : 6.65 : 3.33.

The empirical formula is the simplest ratio of atoms in a compound, and it is the first thing a chemist works out from an analysis. It does not say how many atoms the molecule actually has: glucose is C6H12O6, and its empirical formula is CH2O, the same ratio divided by 6. A molecular formula calculator takes the next step, from the empirical formula and the molar mass to the true formula, and a molar mass calculator gives the masses the calculation needs.

This calculator is for chemistry students working through composition problems, teachers checking them, and anyone who has a percentage analysis and wants the formula it implies. It uses the standard method: convert each mass to moles, divide by the smallest, and find the smallest multiplier that makes every ratio a whole number.

Everything runs in your browser. Nothing you type is uploaded, stored, or shared, and you can use the calculator as many times as you like without signing up. The atomic masses are the standard values, and the article lists the ones it uses.

How an empirical formula calculator works

The method has three steps. First, divide each mass by the atomic mass of its element to get the moles. Carbon is 12.011, hydrogen is 1.008, and oxygen is 15.999, so 40.0 g of carbon is 3.33 moles, 6.7 g of hydrogen is 6.65 moles, and 53.3 g of oxygen is 3.33 moles. Percentages work the same way, because a percentage is the mass in 100 g of compound.

Second, divide every mole number by the smallest one. The smallest here is 3.33, so the ratios are 1.00 for carbon, 2.00 for hydrogen, and 1.00 for oxygen. The ratios are the relative numbers of atoms, and they are the heart of the answer: whatever the molecule is, it has twice as many hydrogen atoms as carbon or oxygen atoms.

Third, turn the ratios into whole numbers. If they are already whole, as they are here, the formula is written directly: CH2O, with the 1s left out by convention. If they are not whole, the tool multiplies them by 2, 3, 4, and so on up to 8, and takes the first multiplier that brings every ratio within 0.12 of a whole number. That tolerance covers the rounding in real analyses, where the percentages are rarely exact.

The results update the moment you change a number. There is no submit button and no page to reload, so you can try a different percentage and watch the formula change, or drop the third element and watch a two-element formula appear. That instant feedback is what makes the tool useful while a problem is being worked through.

The mole ratio explained

The mole ratio is the step people get wrong most often, because it is tempting to use the masses directly. Forty grams of carbon and 6.7 grams of hydrogen look nothing alike, but in moles they are 3.33 and 6.65, a ratio of 1 to 2, because a carbon atom weighs about twelve times as much as a hydrogen atom. Masses mislead, and moles tell the truth, which is why the division by atomic mass comes first and is never skipped.

Dividing by the smallest mole number is what turns the moles into a ratio. The smallest becomes 1, and the others become their size relative to it, which is the same operation as simplifying a fraction. The ratio is independent of the sample size: 40 g of carbon in 100 g of compound and 4 g in 10 g give the same ratio, which is why percentages and masses give the same answer.

The multiplier step is where judgement enters. A ratio of 1.00 to 1.50 is not a whole-number ratio, but multiplying by 2 gives 2 to 3, which is, and the formula is Fe2O3. A ratio of 1.00 to 1.33 needs a multiplier of 3, giving 3 to 4. The tool tries multipliers from 1 to 8 and takes the first that fits within 0.12, which covers the ratios that occur in real compounds without inventing precision the data does not have.

The tolerance of 0.12 is a choice, and the article states it plainly. The atomic masses used here are the standard average atomic masses, which account for isotopes: an average atomic mass calculator shows how those averages are worked out from isotope abundances. Real analyses have experimental error, so a ratio of 1.99 is really 2, and a ratio of 2.01 is really 2, and the tool treats both as 2. A ratio of 1.90 is further out, and the tool will try a bigger multiplier before settling, which is the honest behaviour when the data are rough.

A worked example

Work through the defaults by hand, so you can check the maths yourself. Glucose is 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen. The moles are 40.0 divided by 12.011, which is 3.33, 6.7 divided by 1.008, which is 6.65, and 53.3 divided by 15.999, which is 3.33. Divide by the smallest, 3.33, to get the ratios 1.00, 2.00, and 1.00, which are already whole numbers, so the empirical formula is CH2O.

The calculator gives Empirical formula: CH2O, Whole-number ratio: 1 : 2 : 1, Moles: 3.33 : 6.65 : 3.33. Check the moles: 3.33 times 12.011 is 40.0, 6.65 times 1.008 is 6.7, and 3.33 times 15.999 is 53.3, which returns the starting percentages, so the calculation closes. The molecular formula of glucose is C6H12O6, which is the empirical formula times 6, and the molar mass is what decides the 6.

Now try water. Hydrogen 11.1%, oxygen 88.9%, and no third element. The moles are 11.1 divided by 1.008, which is 11.01, and 88.9 divided by 15.999, which is 5.56. Divide by the smallest, 5.56, to get 1.98 and 1.00, which round to 2 and 1, so the formula is H2O, the ratio is 2 : 1, and the moles are 11.01 : 5.56.

Now try carbon dioxide. Carbon 27.3%, oxygen 72.7%. The moles are 27.3 divided by 12.011, which is 2.27, and 72.7 divided by 15.999, which is 4.54. Divide by 2.27 to get 1.00 and 2.00, so the formula is CO2, the ratio is 1 : 2, and the moles are 2.27 : 4.54. And rust, iron 69.9% and oxygen 30.1%, gives moles of 1.25 and 1.88, a ratio of 1 to 1.50, and a multiplier of 2, so the formula is Fe2O3, the ratio is 2 : 3, and the moles are 1.25 : 1.88.

Why the empirical formula matters

The empirical formula is the first thing an analysis gives you, and it is often the only thing. A new compound is analysed for its percentages, the percentages give the moles, the moles give the ratio, and the ratio gives the formula, all before anyone knows the molar mass or the structure. It is the starting point of identifying an unknown, and every chemist learns the method early for that reason.

The formula also predicts the composition. CH2O says the compound is one carbon, two hydrogens, and one oxygen in its simplest ratio, and any compound with that formula has 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen by mass, whether it is glucose, formaldehyde, or acetic acid. The empirical formula groups compounds by composition, and the molar mass then separates them.

The method is the same in industry and in teaching. A quality-control lab checks a product by analysing its percentages and comparing the empirical formula with the expected one, and a mismatch means contamination or a wrong product. A periodic table element lookup gives the atomic mass for any element the analysis finds, including ones this calculator does not list.

The empirical formula is also the bridge to the molecular formula. Once the product is identified, a theoretical yield calculator works out how much of it a reaction should make from the starting amounts. Once the molar mass is known, dividing it by the empirical formula mass gives the multiplier, and the molecular formula follows. Glucose has an empirical mass of 30.03 and a molar mass of 180.16, so the multiplier is 6, and the molecular formula is C6H12O6. The calculator gives the first half of that journey.

Empirical formula calculator vs molecular formula calculator

The empirical formula calculator and the molecular formula calculator answer two different questions. This one takes the composition and gives the simplest ratio. The molecular one takes the empirical formula and the molar mass and gives the true number of atoms. Glucose is CH2O by this tool and C6H12O6 by the other, and both are right: the first is the ratio, and the second is the molecule.

Use this calculator when the data are percentages or masses from an analysis. Use the molecular formula calculator when the empirical formula is known and the molar mass has been measured, usually by mass spectrometry. The output of this tool is the input of the other, and the two should be used in that order.

Neither tool is better in general; they answer different questions. A compound whose empirical formula is CH2O could be formaldehyde, acetic acid, or glucose, and only the molar mass tells them apart. The empirical formula narrows the field, and the molar mass finishes the job.

This calculator is free to use, with no account and no limit on how often you run it. That matters when you are working through a set of problems, because a real set takes several runs: a two-element compound, a three-element one, and one that needs a multiplier to reach whole numbers.

Common empirical formula mistakes

The first mistake is using the masses as the ratio. Forty grams of carbon and 6.7 grams of hydrogen are not in a 40 to 6.7 ratio of atoms, because a carbon atom weighs twelve times a hydrogen atom. Divide by the atomic mass first, always, and never skip that step.

The second mistake is forgetting to divide by the smallest. The moles are 3.33, 6.65, and 3.33, and the ratio is 1 to 2 to 1, not 3.33 to 6.65 to 3.33. The division is what turns the moles into a formula, and without it the numbers are just moles.

The third mistake is rounding too early. A ratio of 1.99 is 2, and a ratio of 1.50 needs a multiplier of 2, but a ratio rounded to 1.5 before multiplying can become 2 by mistake. Keep the decimals until the multiplier step, and let the tool do the rounding at the end.

The fourth mistake is a multiplier that is too big. A ratio of 1.00 to 1.33 needs a multiplier of 3, giving 3 to 4, and a multiplier of 6 would give 6 to 8, which is the same ratio but not the simplest formula. The tool takes the smallest multiplier that fits, which is the definition of empirical.

The fifth mistake is confusing the empirical formula with the molecular formula. CH2O is the empirical formula of glucose, and C6H12O6 is the molecular formula, and the two are different answers to different questions. The calculator gives the empirical one, and the molar mass is needed for the other.

How to use this empirical formula calculator

Enter the elements and their masses or percentages, using 100 g of compound if the data are percentages. Leave the third element as None for a two-element compound, or pick it for a three-element one. The empirical formula, the whole-number ratio, and the moles appear instantly.

Check the ratio against the moles: the smallest mole number becomes 1, and the others are its size relative to it. If the formula looks wrong, check the atomic masses and the percentages first, because a single wrong percentage changes the whole ratio.

Everything runs in your browser. Nothing you type is uploaded, stored, or shared, and you can use the calculator as many times as you like without signing up. Screenshot the results to keep them with your working.

Remember that the empirical formula is the simplest ratio, not the molecule, and that the molar mass is needed to reach the molecular formula. The calculator covers 18 elements and uses the standard atomic masses; for an element not listed, look up its atomic mass and use the same method by hand.

Frequently Asked Questions

CH2O. Glucose is 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen, which gives 3.33, 6.65, and 3.33 moles, a ratio of 1 to 2 to 1. The molecular formula is C6H12O6, which is the empirical formula times 6, and the 6 comes from the molar mass of 180.16 divided by the empirical mass of 30.03.

Treat the percentages as grams in 100 g of compound, divide each by its atomic mass to get moles, divide all the moles by the smallest, and multiply by the smallest whole number that makes every ratio a whole number. For water, 11.1% hydrogen and 88.9% oxygen give 11.01 and 5.56 moles, a ratio of 2 to 1, and the formula H2O.

The empirical formula is the simplest whole-number ratio of atoms, and the molecular formula is the actual number of atoms in one molecule. Glucose is CH2O empirically and C6H12O6 molecularly. The two are related by the molar mass: divide the molar mass by the empirical formula mass to get the multiplier, which is 6 for glucose.

Yes. The method is the same: divide each mass by its atomic mass to get moles, divide by the smallest, and find the whole-number ratio. Percentages are just masses in 100 g of compound, so the two inputs give the same answer. The calculator accepts either, as long as all the numbers are in the same unit.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.