Instructional videos are coming to Albert.Join the waitlist
Tools
Practice
Tools

Empirical Formula Calculator (and Molecular Formula, with Steps)

This free empirical formula calculator turns mass percent or grams for each element into an empirical formula for chemistry and AP® Chemistry students, and adds the molecular formula when you know the molar mass, with a mole ratio table and every step shown.

Loading the empirical formula calculator…

How to use the Empirical Formula Calculator

  1. Choose how your data is given. Pick Mass percent for percent composition, or Grams for masses from an experiment.
  2. Enter each element and its amount. Type a symbol (C, Fe) or a name (carbon, iron), one per row. Use “+ Add an element” for more rows. In percent mode you can leave one element’s percent blank, and the calculator fills in the rest of 100%.
  3. Add the molar mass if you have it. It’s optional. With it, you also get the molecular formula.
  4. Read the results. You’ll see the empirical formula, the molecular formula if you gave a molar mass, a mole ratio table and each step of the math.

Worked example

Vitamin C (ascorbic acid) is 40.92% carbon, 4.58% hydrogen and 54.50% oxygen by mass, and its molar mass is 176.12 g/mol. What are its empirical and molecular formulas?

  1. Assume 100 g: that gives 40.92 g C, 4.58 g H and 54.50 g O.
  2. Convert to moles: 40.92 ÷ 12.011 = 3.4069 mol C, 4.58 ÷ 1.008 = 4.5437 mol H, and 54.50 ÷ 15.999 = 3.4065 mol O.
  3. Divide by the smallest (3.4065): C 1.000, H 1.334, O 1.000.
  4. Clear the decimal: 1.334 isn’t close to a whole number, so multiply everything by 3: C 3.000, H 4.001, O 3.000. The empirical formula is C3H4O3.
  5. Find n: the empirical formula mass is 3(12.011) + 4(1.008) + 3(15.999) = 88.062 g/mol, and 176.12 ÷ 88.062 = 2.000.
  6. Molecular formula: double every subscript to get C6H8O6.

Click the Vitamin C example in the calculator to see the same numbers.

Empirical vs. molecular formulas

An empirical formula gives the simplest whole-number ratio of atoms in a compound. A molecular formula gives the actual number of each atom in one molecule. The molecular formula is always a whole-number multiple of the empirical formula, and sometimes the multiple is 1.

Compound Molecular formula Empirical formula n
Glucose C6H12O6 CH2O 6
Acetic acid C2H4O2 CH2O 2
Hydrogen peroxide H2O2 HO 2
Benzene C6H6 CH 6
Water H2O H2O 1

Notice that glucose and acetic acid share the empirical formula CH2O. Percent composition alone can’t tell them apart, because the same ratio of atoms gives the same percentages. You need the molar mass to know which compound you have.

How to find an empirical formula, step by step

A rhyme that many chemistry teachers use covers the whole method: percent to mass, mass to mole, divide by small, multiply till whole.

  1. Percent to mass. Pretend you have exactly 100 g of the compound, so each percent becomes grams. If your data is already in grams, skip this step.
  2. Mass to mole. Divide each element’s mass by its atomic mass from the periodic table.
  3. Divide by small. Divide every mole value by the smallest one. The element with the fewest moles gets a 1.
  4. Multiply till whole. If any ratio isn’t within about 0.1 of a whole number, multiply all of them by the same small whole number until they are.

Step 4 is where most mistakes happen. The decimal part of a ratio tells you what to multiply by:

Ratio ends in about… Multiply by Example
.5 2 1.5 × 2 = 3
.33 or .67 3 1.33 × 3 = 4
.25 or .75 4 1.25 × 4 = 5
.2, .4, .6 or .8 5 1.2 × 5 = 6
.17 or .83 6 1.17 × 6 = 7

Never round 1.5 to 2 or 1.33 to 1. Those aren’t rounding errors, they’re real fractions, and rounding them changes the formula. Iron oxide with Fe 69.9% and O 30.1% gives a ratio of Fe 1 : O 1.50. Rounding would give FeO or FeO2, but doubling gives the right answer, Fe2O3.

Keep at least four significant figures in the mole values while you work. If you round them too early, a ratio that should be 2.00 can drift to 1.88 or 2.12, far enough from a whole number to send you looking for a multiplier you don’t need.

Starting from grams instead of percent

Lab data usually comes as masses, not percentages. Say you heat 1.271 g of copper in air and the product weighs 1.591 g. The extra 0.320 g is oxygen. Skip the 100 g step and go straight to moles: 1.271 ÷ 63.546 = 0.02000 mol Cu and 0.320 ÷ 15.999 = 0.02000 mol O. The ratio is 1 : 1, so the oxide is CuO. Switch the calculator to Grams and enter the two masses to check it.

Combustion analysis works the same way with one extra step. Burning a compound of carbon, hydrogen and oxygen turns all its carbon into CO2 and all its hydrogen into H2O, so you work back from those masses to grams of C and H. Oxygen is whatever mass is left over. If you’re working in percentages, leave oxygen’s box blank and the calculator fills in the rest of 100% for you.

From empirical formula to molecular formula

To get the molecular formula, you need the compound’s molar mass, which usually comes from a mass spectrometer or a gas density measurement. Then:

  1. Add up the empirical formula mass. For CH2O, that’s 12.011 + 2(1.008) + 15.999 = 30.026 g/mol.
  2. Divide the molar mass by it: n = molar mass ÷ empirical formula mass. For glucose, 180.16 ÷ 30.026 = 6.000.
  3. Multiply every subscript in the empirical formula by n: C6H12O6.

The value of n should come out very close to a whole number. If it doesn’t, either the molar mass or the empirical formula is off. The calculator checks this and tells you when the two don’t fit together. The Molar Mass Calculator gives the molar mass of any formula if you want to check your answer the other way around.

Empirical formulas on the AP® Chemistry exam

In AP® Chemistry, empirical formulas are part of Topic 1.3, Elemental Composition of Pure Substances, in Unit 1. Questions often give percent composition or the masses of elements from an experiment and ask for the empirical formula, or they give the empirical formula and a molar mass and ask for the molecular formula. Write out the mole values and the ratios, not just the final formula, so a grader can follow your reasoning. For more practice, see Percent Composition and Empirical Formulas: Chemistry Review and the AP® Chemistry review on the same topic. The AP® Chemistry Unit 1 cheat sheet sums up the unit on one page, and the AP® Chemistry score calculator shows how your section scores turn into a 1 to 5.

FAQ

How do you find an empirical formula from percent composition?

Assume 100 g of the compound so each percent becomes grams. Divide each mass by the element’s atomic mass to get moles, then divide every mole value by the smallest one. If the ratios are whole numbers, they’re the subscripts. C 40.0%, H 6.7%, O 53.3% gives a 1 : 2 : 1 ratio, so the empirical formula is CH2O.

What do you do if the mole ratio isn't a whole number?

Multiply every ratio by the smallest whole number that makes them all whole. A ratio ending near .5 means multiply by 2, near .33 or .67 by 3, near .25 or .75 by 4, and near .2 by 5. Fe 69.9%, O 30.1% gives Fe 1 : O 1.50, and doubling it gives Fe2O3.

How do you get the molecular formula from the empirical formula?

Divide the molar mass by the empirical formula mass to get a whole number n, then multiply every subscript by n. CH2O has an empirical formula mass of 30.026 g/mol, and glucose is 180.16 g/mol, so n = 6 and the molecular formula is C6H12O6.

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

The empirical formula is the simplest whole-number ratio of atoms in a compound. The molecular formula is the actual number of each atom in one molecule. They can be the same, as in H2O, or the molecular formula can be a multiple, as in C6H12O6 (empirical formula CH2O).

Can I round 1.5 to 2 in an empirical formula?

No. Rounding 1.5 up or down changes the formula. Only round when a ratio is within about 0.1 of a whole number, like 1.996 to 2. For 1.5, multiply all the ratios by 2 instead.