Empirical Formula Calculator

Enter the mass percent of each element.

Science 35 elements Auto-integerize Empirical mass
Rate this calculator · 4.5 (2)

Empirical formula calculator

Mass percent → subscripts

Instructions — Empirical Formula Calculator

Add a row for each element in your compound. Enter its mass percent (or grams — the math is identical because we assume a 100 g sample). The calculator does four things:

  1. Converts each mass percent to moles using the atomic mass from the periodic table.
  2. Divides every mole value by the smallest one in the row, giving raw ratios.
  3. Multiplies by 1, 2, 3, 4, 5, or 6 to land on integer subscripts (tolerance 0.06).
  4. Reduces the integer subscripts by their greatest common divisor.

The result panel shows the empirical formula, empirical molar mass, and the full table of intermediate calculations. Use the preset buttons to try glucose (CH2O empirical) or aspirin (C9H8O4) instantly.

Formulas

Step 1: moles = mass percent ÷ atomic mass

Step 2: ratio = moles ÷ min(moles)

Step 3: subscript = round(ratio × n) where n is the smallest integer that makes every ratio close to an integer

Molecular formula (optional next step): if you know the molecular mass Mmol, divide it by the empirical mass Memp to get the multiplier:

molecular formula = (Mmol / Memp) × empirical formula

For glucose, Mmol = 180.16 g/mol and the empirical mass of CH2O is 30.03 g/mol, so the multiplier is 6 and the molecular formula is C6H12O6.

Reference

  • Glucose — 40.0% C, 6.71% H, 53.29% O → CH2O (empirical mass 30.03 g/mol)
  • Benzene — 92.26% C, 7.74% H → CH (empirical mass 13.02 g/mol; molecular mass 78.11 means ×6 = C6H6)
  • Hydrogen peroxide — 5.93% H, 94.07% O → HO (empirical mass 17.01; molecular mass 34.01 means ×2 = H2O2)
  • Ascorbic acid — 40.92% C, 4.58% H, 54.50% O → C3H4O3

Article — Empirical Formula Calculator

How the empirical formula calculator works

An empirical formula gives the smallest whole-number ratio of atoms in a compound. Glucose (C6H12O6) reduces to CH2O. The calculator above converts mass percent composition into the empirical formula by dividing each percent by atomic mass, normalizing to the smallest ratio, multiplying up to whole numbers, then reducing by greatest common divisor.

The technique dates to the early 1800s and remains the standard way to characterize an unknown organic compound from its combustion analysis or elemental percentage data.

What an empirical formula is

The empirical formula is the simplest integer ratio of elements. It tells you the relative proportions but not the actual molecular size. CH2O could be formaldehyde (CH2O), acetic acid (C2H4O2), or glucose (C6H12O6) — all three have the same empirical formula because they share the same C:H:O ratio of 1:2:1.

Empirical formulas always use whole-number subscripts. Fractional subscripts are not allowed by definition — if you get 1.5 in your ratio, multiply through by 2 to get integers.

Empirical formula vs molecular formula

The molecular formula is the actual atom count in one molecule. To go from empirical to molecular you need an extra piece of information: the molecular molar mass, usually from mass spectrometry, freezing point depression, or vapor density.

Empirical to molecular
n = Mmol / Memp multiplier
Molecular = n × Empirical
Glucose 180.16 / 30.03 = 6 → C6H12O6
Benzene 78.11 / 13.02 = 6 → C6H6

Some compounds have identical empirical and molecular formulas. Water is H2O for both because the ratio 2:1 is already in lowest terms. Methane is CH4. Most simple inorganic salts — NaCl, CaCO3, MgO — do too.

The four steps from mass percent to empirical formula

The algorithm is mechanical:

  • Step 1 — Assume a 100 g sample. Each mass percent becomes grams directly. 40% C in a 100 g sample is 40 g of carbon.
  • Step 2 — Divide by atomic mass. 40 g / 12.011 g/mol = 3.33 mol of C.
  • Step 3 — Divide every mole count by the smallest one. If the smallest is 3.33 mol, dividing by it gives unitless ratios.
  • Step 4 — Multiply up to whole numbers (typical factors are 2, 3, 4, 5, 6) and then reduce by the greatest common divisor.

The calculator tries multipliers from 1 to 6 with a tolerance of 0.06 (so 1.94 rounds to 2, but 1.5 forces multiplier 2). After that it divides by the GCD of all subscripts to make sure the formula is in lowest terms.

Did you know

Joseph Proust's law of definite proportions, published in 1799, says compounds always combine elements in fixed mass ratios. Empirical formula determination grew directly out of that observation and gave John Dalton the foundation for his atomic theory eight years later.

Worked empirical formula examples

Glucose — 40.0% C, 6.71% H, 53.29% O. In 100 g: 40 / 12.011 = 3.33 mol C, 6.71 / 1.008 = 6.66 mol H, 53.29 / 15.999 = 3.33 mol O. Divide by 3.33 to get 1: 2: 1, already whole. Empirical formula: CH2O, empirical mass 30.03 g/mol.

Hydrogen peroxide — 5.93% H, 94.07% O. Moles: 5.93 / 1.008 = 5.88 mol H, 94.07 / 15.999 = 5.88 mol O. Ratio 1: 1. Empirical formula: HO. The molecular formula H2O2 doubles it because measured molar mass is 34.01 g/mol.

Aspirin — 60.00% C, 4.48% H, 35.52% O. Moles: 60 / 12.011 = 5.00 mol C, 4.48 / 1.008 = 4.44 mol H, 35.52 / 15.999 = 2.22 mol O. Divide by 2.22 to get 2.25: 2.00: 1.00. Multiply by 4 (smallest factor that works) to get 9: 8: 4. Empirical formula: C9H8O4.

Handling non-integer mole ratios

Sometimes the smallest mole ratio is not 1. Common patterns:

  • 1.50 — multiply by 2 (becomes 2:3)
  • 1.33 or 2.67 — multiply by 3 (becomes 4:3 or 8:3)
  • 1.25 or 2.25 — multiply by 4 (becomes 5:4 or 9:4)
  • 1.20 or 1.40 — multiply by 5

If a number is close to a whole number but off by less than about 0.06, round it. Experimental percent compositions rarely come in better than ±0.1% accuracy, so 2.98 should round to 3 without hesitation.

Hydrates need extra care

If your sample is a hydrated salt like CuSO4 · 5 H2O, the percentage analysis will include hydrogen and additional oxygen from the water. The calculator will give you a hydrate formula, not the anhydrous salt. Dry the sample first or subtract the water mass before entering percentages.

Empirical formula from combustion analysis

For organic compounds the percent composition usually comes from combustion analysis. You burn a known mass of sample in excess oxygen and weigh the CO2 and H2O produced. From the masses:

mass of C = mass of CO2 × (12.011 / 44.010), and mass of H = mass of H2O × (2 × 1.008 / 18.015). Mass of oxygen (and nitrogen, sulfur etc.) is found by difference.

Plug those masses (or the equivalent percentages) into the calculator and the empirical formula falls out.

Tip

For homework-grade accuracy, the sum of all your mass percentages should land within 0.5% of 100. Larger deviations usually mean you forgot an element — commonly oxygen in organic compounds, which is rarely measured directly and shows up as the missing remainder.

Common empirical formula mistakes

  • Wrong atomic mass — using H = 1 instead of 1.008 introduces a 0.8% error that can throw off marginal ratios.
  • Stopping at fractional ratios — 1: 1.5: 1 is not a final answer; multiply by 2.
  • Forgetting the GCD step — subscripts 2:4:2 should reduce to 1:2:1.
  • Mixing percent and gram counts — if you start with grams, make sure the implicit 100 g assumption is consistent.
  • Ignoring oxygen — in organic analysis oxygen is usually found by difference, not directly measured.

If you get an empirical formula that does not match a known compound, two things to check: did you miss an element, and did you handle hydration water correctly? Standard atomic mass tables sometimes omit minor elements like sulfur or phosphorus from analytical reports because the analysis was specific to C, H, and N. Add them in if you have evidence (smell, color, separate analyses) before declaring victory.

Finally, an empirical formula does not specify connectivity or isomerism. C2H6O fits both ethanol (CH3CH2OH) and dimethyl ether (CH3OCH3); the empirical formula CH3O fits glycolaldehyde, methoxy radicals, and many others. To pin down the actual structure you need spectroscopy — NMR, IR, or mass spec fragmentation patterns — on top of the elemental ratios.

FAQ

Because mass percent values then become grams directly: 40% C in a 100 g sample is 40 g of carbon. This shortcut is universal and works for any compound. The empirical formula is a ratio, so the absolute sample size never matters.
The tool rescales them automatically and shows a warning. Small deviations (under 1%) usually come from rounding in published percentages. Large deviations probably mean a missing element - check that you have entered every element in the compound.
Sometimes the smallest mole ratio is 1.50 (so we want 2:3) or 1.33 (so we want 3:4). The calculator tries each multiplier from 1 to 6 and picks the smallest one that lands every ratio within 0.06 of a whole number. After that, common factors are divided out by GCD.
No. Many compounds have identical empirical and molecular formulas - water is H2O for both, methane is CH4 for both. A formula like CH2O is special because three different real compounds (formaldehyde, acetic acid, glucose) reduce to it.
The calculator uses standard atomic weights from IUPAC 2021 (or close), rounded to 3-4 decimals. That is more than enough precision for any teaching-level problem. For ultra-precise mass spectrometry work you would use isotopic masses instead.
Yes. Because the math just divides by atomic mass and normalizes, you can enter grams, moles, or any consistent quantity. The output ratio will be the same. The "mass percent" label is just the most common textbook framing.
Round to 1. The default tolerance of 0.06 absorbs small experimental error. If your raw ratio is 1.04 the algorithm treats the subscript as 1; if it were 1.10 the algorithm would try multiplier 10 and likely fail, signaling that your input percentages contain more error than the empirical-formula method can recover.
Empirical formulas are usually computed for the anhydrous compound. If your percentages include water of crystallization (a salt like CuSO4. 5 H2O), the calculator will compute the formula including hydrogen and extra oxygen. To get the bare salt, run the analysis after drying or subtract the water mass before entering percentages.