Empirical Formula Calculator
Determine the empirical formula from percent composition or mass data for up to 10 elements.
Supports all 118 elements with standard atomic weights and step-by-step explanations.
Updated August 26, 2026
What Is an Empirical Formula?
The empirical formula of a compound shows the simplest whole-number ratio of atoms of each element present. For example, the molecular formula of glucose is , but its empirical formula is — the same ratio expressed with the smallest possible integers.
This calculator takes your percent composition data (or direct mass measurements) and converts them into the empirical formula using a standard five-step process: normalize masses, convert to moles, find the simplest ratio, round to integers, and reduce by the greatest common divisor.
When do you need this?
- You have percent composition data from a lab experiment or literature source
- You know the mass of each element in a sample and need the simplest formula
- You are solving a stoichiometry problem that starts with composition data
How to Use This Calculator
Step-by-step guide
- Choose your input mode. Select “Percent by mass” if your data is given as percentages (they will be treated as grams in a 100 g sample). Select “Mass (g)” if you have direct mass measurements.
- Enter each element. Select an element from the dropdown (all 118 elements are supported), then type its percentage or mass. A new row appears automatically once the previous row has both an element and a value.
- Read the result. The empirical formula appears immediately in the Result section. Expand “Derivation steps” to see the full calculation breakdown.
Worked Example: Glucose
A compound is known to contain 40.00% carbon, 6.71% hydrogen, and 53.29% oxygen by mass. Find its empirical formula.
Step 1 — Normalize: Treat the percentages as grams in a 100 g sample.
, ,
Step 2 — Convert to moles:
Step 3 — Divide by the smallest (3.330 mol):
, ,
Step 4 — Round to integers:
Empirical formula:
Calculation Method
The calculator follows the standard empirical formula algorithm used in general chemistry. Here is the mathematical foundation behind each step.
Step 1: Mass normalization
In percent mode, the values are already on a 100 g basis — no calculation needed. In mass mode, the grams you enter are used directly.
Step 2: Convert mass to moles
Divide each element’s mass by its atomic mass from the periodic table.
where is the mass and is the atomic mass of element .
Step 3: Find the simplest ratio
Divide every mole value by the smallest one. This normalizes the ratios so the smallest becomes 1.
Step 4: Round to whole numbers
The calculator finds the smallest integer multiplier that brings all ratios within a tolerance of ±0.07 of a whole number, then multiplies and rounds.
Step 5: Reduce by GCD
If all subscripts share a common factor, divide through by the greatest common divisor to get the simplest ratio.
Real-World Examples
Example 1: Water
A compound is 11.19% hydrogen and 88.81% oxygen by mass.
Dividing by the smallest (5.551): , . Result: .
Example 2: Table Salt
A compound is 39.34% sodium and 60.66% chlorine by mass.
Dividing by the smallest (1.711): , . Result: .
Example 3: Iron Oxide
A compound is 69.94% iron and 30.06% oxygen by mass.
Dividing by the smallest (1.252): , . Multiplying by 2 gives , . Result: .
Tips & Best Practices
- Verify your percentages add up. In percent mode, the calculator normalizes your values to 100 g, so they don’t need to total exactly 100%. However, if they sum to significantly more or less, double-check your data source.
- Check the derivation when results look unexpected. Expand the “Derivation steps” section to inspect the mole ratios. If ratios are far from whole numbers (e.g., 1.7 instead of 2), it may indicate measurement error, a missing element, or an impure sample.
- Use more decimal places for better accuracy. If your data allows, entering values with 2–4 decimal places (e.g., 40.00% instead of 40%) helps the algorithm find the correct integer ratios more reliably.
- Don’t forget trace elements. If the percentages don’t account for 100% of the sample, there may be additional minor elements not listed. The calculator works with whatever elements you provide.
Frequently Asked Questions
What is the difference between an empirical formula and a molecular formula?
The empirical formula shows the simplest whole-number ratio of atoms. The molecular formula shows the actual number of atoms in one molecule. For example, benzene has the empirical formula but the molecular formula . Some compounds, like water (), have the same empirical and molecular formulas.
Can I use this calculator for ionic compounds?
Yes. The empirical formula of an ionic compound (e.g., for table salt) is the same as its formula unit. Enter the mass or percentage of each ion present, and the calculator will find the simplest ratio.
My percentages don’t add up to 100%. Can I still use this?
Yes. In percent mode, the calculator normalizes your values to a 100 g sample internally. If your percentages sum to 98.5% or 101.2%, the calculation still works — it scales everything proportionally. Just be aware that missing mass may indicate unlisted trace elements.
How do I go from empirical formula to molecular formula?
Calculate the molar mass of the empirical formula using the Molar Mass Calculator. Then divide the experimentally determined molar mass by this value. The quotient is the multiplier — multiply every subscript in the empirical formula by this number to get the molecular formula.
Limitations
- Up to 10 elements can be entered at once. For compounds with more elements, you may need to simplify your input or use multiple calculations.
- Rounding tolerance: The algorithm accepts ratios within ±0.07 of a whole number. If your data is noisy or imprecise, ratios that fall outside this range may not round correctly. Try entering more precise values.
- Standard atomic weights are used for all 118 elements. If your compound contains an element with no standard atomic weight, the calculation may not be possible.
- The empirical formula alone does not identify a compound. Multiple compounds can share the same empirical formula. You need additional data (molar mass, spectroscopy, etc.) to determine the molecular formula.
Related Calculators
Percentage of a Percentage Calculator
Calculate cumulative percentages by multiplying two percentages together
Atom Calculator
Calculate atomic properties including protons, neutrons, electrons, atomic number and mass number
Electron Configuration Calculator
Get the electron configuration for any element from the periodic table. View atomic number, atomic mass, and valence electrons.
Atomic Mass Calculator
Calculate atomic mass from protons and neutrons. Get atomic mass in various units including atomic mass units (u), kilograms, and more.
Electronegativity Calculator
Calculate electronegativity difference between two elements and determine bond type (ionic, polar covalent, or nonpolar covalent).
Average Atomic Mass Calculator
Calculate the average atomic mass of an element based on the isotopes and their natural abundances.