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)
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
2. Why can two completely different compounds share the same empirical formula?
Show answer
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.