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
Frank Zhao - Creator
CreatorFrank Zhao
Loading calculator…

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 C6H12O6C_6H_{12}O_6, but its empirical formula is CH2OCH_2O — 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

  1. 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.
  2. 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.
  3. 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.

mC=40.00 gm_C = 40.00\ \text{g}, mH=6.71 gm_H = 6.71\ \text{g}, mO=53.29 gm_O = 53.29\ \text{g}

Step 2 — Convert to moles:

nC=40.0012.011=3.330 moln_C = \frac{40.00}{12.011} = 3.330\ \text{mol}nH=6.711.008=6.657 moln_H = \frac{6.71}{1.008} = 6.657\ \text{mol}nO=53.2915.999=3.331 moln_O = \frac{53.29}{15.999} = 3.331\ \text{mol}

Step 3 — Divide by the smallest (3.330 mol):

C:1.000C: 1.000, H:1.999H: 1.999, O:1.000O: 1.000

Step 4 — Round to integers: C:1, H:2, O:1C: 1,\ H: 2,\ O: 1

Empirical formula: CH2OCH_2O

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.

mi (used in next step)m_i\ (\text{used in next step})

Step 2: Convert mass to moles

Divide each element’s mass by its atomic mass from the periodic table.

ni=miMin_i = \frac{m_i}{M_i}

where mim_i is the mass and MiM_i is the atomic mass of element ii.

Step 3: Find the simplest ratio

Divide every mole value by the smallest one. This normalizes the ratios so the smallest becomes 1.

ri=ninminr_i = \frac{n_i}{n_{\min}}

Step 4: Round to whole numbers

The calculator finds the smallest integer multiplier kk that brings all ratios within a tolerance of ±0.07 of a whole number, then multiplies and rounds.

Counti=round(ri×k)\text{Count}_i = \text{round}(r_i \times k)

Step 5: Reduce by GCD

If all subscripts share a common factor, divide through by the greatest common divisor to get the simplest ratio.

finali=Countigcd(Count1,Count2,)\text{final}_i = \frac{\text{Count}_i}{\gcd(\text{Count}_1, \text{Count}_2, \dots)}

Real-World Examples

Example 1: Water

A compound is 11.19% hydrogen and 88.81% oxygen by mass.

nH=11.191.008=11.10n_H = \frac{11.19}{1.008} = 11.10nO=88.8115.999=5.551n_O = \frac{88.81}{15.999} = 5.551

Dividing by the smallest (5.551): H:2.000H: 2.000, O:1.000O: 1.000. Result: H2OH_2O.

Example 2: Table Salt

A compound is 39.34% sodium and 60.66% chlorine by mass.

nNa=39.3422.990=1.711n_{Na} = \frac{39.34}{22.990} = 1.711nCl=60.6635.453=1.711n_{Cl} = \frac{60.66}{35.453} = 1.711

Dividing by the smallest (1.711): Na:1Na: 1, Cl:1Cl: 1. Result: NaClNaCl.

Example 3: Iron Oxide

A compound is 69.94% iron and 30.06% oxygen by mass.

nFe=69.9455.845=1.252n_{Fe} = \frac{69.94}{55.845} = 1.252nO=30.0615.999=1.879n_O = \frac{30.06}{15.999} = 1.879

Dividing by the smallest (1.252): Fe:1.000Fe: 1.000, O:1.501O: 1.501. Multiplying by 2 gives Fe:2Fe: 2, O:3O: 3. Result: Fe2O3Fe_2O_3.

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 CHCH but the molecular formula C6H6C_6H_6. Some compounds, like water (H2OH_2O), 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., NaClNaCl 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.
Empirical Formula Calculator — Find the Simplest Formula from Percent Composition