Empirical Formula Calculator

Calculate the empirical formula from percent composition data.
Enter up to 4 elements with their mass percentages and get the simplest whole-number ratio.

Optional. Add it and the page also gives the molecular formula.
Empirical Formula

The empirical formula shows the simplest whole-number ratio of atoms in a compound. It may or may not be the same as the molecular formula.

How to determine it from percent composition:

  1. Assume 100 grams of sample → percentages become grams directly
  2. Convert grams to moles: n = mass / atomic mass
  3. Divide all mole values by the smallest one to get ratios
  4. Round to nearest whole numbers (if close to 0.5, multiply all by 2)

Example: Compound with 40.00% C, 6.71% H, 53.28% O

  • C: 40.00/12.011 = 3.3303 mol
  • H: 6.71/1.008 = 6.6567 mol
  • O: 53.28/15.999 = 3.3302 mol
  • Divide by smallest (3.3302): C:H:O = 1:2:1
  • Empirical formula: CH₂O (formaldehyde, sugars, etc.)

Those three percentages add to 99.99 rather than 100.00. That is rounding, not an error, and it is exactly what our percent composition calculator returns for glucose. Real combustion data is usually a little further off than that, which is why the calculator allows a tolerance rather than demanding exact whole numbers.

Molecular formula from empirical formula:

Molecular formula = (Empirical formula)_n

n = Molar mass / Empirical formula mass

For CH₂O (emp. mass = 30.03):

  • Glucose (M = 180.16): n = 180.16/30.03 = 6 → C₆H₁₂O₆
  • Formaldehyde (M = 30.03): n = 1 → CH₂O (empirical = molecular)
  • Acetic acid (M = 60.05): n = 2 → C₂H₄O₂

Common empirical formulas vs molecular formulas:

Empirical Molecular
CH₂O Glucose C₆H₁₂O₆
CH Benzene C₆H₆, Ethyne C₂H₂
CH₂ Ethylene C₂H₄, Cyclohexane C₆H₁₂
HO Hydrogen peroxide H₂O₂
NaCl NaCl (empirical = molecular for ionic compounds)

Where the arithmetic usually goes wrong

Two mistakes account for most wrong answers. The first is rounding too early: keep four decimal places through the mole calculation, because a ratio of 1.99 rounds cleanly to 2 while 1.9 does not, and you cannot tell which you have if you truncated at the first step.

The second is stopping at a ratio that is not yet whole. If you divide by the smallest value and land on 1.5, the answer is not “about 1.5, call it 2”. Multiply everything by 2. A ratio near 1.33 needs a factor of 3, and 1.25 needs 4. This calculator tries multipliers up to 6 automatically, but it is worth recognizing the pattern by eye, because an experimental figure of 1.4 is ambiguous between 1.33 and 1.5 and only you know how good the data was.

If no multiplier up to 6 brings every ratio within 0.08 of a whole number, the calculator says so rather than rounding quietly. Take that as a signal to look at the data: an element left out, a hydrate not accounted for, or percentages that do not sum to 100.

Why the empirical formula is often not the answer you want

Percent composition alone genuinely cannot distinguish glucose from formaldehyde. Both are 40% carbon, 6.7% hydrogen and 53.3% oxygen, and both reduce to CH₂O, because the molecular formula of glucose is exactly six of those units stacked together. Combustion analysis tells you the ratio; it does not tell you the size.

To close the gap you need one more measurement, the molar mass, from mass spectrometry or a colligative property. Divide it by the empirical formula mass and the whole number you get is how many empirical units make the real molecule.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.