Bbiochemtools

Empirical Formula Calculator

Enter each element's percent composition (or its mass in grams) and atomic mass. This finds the empirical formula, showing the tricky scale-to-whole-numbers step, then the molecular formula if you give the molar mass.

Element (optional)
Percent (%)
Atomic mass
Empirical formula
Molecular formula

How the empirical formula is found

The whole method turns "how much of each element" into "how many atoms of each, in the simplest whole-number ratio." Percent composition is treated as grams by imagining a 100 g sample, so 40% carbon just means 40 g of carbon. Convert each element's grams to moles (divide by atomic mass), then divide every mole value by the smallest one so the least-abundant element becomes 1. If any ratio lands on a fraction like 1.5 or 1.33, multiply them all by the smallest whole number that clears the fraction — atoms only come in whole numbers. Those integers are your subscripts. To go from there to the molecular formula, divide the real molar mass by the empirical formula's mass and multiply every subscript by that whole number.

Related tools: Molar mass & molarity calculator · Percent yield calculator · Limiting reagent calculator · all biochem tools.

Worked example: glucose (the default)

Composition: 40.0% C, 6.7% H, 53.3% O (molar mass 180.16 g/mol) Treat percents as grams (100 g sample): Step 1 — moles of each: C: 40.0 / 12.011 = 3.330 mol H: 6.7 / 1.008 = 6.647 mol O: 53.3 / 15.999 = 3.331 mol Step 2 — divide by the smallest (3.330): C: 3.330/3.330 = 1.00 H: 6.647/3.330 = 2.00 O: 3.331/3.330 = 1.00 Step 3 — already whole numbers → empirical formula = CH2O empirical formula mass = 12.011 + 2(1.008) + 15.999 = 30.03 g/mol Step 4 — molecular formula: n = 180.16 / 30.03 = 6 → multiply each subscript by 6 molecular formula = C6H12O6

Practice problems

1. A hydrocarbon is 82.7% C and 17.3% H, with a molar mass of 58.12 g/mol. Find the empirical and molecular formulas. (C = 12.011, H = 1.008)

Show answer
Moles: C = 82.7/12.011 = 6.885; H = 17.3/1.008 = 17.16 Divide by smallest (6.885): C = 1.00; H = 2.49 2.49 is close to 2.5 = 5/2, so multiply both by 2: C = 2, H = 5 → empirical formula = C2H5 empirical mass = 2(12.011) + 5(1.008) = 29.06 g/mol Molecular: n = 58.12/29.06 = 2 → C4H10 (butane)

2. Why can two completely different compounds share the same empirical formula?

Show answer
Because the empirical formula only fixes the ratio of atoms, not the actual count. Formaldehyde (CH2O), acetic acid (C2H4O2), and glucose (C6H12O6) all reduce to the same empirical formula CH2O — a 1:2:1 ratio of C:H:O — even though they are very different molecules. Only the molar mass tells you which multiple of the empirical formula you actually have, which is why the molecular formula needs it.

FAQ

Empirical vs. molecular formula?
Empirical is the simplest whole-number atom ratio; molecular is the actual atom count in one molecule. They match for water (H₂O) but differ for glucose (CH₂O empirical, C₆H₁₂O₆ molecular). You need the molar mass to get from one to the other.

Why divide by the smallest number of moles?
It forces the least-abundant element to a ratio of 1, making the other ratios easy to read as atoms-per-atom before you scale to whole numbers.

What if a ratio is 1.5 or 2.33?
Multiply every ratio by the smallest whole number that makes them all integers: 1.5 → ×2, 1.33 (4/3) → ×3, 1.25 (5/4) → ×4. Atoms only come in whole numbers.

How do I get the molecular formula?
Divide the real molar mass by the empirical formula mass to get a whole number n, then multiply every subscript by n.

Grams or percent?
Either — they're handled the same, because assuming a 100 g sample turns each percent directly into grams.