Empirical Formula Calculator
Work out the empirical formula from percent composition or masses, then the molecular formula from the molar mass, with the unrounded mole ratio shown.
Calculator
Composition alone can only give the simplest whole-number ratio. CH2O, C2H4O2 and C6H12O6 all have the same percentages, so the molar mass is what separates them.
Molecular formula
Empirical formula
180.16 / 30.026 = 6.0001, so every subscript is multiplied by 6.
| Element | % | Ar | Moles | Ratio | Subscript |
|---|---|---|---|---|---|
| C | 40 | 12.011 | 3.3303 | 1 | 1 |
| H | 6.71 | 1.008 | 6.6567 | 1.9989 | 2 |
| O | 53.29 | 15.999 | 3.3308 | 1.0002 | 1 |
Working, step by step
- Taking 100 g of the compound, each percentage is a mass in grams.
- n(C) = 40 / 12.011 = 3.3303 mol
- n(H) = 6.71 / 1.008 = 6.6567 mol
- n(O) = 53.29 / 15.999 = 3.3308 mol
- Dividing every one by the smallest, n(C) = 3.3303 mol.
- C ratio = 3.3303 / 3.3303 = 1
- H ratio = 6.6567 / 3.3303 = 1.9989
- O ratio = 3.3308 / 3.3303 = 1.0002
- Empirical formula: CH2O
- M(CH2O) = 30.026 g/mol
- molar mass / empirical molar mass = 180.16 / 30.026 = 6.0001
- Molecular formula: C6H12O6
Ratios are shown before rounding on purpose. A ratio of 1.4998 says the data is good and the answer needs doubling; 1.47 says something is wrong with the figures.
Citing this tool
Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.
The equation
Law of definite proportions, Proust (1797)
Four steps, and only one of them is hard
An empirical formula is the simplest whole-number ratio of atoms in a compound, found by converting each element’s mass to moles, dividing every mole figure by the smallest and scaling the ratios to whole numbers. Every empirical formula question is the same sequence. Take the percentage of each element as a mass in grams, which is what "per 100 grams" means. Divide each mass by that element’s relative atomic mass to get moles. Divide every mole figure by the smallest of them. Then find the whole number that turns those ratios into subscripts.
The first three steps are arithmetic. The fourth is where marks are lost, because a ratio of 1.5 is not a 2, and treating it as one turns Fe2O3 into FeO2. Rounding it down to 1 is no better and gives FeO. That is why the ratio column above shows the unrounded value next to the subscript it produced.
Worked example: 40.00% C, 6.71% H, 53.29% O
Per 100 g there are 40.00 g of carbon, 6.71 g of hydrogen and 53.29 g of oxygen. Dividing by 12.011, 1.008 and 15.999 gives 3.3303, 6.6567 and 3.3308 moles. The smallest is carbon at 3.3303, so the ratios are 1, 1.9989 and 1.0002.
Those are already whole numbers to within 0.002, so the empirical formula is CH2O and the empirical formula mass is 30.03 g/mol. This is as far as composition can take you. The compound might be formaldehyde at 30.03 g/mol, acetic acid at 60.05, or glucose at 180.16, and all three have exactly these percentages. Supplying 180.16 gives 180.16 / 30.03 = 6, so every subscript multiplies by six and the molecular formula is C6H12O6.
What the ratio is telling you
A ratio close to a neat fraction is the signal to multiply rather than round. 1.5 means multiply everything by 2, 1.333 by 3, 1.25 by 4 and 1.2 by 5. These come from the denominators that actually occur in stable compounds, which is why this tool stops searching at 6.
A ratio that sits between those, like 2.14 or 1.62, is a message about your data rather than about the compound. It usually means a percentage was mistyped, or the figures were rounded harder than the question intended, or the sample was not pure. A tool that quietly reports C7H15 from a 2.14 has turned a rounding error into a molecule, so this one says so instead.
Percentages, masses, and combustion data
Masses in grams work exactly as well as percentages, and go through the same arithmetic, because dividing by the smallest mole figure cancels any common scale. That matters for the most common lab version of this question: a mass of metal that gains mass on heating in air. Weigh 2.50 g of copper, heat it to constant mass at 3.13 g, and the 0.63 g gained is the oxygen. Enter both and the answer is CuO.
Combustion analysis needs one conversion first. The carbon dioxide and water are products, not the sample, so convert each to the mass of its element: multiply the CO2 mass by 12.011 / 44.009, and the H2O mass by 2.016 / 18.015. Then enter those masses here. If the compound also contains oxygen, subtract the carbon and hydrogen masses from the sample mass rather than using the remainder checkbox, which assumes percentages that total 100.
The order of the elements
The formula comes out with the elements in the order you entered them. That is deliberate. The strict convention, Hill notation, puts carbon first, then hydrogen, then everything else alphabetically, which is correct for a chemical database and renders calcium carbonate as CCaO3 and sulfuric acid as H2O4S. Since questions list the elements in the order the expected answer uses, typing them in as given produces the formula as written.
Common mistakes
- Rounding 1.5 up. The single biggest error here. Multiply the whole set by 2 rather than rounding one member of it.
- Dividing by molar mass instead of atomic mass. The conversion in step two uses each element’s own relative atomic mass, not the molar mass of the compound.
- Using percentages by moles or by volume. Everything here assumes percent by mass. Composition data for a gas mixture is often by volume, and that is a mole ratio already.
- Forgetting the oxygen. Questions that give only carbon and hydrogen for an organic compound usually intend the rest to be oxygen. The checkbox adds it by difference and states the figure it used in the working.
- Stopping at the empirical formula. If the question gives a molar mass or a relative molecular mass, it wants the molecular formula, and the two are only the same when the multiplier happens to be 1.
- Trusting a multiplier that came from imprecise data. If the ratios needed a large multiplier to become whole, check the input before writing the answer down.
Common questions
What is the difference between an empirical and a molecular formula?
The empirical formula is the simplest whole-number ratio of atoms; the molecular formula is how many atoms are actually in one molecule. Composition alone can only give the ratio, because CH₂O, C₂H₄O₂ and C₆H₁₂O₆ all contain 40.00 percent carbon by mass. The molar mass is what separates them: divide it by the empirical formula mass and multiply every subscript by the whole number that comes out.
Why divide by the smallest number of moles?
Because it turns the mole figures into a ratio against 1, which is the easiest form to spot a whole-number pattern in. Any divisor would preserve the ratio, but dividing by the smallest guarantees no value below 1 and makes a result like 1.5 or 1.333 immediately recognisable as needing doubling or trebling.
My ratio came out as 1.5, so do I round it to 2?
No. Rounding 1.5 to 2 changes the compound: Fe₂O₃ becomes FeO₂. Multiply every ratio by 2 instead, and by 3 for a 1.333, by 4 for a 1.25 and by 5 for a 1.2. This tool searches multipliers up to 6 and tells you which one it used, and it says so when nothing up to 6 works, which usually means a figure is mistyped rather than that the compound is unusual.
Do the percentages have to add up to 100?
Not exactly. Rounded exam data often totals 99.8 or 100.1, and it makes no difference, because dividing every mole figure by the smallest cancels any common scale. This calculator reports the total rather than normalising it, so a genuine gap is visible. If a large amount is missing, the question probably expects the remainder to be oxygen, which is what the checkbox does.