Empirical Formula Calculator
Enter the percent by mass or the grams of each element to find a compound's empirical formula, the simplest whole number ratio of its atoms. The tool divides each amount by the element's standard atomic mass to get moles, divides every mole value by the smallest, then scales the ratios by the smallest integer up to 6 that makes them whole. It shows the formula, a moles-and-ratio table, and any multiplier it used.
How to find an empirical formula
- Select Percent by mass or Mass in grams at the top.
- In each row, type an element symbol like C, H or Fe, then its amount.
- Click Add element for more rows, or Remove to delete one.
- Read the empirical formula in the highlighted box.
- Check the Element, Moles and Whole number ratio table, then click Copy.
Examples
Glucose from percent composition
40% C, 6.7% H, 53.3% O
CH2O (ratio 1:2:1)
Iron oxide, ratios doubled to whole numbers
69.9% Fe, 30.1% O
Fe2O3 (multiplier 2)
Ethane from measured masses (Mass in grams)
24 g C, 6 g H
CH3 (empirical of C2H6)
Frequently asked questions
What is an empirical formula?
An empirical formula is the simplest whole number ratio of atoms in a compound. For example glucose, C6H12O6, has the empirical formula CH2O, and hydrogen peroxide, H2O2, reduces to HO.
How is it calculated from percent composition?
Treat the percentages as grams in a 100 gram sample, divide each by its atomic mass to get moles, divide every value by the smallest, then scale to whole numbers. Choosing Percent by mass does exactly this.
What if a ratio comes out near 1.5 or 1.33?
The tool multiplies every ratio by the smallest integer that makes them whole, up to 6. So 1.5 is doubled and 1.33 is tripled, turning 69.9% Fe and 30.1% O into Fe2O3 rather than FeO1.5.
Can I enter grams instead of percentages?
Yes. Choose Mass in grams and type the measured mass of each element. The math is identical, since moles are mass divided by atomic mass either way. For example 24 g C and 6 g H give CH3.
How many elements can I add?
As many as you need. Click Add element to append rows and Remove to drop them, though at least one row always stays. Element order is preserved, so the formula follows the order you enter, such as C then H then O.
Which element symbols are recognised?
All 118 elements by their standard symbol, case sensitive, so C, Cl, Fe and Na work but lowercase c or misspellings are rejected as an unknown symbol. Atomic masses follow IUPAC conventional values.
Why did I get an unexpected multiplier?
The tool accepts a scaled ratio as whole when it lands within 0.12 of an integer, which absorbs rounding in textbook percentages. Rough or inconsistent percentages can push a value past that window and force a larger multiplier, so use accurate figures.
Is the empirical formula the same as the molecular formula?
Not always. The molecular formula is a whole number multiple of the empirical formula. Glucose is six times CH2O. To find the molecular formula you also need the compound's molar mass, which this tool does not use.
Does the calculation happen on my device?
Yes. Everything runs in your browser with a built-in table of atomic masses, so nothing you enter is sent to a server. It works offline once the page has loaded.
Learn more
- Empirical formula versus molecular formula
What separates the simplest ratio from the true molecular formula, and how to get from one to the other using the compound's molar mass.
Related tools
Percent Composition Calculator
Calculate the percent composition by mass of each element in a chemical formula. Enter a compound like H2O or CO2 and get the molar mass breakdown.
Molar Mass Calculator
Calculate the molar mass and molecular weight of any chemical formula. Get a full per element breakdown for compounds like H2O, NaCl, H2SO4 and hydrates.
Mole Calculator
Convert between moles, mass and particles. Enter mass and molar mass, or moles, or a particle count, and get the rest using Avogadro's number.
555 Timer Calculator
Calculate 555 timer astable frequency, period, high and low times and duty cycle from R1, R2 and the timing capacitor. Free oscillator design helper.
Absolute Humidity Calculator
Calculate absolute humidity in grams of water vapor per cubic meter from air temperature and relative humidity. Fast, free and works in your browser.
Allele Frequency Calculator
Find allele frequencies from genotype counts. Enter the number of AA, Aa and aa individuals to get the A and a allele frequencies and allele totals.