StatGardenREF. DESK
Calculators/Chemistry/Empirical formula from mass percent
Chemistry

Empirical formula from mass percent calculator

Simplest whole-number atom ratio of a compound from percent composition and atomic masses.

Published 25 September 2026

What this calculator does

The empirical formula is the simplest whole-number ratio of atoms. From 40.0% carbon, 6.7% hydrogen and 53.3% oxygen, the ratio comes out as 1 : 2 : 1, which is CH₂O.

The method works by converting masses to moles, which is why atomic masses are needed, and then dividing everything by the smallest. Real data does not land on exact integers: ethanol composition gives 2.00 : 5.93 : 1.00, where 5.93 is plainly 6 with measurement error. Judging when to round and when to suspect a different ratio is the part that needs care.

The formula

Formulamoles per element = mass ÷ atomic mass; divide every mole value by the smallest to get the ratio

Each mass is divided by its atomic mass to give moles, and every mole value is divided by the smallest of them. The result is the ratio. Where it lands close to a simple fraction rather than a whole number, all values are multiplied up: a ratio of 1 : 1.5 becomes 2 : 3.

TermMeaning
Empirical formulaThe simplest whole-number atom ratio.
Molecular formulaThe actual atom counts, which is a whole-number multiple of the empirical formula.
Percent compositionThe mass share of each element, which is what elemental analysis reports.
Rounding toleranceValues within about 0.1 of a whole number are normally rounded.

The inputs explained

FieldWhat to enter
Mass or mass % of each element (comma-separated)Mass or mass percent of each element, comma separated. Percentages work directly since only ratios matter.
Atomic mass of each element, same order (comma-separated)Atomic mass of each element in the same order. Carbon is 12.011, hydrogen 1.008, oxygen 15.999.

When to use it

Interpreting elemental analysis

Combustion analysis returns percent composition, and this converts it into a formula.

Identifying an unknown

The empirical formula combined with a molar mass gives the molecular formula.

Checking a synthesis

Elemental analysis of a product should match the expected formula within a small tolerance.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

What ratios do these compositions give?

Three percent compositions with their atom ratios.

Carbon, hydrogen and oxygen
Mass percent (C, H, O)Ratio (relative to smallest)Elements enteredSmallest mole value
40.0, 6.7, 53.31.00 : 2.00 : 1.0033.330 mol
52.2, 13.0, 34.82.00 : 5.93 : 1.0032.175 mol
92.3, 7.7, 01.01 : 1.00 : 0.0037.639 mol
The first row gives a clean 1 : 2 : 1, which is CH₂O, the empirical formula shared by formaldehyde, acetic acid and glucose. The second gives 2.00 : 5.93 : 1.00, which is ethanol C₂H₆O with 5.93 rounding to 6; that gap is measurement error, not a different compound. The third has no oxygen and gives 1.01 : 1.00 : 0.00, the CH of benzene.

Questions

What is the difference between empirical and molecular formula?

The empirical formula is the simplest ratio; the molecular formula is the actual count. Glucose is C₆H₁₂O₆ molecularly but CH₂O empirically, a factor of six. Distinguishing them needs a molar mass, which composition data alone cannot provide.

How close to a whole number does the ratio need to be?

Within about 0.1 is normally rounded. A value like 5.93 is clearly 6. A value like 1.5 is not a rounding error but a genuine half-integer ratio, and everything should be doubled to give 2 : 3. Values between, such as 1.3, usually indicate an analytical problem.

Can I use masses instead of percentages?

Yes. Only the ratios matter, so grams from an actual sample work exactly as well as percentages. This is convenient when working directly from a combustion analysis that reports the masses of carbon dioxide and water produced.

How do I get from empirical to molecular formula?

Divide the measured molar mass by the empirical formula mass. The result is the whole-number multiplier. For glucose at 180.16 g/mol and CH₂O at 30.03, the ratio is 6, giving C₆H₁₂O₆.

For rings and pi bonds from a formula, see the degree of unsaturation calculator. For molar mass, see the molecular weight calculator.