Skip to main content

Empirical Formula Calculator

Find the empirical formula from percent composition or mass data. Converts each element to moles, reduces the mole ratio, and shows every step and multiplier.

Interested in Advertising?

Tell us more, and we'll get back to you.

Contact Us

About Empirical Formula Calculator

Practical context, assumptions, examples, and next steps for using the result well.

What the Empirical Formula Tells You

An empirical formula is the shorthand chemists use to describe the simplest whole-number ratio of atoms in a compound. It answers a narrow but important question: for every atom of one element, how many atoms of the others are present? Water is written H2O because there are two hydrogen atoms for every oxygen atom, and that ratio cannot be reduced any further. Hydrogen peroxide, on the other hand, has the molecular formula H2O2, but its empirical formula is simply HO because the ratio of hydrogen to oxygen is one to one.

This distinction matters because a laboratory rarely hands you a tidy molecular formula. Instead, an analysis reports how much of each element is present, usually as a mass percentage. Turning those percentages back into a formula is one of the most common tasks in an introductory chemistry course, and it is the exact job this calculator does. You enter the elements and their percentages or measured masses, and it converts everything to moles, compares the amounts, and reports the reduced ratio.

The empirical formula is also the natural bridge between a raw measurement and a fully identified substance. Once you know the simplest ratio, a single extra piece of information, the molar mass, lets you scale up to the molecular formula. Because of that, learning to find the empirical formula reliably is a skill that pays off across stoichiometry, combustion analysis, and quality control.

The Four-Step Method

Every empirical formula problem follows the same short recipe. The calculator automates it, but understanding each step helps you trust the answer and catch data-entry slips.

  1. Treat percentages as grams. Assume a 100 gram sample. A compound that is 40% carbon becomes 40 grams of carbon. If you already have measured masses, skip straight to the next step.
  2. Convert grams to moles. Divide each element's mass by its molar mass from the periodic table. Moles are the true counting unit for atoms, so this is the step that makes the elements comparable. The related molar mass calculator is handy if you want to double-check an atomic weight.
  3. Divide by the smallest. Find the smallest mole value and divide every mole amount by it. This normalizes the ratio so the least-abundant element becomes one, and the others are expressed relative to it.
  4. Round or scale to whole numbers. If the ratios are already close to integers, round them. If one lands near a clean fraction such as 1.5 or 1.33, multiply every ratio by a small factor to clear the decimal.

The whole numbers that come out of the final step become the subscripts in the formula. An element with a ratio of one is written with no subscript at all, which is why HO, not H1O1, is the correct way to display a one-to-one compound.

Worked Example

Suppose a chemical analysis reports a compound that is 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen by mass. Following the four steps by hand shows exactly what the calculator is doing behind the scenes.

ElementGrams (per 100 g)Molar massMolesDivide by smallest
Carbon40.012.013.331.00
Hydrogen6.71.0086.652.00
Oxygen53.316.003.331.00

Carbon and oxygen both give 3.33 moles, and hydrogen gives 6.65 moles, which is about twice as much. Dividing every value by the smallest, 3.33, produces a ratio of 1 carbon to 2 hydrogen to 1 oxygen. The empirical formula is therefore CH2O. That simple ratio belongs to a whole family of compounds, from formaldehyde to sugars, which is exactly why the molar mass is needed to tell them apart.

Handling Stubborn Decimals

The hardest part of these problems is the moment when dividing by the smallest number leaves you with a decimal that will not round cleanly. A ratio of 1.5 is not a rounding error; it is a genuine three-to-two relationship hiding in plain sight. The fix is to multiply every ratio in the compound by the same small whole number until all of them become integers.

If a ratio is nearMultiply all ratios byIt becomes
1.523
1.33 or 1.6734 or 5
1.25 or 1.7545 or 7

The calculator does this search for you, trying multipliers from one upward and stopping at the smallest factor that makes every subscript whole. It reports that multiplier alongside the result so you can see why the subscripts came out the way they did. Iron oxide is a classic case: an analysis of rust gives a ratio close to 1 iron to 1.5 oxygen, which doubles to Fe2O3.

Empirical Versus Molecular Formula

An empirical formula tells you the ratio, but not the size of the molecule. Glucose, ribose, and formaldehyde all share the empirical formula CH2O even though their molecules are very different. To move from the ratio to the real molecule, you need the compound's molar mass, which usually comes from a separate measurement such as mass spectrometry or freezing-point depression.

First, add up the empirical formula mass. For CH2O that is about 30 g/mol. Then divide the compound's measured molar mass by this value. Glucose has a molar mass near 180 g/mol, so 180 divided by 30 gives a factor of six. Multiplying every subscript in CH2O by six produces C6H12O6, the molecular formula of glucose. When that factor is one, the empirical and molecular formulas are identical, which is the case for water and carbon dioxide.

This scaling step is where empirical formulas connect to the wider world of reaction math. Once you have a molecular formula, you can balance equations and predict yields. The stoichiometry calculator and the percent yield calculator pick up right where the empirical formula leaves off.

Common Mistakes to Avoid

Most wrong answers trace back to a handful of predictable slips. Watching for these will save you from redoing the whole problem.

  • Skipping the mole step. Comparing grams directly is the single most common error. Sixteen grams of oxygen and sixteen grams of carbon are not the same number of atoms because the elements weigh different amounts.
  • Rounding too early. A ratio of 1.99 should become 2, but a ratio of 1.5 should not be forced to 2. Keep the decimals until you decide whether to round or to scale.
  • Mistyping element symbols. Capitalization carries meaning. Co is cobalt while CO is carbon monoxide. Enter each symbol with a capital first letter and a lowercase second letter.
  • Ignoring oxygen by difference. In combustion problems the oxygen percentage is often the leftover after carbon and hydrogen are accounted for. Subtract the known percentages from 100 before entering the value.

Where It Is Used

Empirical formulas are not just a classroom exercise. Whenever a new or unknown substance is analyzed, elemental analysis reports its composition as percentages, and the empirical formula is the first structural clue a chemist writes down. Pharmaceutical labs use it to confirm that a synthesized batch matches the intended compound, and materials scientists use it to characterize minerals, oxides, and alloys.

The technique is also central to combustion analysis, where an organic sample is burned and the resulting carbon dioxide and water are weighed to back-calculate the carbon and hydrogen content. In environmental and food chemistry, the same math verifies the composition of hydrates and fertilizers. In every case the workflow is the same: measure the masses, convert to moles, reduce the ratio, and read off the simplest formula. Because this calculator shows each intermediate value instead of just the final answer, it also works as a study aid when you are learning the method.

Frequently Asked Questions

What is an empirical formula?

An empirical formula shows the simplest whole-number ratio of atoms in a compound, not the actual number of atoms per molecule. Glucose has the molecular formula C6H12O6, but its empirical formula is CH2O because the ratio of carbon to hydrogen to oxygen reduces to 1:2:1. The empirical formula captures composition, while the molecular formula captures the true molecule size.

How do you calculate an empirical formula from percent composition?

Assume a 100 gram sample so each percentage becomes grams. Divide each element's grams by its molar mass to get moles, then divide every mole value by the smallest one to find the ratio. If the ratios are not close to whole numbers, multiply them all by a small factor such as 2 or 3 until they are. The resulting whole numbers become the subscripts.

Why do I multiply the ratios by a whole number?

After dividing by the smallest number of moles, some ratios land near values like 1.5, 1.33, or 1.25 instead of whole numbers. These decimals mean the true ratio uses larger integers. Multiplying every ratio by 2 turns 1.5 into 3, by 3 turns 1.33 into 4, and by 4 turns 1.25 into 5. The calculator searches for the smallest multiplier that makes all subscripts whole.

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

The empirical formula is the reduced ratio, and the molecular formula is a whole-number multiple of it. To find the molecular formula, divide the compound's known molar mass by the empirical formula mass to get a factor, then multiply every empirical subscript by that factor. For example, if the empirical formula is CH2O (30 g/mol) and the compound is 180 g/mol, the factor is 6, giving C6H12O6.

Can I enter measured masses instead of percentages?

Yes. Switch the input type to mass and enter the grams of each element found by analysis. The math is identical because percent composition already assumes a 100 gram sample. Whether you provide grams or percentages, the calculator converts each amount to moles and reduces the ratio the same way.

Why don't my percentages add up to exactly 100%?

Experimental data and textbook problems often round each element to a few decimals, so a total of 99.8% or 100.2% is normal. Small rounding differences do not change the empirical formula because the ratio between elements stays the same. If the total is far from 100%, check whether an element was missed or a value was mistyped.

How do I handle a compound with oxygen found by difference?

Many combustion problems report carbon and hydrogen directly and list oxygen as the remaining mass. Add the known percentages, subtract from 100%, and enter that value as the oxygen percentage. Then run the calculation normally. This is common for organic compounds analyzed by combustion, where oxygen is not measured directly.