🏆 US-Registered Digital Marketing Agency
Advertisement
Advertisement
CHEMISTRY

Empirical Formula Calculator — percentages to a real formula

Turn element mass percentages or weighed masses into an empirical formula, then use the compound molar mass to get the molecular formula.

Either works. Percentages should total near 100; masses can be any absolute amounts from the same sample.
Symbols are case sensitive, as they must be: Co is cobalt, CO is not an element. Leave a row blank to skip it.
Needed only for the molecular formula. Leave it at 0 and you still get the empirical formula.
How far a mole ratio may sit from a whole number before the tool multiplies through instead of rounding.
Empirical formula
 
 
0
Empirical formula mass
Molecular formula
Whole-number multiple n
0
Input total
Working:  
Tip: if your percentages do not total 100, the missing fraction is almost always oxygen. Combustion analysis measures carbon and hydrogen directly and finds oxygen by difference, which is why oxygen carries the largest error in most datasets.
Advertisement

An empirical formula is the simplest whole-number ratio of the atoms in a compound. It is what an elemental analysis actually tells you, because an analysis measures mass fractions and mass fractions only carry ratio information — not how big the molecule is. Glucose, formaldehyde and acetic acid all analyse as one carbon to two hydrogens to one oxygen. Their empirical formula is CH2O in every case. Only when you bring in a separate measurement of the molar mass can you tell them apart.

This calculator by Arb Digital does both halves. Give it percentages or weighed masses and it returns the empirical formula with the mole ratios shown step by step; add the compound's molar mass and it returns the molecular formula too. It also runs in reverse as a formula analyser: type a written formula, including a hydrate or a nested bracket, and it parses it, reports the molar mass and the mass percent of each element, and reduces it to its empirical form.

What This Empirical Formula Calculator Does

In composition mode it converts each element's mass to moles by dividing by that element's standard atomic weight, divides every result by the smallest of them to get a ratio, and then finds the smallest whole-number multiplier that turns the whole set into integers within your chosen tolerance. It reduces the result by the greatest common divisor, writes the formula in Hill order — carbon first, hydrogen second, everything else alphabetically — and computes the empirical formula mass.

If you supply a molar mass, it divides that by the empirical formula mass, rounds to the nearest whole number, and multiplies every subscript by it to give the molecular formula. It also tells you how far the division was from a whole number, which is the fastest check on whether your molar mass and your composition came from the same substance.

In formula mode it parses what you type. Nested parentheses and brackets are handled to any depth, so K4[Fe(CN)6] resolves correctly. A hydrate dot is handled with its leading coefficient, so CuSO4·5H2O multiplies the water block by five. Element symbols are matched greedily against the real list of 118 elements, which is the only correct way to tell Co from C-then-O. Anything that is not a real symbol is rejected with a message naming the offending characters rather than being quietly skipped.

We publish a sibling tool, the molar mass calculator, and the boundary is worth stating: that page is for taking a known formula and getting its molar mass and gram-to-mole conversions. This page is for going the other way — from analytical data to a formula you did not know — and its formula mode exists only to support that, by reducing a formula to its empirical form and showing the composition an analysis of it would produce.

How to Use It

  1. Choose your starting point. Percentages or masses if you have analytical data; a written formula if you want to reduce or analyse one you already have.
  2. Enter each element's symbol and amount. Case matters. Use up to six elements and leave unneeded rows blank. Percentages need not total exactly 100 — the tool tells you what they do total.
  3. Add the molar mass if you have one. This is what upgrades the empirical formula to a molecular formula. Leave it at zero if you do not have it.
  4. Pick a rounding tolerance to match your data quality. Clean textbook numbers can use the tight setting; real combustion analysis usually needs the normal one.
  5. Read the working line. It shows the moles, the raw ratios and the multiplier applied, so you can reproduce the answer on paper.

The Formula / How It's Calculated

Four steps, and the default values walk through all of them.

Step 1 — assume 100 g and convert to moles. A percentage is a mass per 100 g of sample, so 40.00% carbon means 40.00 g of carbon. Divide by the atomic weight: 40.00 ÷ 12.011 = 3.3303 mol C. Hydrogen: 6.71 ÷ 1.008 = 6.6567 mol. Oxygen: 53.29 ÷ 15.999 = 3.3308 mol.

Step 2 — divide by the smallest. The smallest is carbon at 3.3303. C = 1.0000, H = 1.9988, O = 1.0002.

Step 3 — clear to whole numbers. Every ratio is already within 5% of an integer, so no multiplier is needed. Rounding gives C1H2O1, written CH2O. Its empirical formula mass is 12.011 + 2(1.008) + 15.999 = 30.026 g/mol.

Step 4 — scale to the molecular formula. n = molar mass ÷ empirical formula mass = 180.16 ÷ 30.026 = 6.000, which rounds to 6. Multiply every subscript by six: C6H12O6, glucose, molar mass 180.16 g/mol.

The atomic weights used throughout are the conventional standard atomic weights recommended by IUPAC's Commission on Isotopic Abundances and Atomic Weights table of standard atomic weights. Where an element has no stable isotope, the mass number of its longest-lived isotope is used instead, which is the same convention the periodic table on your wall follows. Fuller data, including the isotopic compositions those weights are averaged from, is published by NIST as Atomic Weights and Isotopic Compositions with Relative Atomic Masses.

Advertisement

When the Ratios Refuse to Be Whole Numbers

Step 3 is where the arithmetic stops being mechanical. Divide by the smallest and you will often get something like 1.00, 1.50, 3.50 rather than a clean set of integers. The rule is to multiply everything by the smallest integer that clears the fractions — 2 for halves, 3 for thirds, 4 for quarters — not to round 1.50 to 2.

Iron oxide is the classic case. An analysis giving 69.9% Fe and 30.1% O produces 1.2517 mol Fe and 1.8814 mol O. Dividing by the smaller gives Fe = 1.000, O = 1.503. Rounding oxygen to 2 would give FeO2, which does not exist. Multiplying both by 2 gives Fe2O3, which is haematite and does. The calculator does this search automatically, trying multipliers from 1 up to 12 and taking the first that brings every ratio within tolerance of an integer.

The tolerance setting is what decides when a value like 1.503 counts as three halves and when 1.97 counts as 2. Set it too tight and clean data gets multiplied out into an absurdly large formula; set it too loose and genuine halves get rounded away. Five percent is a sensible default for real measurements. If a compound is coming out with subscripts in the twenties or thirties, the answer is almost never a real molecule — it is a tolerance that is too tight for the quality of the numbers, or a percentage entered one digit wrong.

Why the Empirical Formula Is Not the Molecular Formula

This is the distinction the whole topic hangs on, and it causes more lost marks than any other point in stoichiometry.

The empirical formula gives ratio and nothing else. Formaldehyde is CH2O with a molar mass of 30.03. Acetic acid is C2H4O2, molar mass 60.05. Glucose is C6H12O6, molar mass 180.16. All three analyse to exactly 40.00% C, 6.71% H, 53.29% O. No amount of care in the elemental analysis can separate them, because they genuinely have the same composition. Only the molar mass does, and it has to come from an independent measurement — mass spectrometry, a colligative property, or a gas density determination.

Two consequences follow. First, if your calculated n is not close to a whole number, something is wrong upstream: either the molar mass belongs to a different substance, the sample is impure, or a percentage is mistyped. An n of 2.4 is not a hint to round to 2. Second, some compounds are only ever described by an empirical formula, because they are not molecular at all. Sodium chloride is written NaCl not because an NaCl molecule exists but because the crystal lattice has a one-to-one ratio. The same is true of most ionic solids and network solids like silicon dioxide.

Reading a Hydrate Correctly

A hydrate is a compound with a fixed number of water molecules built into its crystal structure, written with a raised dot: CuSO4·5H2O, copper(II) sulfate pentahydrate. The dot is not multiplication in the algebraic sense and it is not a decimal point. It separates the anhydrous compound from the water, and the number in front of the water block multiplies only that block.

Parsed out, CuSO4·5H2O contains one Cu, one S, nine O — four from the sulfate and five from the water — and ten H. Its molar mass is 249.68 g/mol, of which 63.546 is copper, so the compound is 25.45% Cu by mass. The 90.08 g/mol of water is 36.08% of the total, which is why a gravimetric determination of water of crystallisation works so well: heating drives off a mass fraction big enough to weigh accurately.

The practical trap is that an analysis of a hydrate returns the composition of the hydrated form, so feeding those percentages into a naive empirical formula calculation gives you the flattened formula CuH10O9S rather than the conventional written form. That is not wrong — it is the same substance — but no chemist writes it that way, and reconstructing the hydrate notation requires you to know that the sulfate group is intact. The formula mode on this page shows both the parsed element counts and the reduced form so the relationship is visible.

What an Elemental Analysis Actually Measures

Understanding where the numbers come from explains where their errors come from. A standard CHN analyser burns a few milligrams of sample in excess oxygen, converts all the carbon to CO2 and all the hydrogen to H2O, separates the combustion gases, and measures each. Carbon and hydrogen are therefore measured directly and are usually good to about 0.3 percentage points on a pure sample. Nitrogen is measured on the same run by reducing nitrogen oxides to N2.

Oxygen is normally not measured at all. It is calculated as whatever mass is left over after the elements that were measured are subtracted. Every error in every other channel therefore accumulates in the oxygen figure, and any residual solvent or moisture in the sample shows up as extra oxygen and extra hydrogen. This is why a compound that should analyse cleanly comes out at, say, C 39.6% and O 53.9%, and why the tolerance setting on this calculator exists. If you are computing quantities of reagent or product from the resulting formula, our moles to grams calculator and percent yield calculator carry the same figures through, and the chemical equation balancer will give you the stoichiometric coefficients once the formula is settled.

Need a project page that ranks as well as it calculates?

Arb Digital builds free, technically accurate tools like this one to earn organic traffic. If you want the same approach applied to your own site, start with the tools hub or get in touch.

Browse Free Tools Contact Arb Digital

Common Mistakes to Avoid

  • Rounding a ratio of 1.5 up to 2 — multiply the whole set by two instead, or you will invent a compound that does not exist.
  • Getting the case of a symbol wrong — Co is cobalt and CO is carbon monoxide, so a lowercase o where a capital belongs changes the answer entirely.
  • Accepting a non-integer n — if the molar mass divided by the empirical formula mass gives 2.4, the inputs disagree and no rounding will fix that.
  • Dividing percentages by the wrong atomic weight — using 1 for hydrogen instead of 1.008, or 16 for oxygen instead of 15.999, shifts every ratio just enough to break a borderline case.
  • Forgetting the oxygen in a hydrate — the water contributes both hydrogen and oxygen to the total composition, and leaving it out makes every other percentage look too high.

Related Free Tools From Arb Digital

Once you have a formula, take it forward with the molar mass calculator for gram-to-mole work, the molarity calculator for making up a solution, or the chemical equation balancer for reaction stoichiometry. The electron configuration calculator covers the structure behind the valences you are seeing, and the significant figures calculator helps you report the result to the precision your data actually supports.

Frequently Asked Questions

How do you find an empirical formula from percentages?

Assume a 100 gram sample so each percentage becomes a mass in grams. Divide each mass by that element's atomic weight to get moles. Divide every mole figure by the smallest one. If the resulting ratios are not whole numbers, multiply them all by the smallest integer that clears the fractions, then round.

What is the difference between an empirical and a molecular formula?

The empirical formula is the simplest whole-number ratio of atoms; the molecular formula is the actual count in one molecule. Formaldehyde, acetic acid and glucose all share the empirical formula CH2O but have molecular formulas CH2O, C2H4O2 and C6H12O6. Only an independent molar mass measurement can distinguish them.

Why do I need the molar mass?

Because mass percentages carry ratio information only. They tell you the proportions of the atoms but nothing about how many there are in total. Dividing the measured molar mass by the empirical formula mass gives the whole-number multiple to apply to every subscript.

What do I do when the mole ratios are not whole numbers?

Multiply every ratio by the smallest integer that makes them all whole. A ratio ending in .5 needs a multiplier of 2, .33 or .67 needs 3, and .25 or .75 needs 4. Never round 1.5 to 2 — that is how FeO2 gets written instead of Fe2O3.

Does the calculator handle hydrates and brackets?

Yes. The formula mode parses nested parentheses and square brackets to any depth, and treats a dot, full stop or asterisk as a hydrate separator with its leading coefficient applied to the block that follows. CuSO4 with five waters parses to one copper, one sulfur, nine oxygens and ten hydrogens.

What happens if I type a symbol that is not an element?

The tool stops and names the characters it could not match, rather than treating them as zero. Silent skipping is the most dangerous failure mode in a formula parser, because the arithmetic still produces a plausible-looking answer for a compound you did not enter.

Which atomic weights does it use?

The conventional standard atomic weights recommended by IUPAC's Commission on Isotopic Abundances and Atomic Weights, with the mass number of the longest-lived isotope used for elements that have no stable one. These are the same values printed on a standard periodic table.

Why do my percentages not add up to 100?

Rounding in the reported figures accounts for small gaps. A larger gap usually means an element was not measured — oxygen is normally determined by difference rather than directly, so it absorbs the error from every other channel, and residual solvent or moisture inflates both hydrogen and oxygen.

This tool is provided for educational and study use. It performs the arithmetic of composition and formula determination only, and nothing on this page is laboratory, handling, analytical or chemical safety guidance.

Advertisement
Advertisement

Take it further