Skip to content
K Knidox Search…
Chemistry · Composition

Empirical Formula Calculator

Find the simplest whole-number atom ratio from percentages or masses.

One pair per line or comma-separated, e.g. C 40.0, H 6.7, O 53.3
Empirical formula
CH2O

Smallest whole-number ratio of atoms.

ElementMass %Moles÷ smallestWhole
C403.330311
H6.76.64681.9962
O53.33.331511

To find an empirical formula, convert each element’s mass or percentage to moles (mass ÷ atomic mass), divide every value by the smallest, then scale to whole numbers. A compound of 40.0% C, 6.7% H, 53.3% O gives 3.33 : 6.65 : 3.33 → 1 : 2 : 1 → CH₂O.

From composition to formula

The empirical formula is the simplest whole-number ratio of atoms in a compound. The method is always the same: convert each element’s percentage or mass to moles, divide every value by the smallest, and scale to whole numbers.

moles of each element = mass (or %) ÷ atomic mass

then divide every mole value by the smallest to get the ratio

Worked example

A compound is 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen by mass. Find its empirical formula.

  1. 1
    Treat percentages as grams. Assume a 100 g sample: 40.0 g C, 6.7 g H, 53.3 g O.
  2. 2
    Convert each to moles. C: 40.0 ÷ 12.011 = 3.33. H: 6.7 ÷ 1.008 = 6.65. O: 53.3 ÷ 15.999 = 3.33.
  3. 3
    Divide by the smallest. 3.33 ÷ 3.33 = 1 (C), 6.65 ÷ 3.33 ≈ 2 (H), 3.33 ÷ 3.33 = 1 (O) → CH₂O.

Empirical vs molecular formulas

The molecular formula is a whole-number multiple of the empirical formula.

CompoundEmpiricalMolecular
GlucoseCH₂OC₆H₁₂O₆
BenzeneCHC₆H₆
Hydrogen peroxideHOH₂O₂
Acetic acidCH₂OC₂H₄O₂
WaterH₂OH₂O

From empirical to molecular

You need the molar mass too. The empirical formula gives only the ratio. To get the molecular formula, divide the known molecular mass by the empirical formula mass, then multiply every subscript by that whole number.

For CH₂O, the empirical mass is 12.011 + 2×1.008 + 15.999 = 30.026 g/mol. Glucose has a molar mass of 180.16 g/mol, so 180.16 ÷ 30.026 ≈ 6, giving C₆H₁₂O₆.

Common mistakes. Rounding moles too aggressively, ignoring ratios near 2.5 or 1.33 that need a ×2 or ×3 scale-up, and forgetting that a ratio close to a whole number (like 1.96) really is that integer.

Percent or grams — does it matter?
No. Percentages are treated as grams in a 100 g sample, which gives the same ratio.
What if a ratio is 2.5?
Multiply every ratio by a small integer (here 2) until all are whole. This tool does that automatically.
How do I get the molecular formula?
Find the empirical formula mass, divide the known molecular mass by it, and multiply each subscript by that factor.
Why divide by the smallest mole value?
It sets the least-abundant element to 1, so every other element’s ratio is expressed relative to it — the simplest starting point for whole numbers.
Can two compounds share an empirical formula?
Yes. Formaldehyde (CH₂O), acetic acid (C₂H₄O₂), and glucose (C₆H₁₂O₆) all reduce to CH₂O — the molar mass tells them apart.
Why convert mass to moles before taking the ratio?
The formula is a ratio of atoms, not of masses, and equal masses of different elements hold different numbers of atoms. Dividing each mass by its atomic mass converts to moles, which count atoms directly.