Empirical Formula Calculator
Find an empirical formula from masses (grams) or percent composition. We convert each element to moles, divide by the smallest, then scale to whole-number ratios, and show every step with your own numbers. Supports the full standard periodic table, and an optional hydrate term like · x H₂O.
Background
The empirical formula is the simplest whole-number ratio of atoms in a compound. Example: glucose C₆H₁₂O₆ has empirical formula CH₂O.
How to use this calculator
- Pick Mass (g) or Percent mode.
- Add each element (symbol) and its value — any element on the periodic table works.
- Click Calculate to get the empirical formula and its mole ratio (like C : H : O = 1 : 2 : 1), plus a mole-ratio visual and a calculation table.
- Keep step-by-step on to see the working with your own numbers: each mass ÷ atomic mass, each mole value ÷ the smallest, and any multiplier used.
- If needed, we scale ratios to the nearest whole numbers (like ×2 for 1.5).
How this calculator works
- Convert each entry to moles: moles = grams / atomic mass.
- Divide all moles by the smallest mole value to get ratios.
- Find a small multiplier (×1..×12) that turns ratios into near integers.
- Format the formula with subscripts (e.g., C₆H₁₂O₆), with the elements in the usual order (see the FAQ).
Formula & Equation Used
Moles: n = m / M
Ratio: rᵢ = nᵢ / min(n)
Scale: find integer k such that k·rᵢ ≈ integers
Example Problems & Step-by-Step Solutions
Example 1 — Percent composition of glucose
- Assume 100 g: C=40.00 g, H=6.71 g, O=53.29 g.
- Convert to moles: C≈3.33, H≈6.66, O≈3.33.
- Divide by smallest (3.33): C=1, H=2, O=1 → CH₂O.
Example 2 — Percent composition of carbon dioxide
- Assume 100 g: C=27.29 g, O=72.71 g.
- Convert to moles: C≈2.27, O≈4.54.
- Divide by smallest (2.27): C=1, O=2 → CO₂.
Example 3 — Mass data (iron oxide)
- Given masses: Fe=111.69 g, O=48.00 g.
- Convert to moles: Fe≈2.00, O≈3.00.
- Divide by smallest (2.00): Fe=1, O=1.5 → multiply by 2 → Fe=2, O=3.
- Empirical formula: Fe₂O₃.
Example 4 — Mass data (arsenic trioxide)
- Given masses: As=149.84 g, O=48.00 g.
- Convert to moles: As≈2.00, O≈3.00.
- Divide by smallest (2.00): As=1, O=1.5 → multiply by 2 → As=2, O=3.
- Empirical formula: As₂O₃.
Example 5 — A ratio of 1.33 (needs ×3)
- Assume 100 g: Fe=72.4 g, O=27.6 g.
- Convert to moles: Fe = 72.4 ÷ 55.845 ≈ 1.296, O = 27.6 ÷ 15.999 ≈ 1.725.
- Divide by smallest (1.296): Fe=1, O≈1.33.
- 1.33 isn't whole, so multiply both by 3: Fe=3, O≈4 → Fe₃O₄.
Frequently Asked Questions
What if I get ratios like 1.5 or 2.33?
We multiply by a small number (like ×2 or ×3) to make them whole numbers. The step-by-step shows which ratio wasn't whole and what the multiplier did to each element.
Can I use percent composition?
Yes — percent mode treats each percent as grams in a 100 g sample.
Where do I see the ratio?
Right under the formula, as a mole ratio such as C : H : O = 1 : 2 : 1. The calculation table and the chart show the same ratios before and after scaling.
Why is the formula written in this order?
It follows the usual convention. Compounds of carbon without a metal use C first, then H, then the rest alphabetically (C₂H₆O). Other compounds put the metal first and the more electronegative elements last, so you get NaCl, NH₃, SO₂ and CaCO₃ rather than an alphabetical ClNa, H₃N, O₂S and CCaO₃. Acids start with H (H₂SO₄). Your course may write a few formulas differently, such as NaOH versus HNaO; the atom counts are the same.
Is empirical formula always the same as molecular formula?
Not always. Molecular formula can be a multiple of the empirical formula (like C₆H₁₂O₆ vs CH₂O).
Which elements are supported?
The full set of standard atomic masses used in general chemistry, including less common ones like arsenic (As), antimony (Sb), and bismuth (Bi).