Empirical Formula Calculator

Convert mass percent or grams of each element into the simplest whole-number ratio, then scale it to the molecular formula using the compound's molar mass.

🧪 Empirical Formula Calculator

Enter each element and its mass percent (a 100 g sample is assumed).

Mass %
Mass %
Mass %
Mass %
g/mol
Empirical formula
Molecular formula
Empirical formula mass
Mole ratio
Step-by-step working

🧪 What is an Empirical Formula?

An empirical formula is the simplest whole-number ratio of the atoms of each element in a compound. For example, hydrogen peroxide has the molecular formula H₂O₂, but its empirical formula is HO, because the ratio of hydrogen to oxygen atoms is 1:1. The empirical formula captures composition, the proportion of each element, without stating the actual number of atoms present in a single molecule.

Empirical formulas come directly from experimental data. When a chemist burns an unknown organic compound in a combustion analyser, the instrument reports the mass or mass percent of carbon, hydrogen, oxygen, and other elements. Turning that raw composition into a formula is the first step in identifying the substance. The same process is used in mineralogy, pharmaceutical analysis, and quality control, wherever a material must be characterised from its elemental makeup.

A frequent point of confusion is the difference between the empirical and molecular formula. The molecular formula gives the true count of atoms in one molecule, and it is always the empirical formula multiplied by a whole number n. Glucose (C₆H₁₂O₆) and formaldehyde (CH₂O) share the empirical formula CH₂O, so composition alone cannot distinguish them. To find the molecular formula you also need the compound's molar mass, which fixes the multiplier n.

This calculator handles both steps. Enter the mass percent or the measured grams of each element and it computes moles, divides by the smallest value, and clears any fractions to give the empirical formula and its formula mass. Provide the molar mass and it also returns the molecular formula, with every calculation shown so the method is clear.

📐 Formula

ni  =  mi ÷ Mi  →  divide by smallest → clear fractions
ni = moles of element i
mi = mass of element i (grams, or percent as grams per 100 g)
Mi = atomic weight of element i (g/mol)
Ratio: divide every ni by the smallest n
Molecular: n = molar mass ÷ empirical mass, then multiply subscripts by n
Example: 40% C, 6.7% H, 53.3% O → 1 : 2 : 1 → CH₂O.

📖 How to Use This Calculator

Steps

1
Choose the input type. Pick Mass Percent for a percent composition, or Mass in Grams if you measured actual masses.
2
Enter each element and amount. Type a symbol (C, H, O, Na, Fe) and its value in each row. Add the molar mass to also get the molecular formula.
3
Read the formula. Click Calculate to see the empirical formula, its formula mass, the mole ratio, and the molecular formula with full working.

💡 Example Calculations

Example 1 — Glucose from Percent Composition

40.0% C, 6.7% H, 53.3% O, molar mass 180.16 g/mol

1
Moles: C = 40.0 ÷ 12.011 = 3.330, H = 6.7 ÷ 1.008 = 6.647, O = 53.3 ÷ 15.999 = 3.331
2
Divide by smallest (3.330): C = 1, H = 2, O = 1 → empirical formula CH₂O (mass 30.026 g/mol)
3
n = 180.16 ÷ 30.026 ≈ 6, so molecular formula = C₆H₁₂O₆
Empirical = CH₂O, molecular = C₆H₁₂O₆ (glucose)
Try this example →

Example 2 — Ethane from Measured Masses

1.20 g C and 0.30 g H, molar mass 30.07 g/mol

1
Moles: C = 1.20 ÷ 12.011 = 0.0999, H = 0.30 ÷ 1.008 = 0.2976
2
Divide by smallest (0.0999): C = 1, H = 2.98 → round to CH₃ (mass 15.035 g/mol)
3
n = 30.07 ÷ 15.035 ≈ 2, so molecular formula = C₂H₆
Empirical = CH₃, molecular = C₂H₆ (ethane)
Try this example →

Example 3 — Ethanol from Percent Composition

52.2% C, 13.0% H, 34.8% O, molar mass 46.07 g/mol

1
Moles: C = 52.2 ÷ 12.011 = 4.346, H = 13.0 ÷ 1.008 = 12.897, O = 34.8 ÷ 15.999 = 2.175
2
Divide by smallest (2.175): C = 2, H = 6, O = 1 → empirical formula C₂H₆O (mass 46.069 g/mol)
3
n = 46.07 ÷ 46.069 ≈ 1, so the molecular formula equals the empirical formula
Empirical = C₂H₆O, molecular = C₂H₆O (ethanol)
Try this example →

❓ Frequently Asked Questions

What is an empirical formula?+
An empirical formula is the simplest whole-number ratio of atoms in a compound. For glucose it is CH₂O, meaning carbon, hydrogen, and oxygen appear in a 1:2:1 ratio. It shows composition, not the actual atom count in a molecule, which is why several different compounds can share the same empirical formula.
How do you find the empirical formula from percent composition?+
Assume a 100 g sample so each percent becomes grams. Divide each element's mass by its atomic weight to get moles, then divide every mole value by the smallest to get a ratio. If the ratios are not whole numbers, multiply them all by a small integer until they are. Those whole numbers are the formula subscripts.
What is the difference between empirical and molecular formula?+
The empirical formula is the simplest atom ratio (CH₂O for glucose). The molecular formula gives the actual atom counts in one molecule (C₆H₁₂O₆). The molecular formula is always a whole-number multiple of the empirical formula: molecular = empirical × n, where n = molar mass ÷ empirical formula mass.
How do you find the molecular formula from the empirical formula?+
Add the atomic weights in the empirical formula to get its formula mass. Divide the compound's known molar mass by that mass and round to the nearest whole number to get n. Multiply every subscript by n. For glucose, 180 ÷ 30 = 6, so CH₂O becomes C₆H₁₂O₆.
Why do you divide by the smallest number of moles?+
Dividing every mole value by the smallest forces the least-abundant element to a ratio of exactly 1 and scales the others relative to it, giving the simplest ratios directly. It is a normalisation step: the absolute amounts do not matter for a formula, only the proportions between the elements.
What if the ratios are not whole numbers?+
Clear the fraction by multiplying all ratios by the same small integer. A ratio ending in .5 means multiply by 2; .33 or .67 means multiply by 3; .25 or .75 means multiply by 4. For example, 1 : 1.5 becomes 2 : 3 after multiplying by 2. The calculator applies this step automatically.
Can two compounds have the same empirical formula?+
Yes. Formaldehyde (CH₂O), acetic acid (C₂H₄O₂), and glucose (C₆H₁₂O₆) all share the empirical formula CH₂O because their atom ratios are 1:2:1. This is why the molar mass is needed to tell them apart: it fixes the multiplier n and therefore the true molecular formula.
What atomic weights does this calculator use?+
It uses IUPAC 2021 standard atomic weights, such as carbon 12.011, hydrogen 1.008, and oxygen 15.999. These match the conventional values on the periodic table and in chemistry courses, so the mole calculations agree with textbook results to three decimal places.
How accurate does the percent composition need to be?+
Minor rounding is fine because the method seeks the nearest whole-number ratio, which tolerates small error. The percentages should sum to roughly 100%. If they are far off, recheck the data. Experimental combustion analysis is normally accurate enough to identify the correct empirical formula.
Which elements can this calculator handle?+
It covers the common elements found in most compounds, including C, H, O, N, S, P, and the halogens, plus metals such as Na, Mg, Al, K, Ca, Fe, Cu, and Zn. Enter each symbol using standard capitalisation (Fe, not FE or fe). If a symbol is not recognised, the calculator flags it so you can correct the entry.

What is an empirical formula?

An empirical formula is the simplest whole-number ratio of the atoms in a compound. For example, the empirical formula of glucose is CH₂O, meaning carbon, hydrogen, and oxygen appear in a 1:2:1 ratio. It does not tell you the actual number of atoms in a molecule, only their proportions, which is why several compounds can share one empirical formula.

How do you find the empirical formula from percent composition?

Assume a 100 g sample so each percent becomes grams. Divide each element's mass by its atomic weight to get moles. Divide every mole value by the smallest one to get a ratio. If the ratios are not whole numbers, multiply them all by a small integer until they are. The resulting whole numbers are the subscripts of the empirical formula.

What is the difference between empirical and molecular formula?

The empirical formula is the simplest atom ratio (CH₂O for glucose). The molecular formula gives the actual atom counts in one molecule (C₆H₁₂O₆ for glucose). The molecular formula is always a whole-number multiple of the empirical formula: molecular = empirical × n, where n = molar mass ÷ empirical formula mass.

How do you find the molecular formula from the empirical formula?

Calculate the empirical formula mass by adding the atomic weights of the atoms in it. Then divide the compound's known molar mass by that empirical mass and round to the nearest whole number to get n. Multiply every subscript in the empirical formula by n. For glucose, 180 ÷ 30 = 6, so CH₂O becomes C₆H₁₂O₆.

Why do you divide by the smallest number of moles?

Dividing every mole value by the smallest one forces the least-abundant element to a ratio of exactly 1 and scales the others relative to it. This produces the simplest set of ratios directly. It is a normalisation step: the absolute amounts do not matter for a formula, only the proportions between the elements.

What if the ratios are not whole numbers?

Ratios near a simple fraction should be cleared by multiplying all of them by the same small integer. A ratio ending in .5 means multiply by 2; .33 or .67 means multiply by 3; .25 or .75 means multiply by 4. For example 1 : 1.5 becomes 2 : 3 after multiplying by 2. The calculator does this automatically.

Can two compounds have the same empirical formula?

Yes. Formaldehyde (CH₂O), acetic acid (C₂H₄O₂), and glucose (C₆H₁₂O₆) all share the empirical formula CH₂O because their atom ratios are identical at 1:2:1. This is exactly why the molar mass is needed to distinguish them: it fixes the multiplier n and therefore the true molecular formula.

What atomic weights does this calculator use?

It uses IUPAC 2021 standard atomic weights, such as carbon 12.011, hydrogen 1.008, and oxygen 15.999. These are the same conventional values printed on the periodic table and used in chemistry courses, so the mole calculations match textbook results to three decimal places.

How accurate does the percent composition need to be?

Small rounding in the percentages is fine because the method looks for the nearest whole-number ratio, which is tolerant of minor error. The percentages should sum to roughly 100%. If they are far off, recheck the data. Experimental combustion analysis typically gives values accurate enough to identify the correct empirical formula.