Empirical formula calculator
Enter percent composition or grams of each element. You’ll see the moles, the mole ratio, the empirical formula, and, if you add the molar mass, the molecular formula.
How to find an empirical formula
- If you have percents, assume a 100 g sample so each percent becomes grams.
- Convert grams to moles by dividing by each element’s atomic mass.
- Divide every mole value by the smallest one.
- If a ratio ends in about .5, .33 or .25, multiply all ratios by 2, 3 or 4 to reach whole numbers.
Example: 40.0% C, 6.7% H, 53.3% O gives 3.33 mol C, 6.65 mol H and 3.33 mol O, a 1 : 2 : 1 ratio, so CH₂O.
From empirical to molecular formula
The molecular formula is a whole-number multiple of the empirical formula. Divide the molar mass by the empirical formula mass to find that multiple.
Example: CH₂O has a mass of 30.03 g/mol. If the molar mass is 180.16 g/mol, then 180.16 ÷ 30.03 = 6, so the molecular formula is C₆H₁₂O₆ (glucose).
When ratios aren’t whole numbers
Iron oxide that is 69.94% Fe and 30.06% O gives an Fe : O ratio of 1 : 1.5. Rounding 1.5 to 2 would be wrong; multiplying both by 2 gives Fe₂O₃. The calculator finds the smallest multiplier (up to 8) automatically.
Check your answer
Plug the formula into the molar mass calculator: its mass-percent column should match the composition you started with, within rounding.
Common questions.
What is the difference between an empirical and a molecular formula?
The empirical formula is the simplest whole-number ratio of atoms (CH₂O). The molecular formula is the actual number of atoms in one molecule (C₆H₁₂O₆), which is a whole-number multiple of the empirical formula.
Why assume 100 grams?
With 100 g, each mass percent equals grams directly (40.0% C becomes 40.0 g), which makes the mole conversion simple. Any sample size gives the same ratio.
My percents don’t add up to 100. Is that a problem?
Small differences from rounding are fine. If one element is missing, problems often expect you to find it by difference: 100% minus the others.
How do I get the molar mass for the molecular formula?
It is usually given in the problem, often from mass spectrometry or a gas-density measurement. Without it, only the empirical formula can be determined.