Empirical Formula Calculator: From Percent, Grams or Combustion Data
By FindMySum · Last reviewed
An empirical formula is the simplest whole-number ratio of the atoms in a compound. It is what an elemental analysis tells you directly: a laboratory reports that a sample is so many percent carbon, hydrogen and oxygen, and the empirical formula is the smallest set of whole numbers that matches those percentages. This calculator works it out from mass percentages, from grams of each element, or from the carbon dioxide and water collected when a sample is burned, and then turns it into a molecular formula if you know the molar mass.
The method in four steps
The same four steps appear in every general chemistry course, including OpenStax Chemistry 2e:
- Get masses. If you have grams of each element, use them. If you have percentages, imagine a 100 g sample: 40.0% carbon becomes 40.0 g of carbon.
- Convert to moles. Divide each mass by the element's standard atomic weight. The calculator uses the 2024 abridged table from the IUPAC Commission on Isotopic Abundances and Atomic Weights: 12.011 for carbon, 1.0080 for hydrogen, 15.999 for oxygen, 14.007 for nitrogen.
- Divide by the smallest. Divide every mole number by the smallest one. The element with the fewest moles gets a ratio of exactly 1, the others something close to a whole number.
- Make them whole. If every ratio is within about 0.1 of a whole number, round. If one ends in .5, .33, .25 or similar, multiply all of them by 2, 3 or 4 first.
Worked example: the calculator's default
The default composition is 40.0% carbon, 6.71% hydrogen and 53.28% oxygen.
- Carbon: 40.0 ÷ 12.011 = 3.3303 mol
- Hydrogen: 6.71 ÷ 1.0080 = 6.6567 mol
- Oxygen: 53.28 ÷ 15.999 = 3.3302 mol
Oxygen has the fewest moles, so divide by 3.3302: carbon 1.0000, hydrogen 1.9989, oxygen 1. Every ratio is already close to a whole number, so the empirical formula is CH₂O, with an empirical formula mass of 12.011 + 2 × 1.0080 + 15.999 = 30.026 g/mol.
The default also gives a molar mass of 180.16 g/mol. Dividing, 180.16 ÷ 30.026 = 6.0001, which rounds to 6, so the molecular formula is C₆H₁₂O₆: glucose. The breakdown table on the page shows every one of these columns for your own numbers, and the how-it's-calculated section writes the division out.
When a ratio is not close to a whole number
Rounding 1.5 to 2 would be a mistake: it would change the ratio by a third. Ratios that sit near a simple fraction mean the formula needs a multiplier. Hematite, an iron ore, contains 34.97 g of iron for every 15.03 g of oxygen. That is 0.6262 mol of iron and 0.9394 mol of oxygen, a ratio of 1 : 1.50. Doubling gives 2 : 3, so the formula is Fe₂O₃.
The calculator automates this. It tries multiplying by 1, then 2, then 3 and so on up to 12, and takes the first multiplier that brings every ratio within the tolerance of a whole number. The default tolerance is 0.1, the rule of thumb most textbooks use; you can tighten or loosen it under the advanced options. If no multiplier works, the page shows the closest fit and says so, which usually means a typing error or a missing element.
| Ratio ends in about | Multiply by |
|---|---|
| .5 | 2 |
| .33 or .67 | 3 |
| .25 or .75 | 4 |
| .2, .4, .6 or .8 | 5 |
| .17 or .83 | 6 |
From empirical formula to molecular formula
The molecular formula is always a whole-number multiple of the empirical formula, and the molar mass tells you which multiple. Nicotine analyses as 74.02% carbon, 8.710% hydrogen and 17.27% nitrogen, which gives the empirical formula C₅H₇N (81.118 g/mol). Its measured molar mass is 162.3 g/mol, twice the empirical formula mass, so nicotine is C₁₀H₁₄N₂. If the factor comes out far from a whole number, for example 2.4, the calculator warns you: either the molar mass or the composition is off.
Molar masses come from experiments such as mass spectrometry, gas density or freezing-point depression. Without one you can only report the empirical formula.
Combustion analysis
Organic compounds are often analysed by burning a weighed sample in excess oxygen. All the carbon leaves as carbon dioxide and all the hydrogen as water, and both are trapped and weighed. From those two masses:
- carbon = mass of CO₂ × 12.011 ÷ 44.009
- hydrogen = mass of H₂O × 2.016 ÷ 18.015
- oxygen = mass of sample − carbon − hydrogen
For example, burning 1.000 g of a compound that contains only carbon, hydrogen and oxygen gives 1.500 g of CO₂ and 0.405 g of water. That is 0.4094 g of carbon, 0.0453 g of hydrogen and, by difference, 0.5453 g of oxygen. The mole ratio is 1 : 1.319 : 1; multiplying by 3 gives C₃H₄O₃. With a molar mass of 176.12 g/mol, the molecular formula is C₆H₈O₆, which is ascorbic acid, vitamin C.
Choose "no oxygen" for a hydrocarbon. When oxygen is found by difference, a small remainder is usually just measurement error: OpenStax's polyethylene example leaves 0.4% of the sample unaccounted for. The calculator treats a remainder under 1% of the sample as zero and tells you it did. A negative remainder of more than 1% means the three masses can't all be right.
Checking your answer
A few quick checks catch most mistakes:
- Do the percentages add up to 100? If not, an element is missing. Oxygen is the usual culprit, because analysers often measure C, H and N directly and leave oxygen to be found by difference. The calculator warns when the total is outside 98–102%.
- Is the symbol right? Element symbols are case-sensitive. Co is cobalt; CO would be read as carbon and oxygen.
- Does the formula make chemical sense? Hydrogen counts in stable neutral organic molecules are even when only C, H and O are present. An odd count in a molecular formula of that kind points to rounding or a wrong multiplier.
- Recalculate the percentages. Put the formula into the molar mass calculator and compare its mass percentages with your data; they should agree to within the precision of the analysis.
Related calculators
Use the molar mass calculator to find a compound's molecular weight and mass percent by element from its formula, the reverse of this page. The percent yield calculator compares what a reaction produced with what the balanced equation predicts, and the chemical equation balancer balances the equation first.
More questions
Can two different compounds have the same empirical formula?
Yes, many do. Formaldehyde (CH₂O), acetic acid (C₂H₄O₂) and glucose (C₆H₁₂O₆) all reduce to CH₂O. Acetylene (C₂H₂) and benzene (C₆H₆) both reduce to CH. The empirical formula only fixes the ratio; the molar mass picks out which multiple you have, and even then isomers share one molecular formula.
Is the empirical formula of an ionic compound the same as its formula?
Usually. Ionic solids have no separate molecules, so the formula written for them, such as NaCl or Fe₂O₃, is already the simplest ratio of ions and is the empirical formula. Molecular formulas only make sense for substances made of discrete molecules.
How many significant figures should the data have?
Three or four are enough for small formulas. With large subscripts the ratios get closer together (C₈ vs C₉ differ by about 12%), so elemental analysis for organic chemistry reports percentages to two decimal places, and journals expect found values within 0.4% of the calculated ones.
What if the compound contains nitrogen or sulfur as well as C, H and O?
Simple combustion only measures carbon and hydrogen. Nitrogen is measured separately, for example as N₂ in a CHN analyser, and sulfur as SO₂. Once you have the mass or percentage of every element, enter them all in the composition mode; oxygen is then found by difference from 100%.
Does the empirical formula tell me the structure?
No. It gives the ratio of atoms only, not how they are joined. Ethanol and dimethyl ether are both C₂H₆O. Spectroscopy (infrared, NMR, mass spectrometry) is needed to tell structures apart.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.