Empirical Formula Calculator

Calculate the empirical formula from elemental composition (C, H, O)

What Is an Empirical Formula?

An empirical formula represents the simplest whole-number ratio of atoms of each element in a compound. It is the most reduced form of a chemical formula, expressing the fundamental composition without indicating the actual number of atoms in a molecule. For example, the empirical formula of glucose (C₆H₁₂O₆) is CH₂O, while the empirical formula of hydrogen peroxide (H₂O₂) is HO.

Determining the empirical formula is a critical step in chemical analysis. When a chemist performs elemental analysis on an unknown compound, the raw data consists of mass percentages or masses of each element. Converting these masses to mole ratios and then to the simplest whole-number ratios yields the empirical formula. This information, combined with the molar mass, allows determination of the molecular formula.

This calculator focuses on carbon, hydrogen, and oxygen (C, H, O) compounds, which represent the vast majority of organic molecules. The method works by converting mass inputs to moles using atomic masses (C = 12.011 g/mol, H = 1.008 g/mol, O = 15.999 g/mol), finding the smallest mole value, dividing all mole values by this minimum, and rounding to the nearest whole numbers. The result is the empirical formula CH₂O, C₂H₅O, or similar, depending on the input composition.

Empirical Formula Determination

Moles = Mass / Atomic Mass; Ratio = Moles / Minimum Moles

Where:

  • Mass= Mass or mass percentage of each element (g or %)
  • Atomic Mass= Atomic mass of the element (C=12.011, H=1.008, O=15.999 g/mol)
  • Moles= Number of moles of each element
  • Ratio= Simplest whole-number ratio of moles

Step-by-Step Calculation Method

The empirical formula is determined through a systematic process that converts mass data to atomic ratios. The method follows these precise steps:

  1. Convert masses to moles: Divide the mass of each element by its atomic mass. For carbon: moles C = mass C / 12.011. For hydrogen: moles H = mass H / 1.008. For oxygen: moles O = mass O / 15.999.
  2. Find the minimum mole value: Identify the smallest number among the calculated mole values. This becomes the reference for normalization.
  3. Calculate mole ratios: Divide each element's mole value by the minimum. This yields the relative ratios of each element.
  4. Round to whole numbers: If the ratios are close to whole numbers (within 0.1), round directly. If a ratio is close to X.5, multiply all ratios by 2 to eliminate the fraction. For example, if the ratio is 1.5, multiply all by 2 to get 3.

The calculator applies an intelligent rounding algorithm that handles common fractional ratios. If a ratio deviates from the nearest integer by less than 0.1, it rounds to that integer. If it is within 0.1 of a half-integer (X.5), it multiplies all ratios by 2. This ensures accurate empirical formulas even when the input masses produce non-integer ratios.

How to Use This Calculator

This calculator determines the empirical formula of a compound from the mass or mass percentage of carbon, hydrogen, and oxygen. Follow these steps:

  1. Enter Carbon (C) mass: Input the mass in grams or the mass percentage of carbon in the compound.
  2. Enter Hydrogen (H) mass: Input the mass in grams or the mass percentage of hydrogen.
  3. Enter Oxygen (O) mass: Input the mass in grams or the mass percentage of oxygen.
  4. View results: The calculator displays the empirical formula, the mole ratios for each element, and the conversion steps.

You can enter masses in grams (if you have absolute amounts) or mass percentages (if you have relative composition). The calculator treats both inputs identically because the ratio is what matters, not the absolute amounts. For mass percentages, the values should sum to 100% for accuracy. For mass inputs, any consistent unit (grams, milligrams, etc.) works because the ratios cancel the units.

Common Empirical Formulas

Many familiar compounds have empirical formulas that differ from their molecular formulas. Understanding this distinction is important for interpreting elemental analysis data:

CompoundMolecular FormulaEmpirical FormulaMolar Mass (g/mol)
GlucoseC₆H₁₂O₆CH₂O180.16
Acetic acidC₂H₄O₂CH₂O60.05
FormaldehydeCH₂OCH₂O30.03
Hydrogen peroxideH₂O₂HO34.01

Note that glucose, acetic acid, and formaldehyde all share the same empirical formula (CH₂O) despite having very different chemical properties. This illustrates why the molecular formula (which gives the actual number of atoms) is needed in addition to the empirical formula for complete chemical identification.

Real-World Applications

Empirical formula determination is fundamental to analytical chemistry. Elemental analysis (also called combustion analysis) measures the mass percentages of C, H, and N in an organic compound. These percentages are converted to an empirical formula using the method implemented in this calculator. The empirical formula is then combined with the molar mass (from mass spectrometry) to determine the molecular formula.

In pharmaceutical development, confirming the empirical formula of a drug candidate is a regulatory requirement. The FDA and other agencies require elemental analysis data as part of the drug characterization package. Discrepancies between the expected and observed empirical formulas can indicate impurities, solvates, or decomposition products.

Materials science uses empirical formulas to characterize new compounds. When synthesizing novel materials like metal-organic frameworks (MOFs), perovskites, or coordination polymers, elemental analysis confirms the stoichiometry of the product. The empirical formula guides the determination of the crystal structure and properties.

In forensic chemistry, empirical formula determination helps identify unknown substances. The composition of explosives, drugs, or other materials can be compared to known empirical formulas to narrow down possible identities. This information, combined with other analytical techniques, supports forensic investigations.

Worked Examples

Glucose Composition Analysis

Problem:

A compound contains 40.0% C, 6.7% H, and 53.3% O by mass. Determine the empirical formula.

Solution Steps:

  1. 1Assume 100 g sample: C = 40.0 g, H = 6.7 g, O = 53.3 g
  2. 2Moles C = 40.0 / 12.011 = 3.33 mol
  3. 3Moles H = 6.7 / 1.008 = 6.65 mol
  4. 4Moles O = 53.3 / 15.999 = 3.33 mol
  5. 5Minimum = 3.33; ratios: C = 1.00, H = 2.00, O = 1.00

Result:

Empirical formula = CH₂O. This matches glucose (C₆H₁₂O₆) and several other carbohydrates.

Unknown Organic Acid

Problem:

A compound contains 39.99 g C, 6.71 g H, and 53.29 g O. Determine the empirical formula.

Solution Steps:

  1. 1Moles C = 39.99 / 12.011 = 3.330 mol
  2. 2Moles H = 6.71 / 1.008 = 6.657 mol
  3. 3Moles O = 53.29 / 15.999 = 3.331 mol
  4. 4Minimum = 3.330; ratios: C = 1.000, H = 2.000, O = 1.000

Result:

Empirical formula = CH₂O. The compound could be acetic acid (C₂H₄O₂), formaldehyde (CH₂O), or another CH₂O-containing compound.

Hydrogen Peroxide

Problem:

A compound contains 5.89% H and 94.11% O. Determine the empirical formula.

Solution Steps:

  1. 1Assume 100 g sample: H = 5.89 g, O = 94.11 g
  2. 2Moles H = 5.89 / 1.008 = 5.84 mol
  3. 3Moles O = 94.11 / 15.999 = 5.88 mol
  4. 4Minimum = 5.84; ratios: H = 1.00, O = 1.01 ≈ 1

Result:

Empirical formula = HO. The molecular formula is H₂O₂ (hydrogen peroxide), with molar mass = 34.01 g/mol.

Tips & Best Practices

  • Enter mass percentages that sum to 100% for the most accurate results.
  • The calculator works with any consistent mass unit (g, mg, etc.) because only ratios matter.
  • If the result has fractional subscripts, the calculator automatically multiplies to get whole numbers.
  • Combine the empirical formula with molar mass to determine the molecular formula.
  • Common empirical formula CH₂O covers glucose, acetic acid, formaldehyde, and many other compounds.
  • Small deviations from integer ratios are normal due to experimental measurement uncertainty.

Frequently Asked Questions

The empirical formula shows the simplest whole-number ratio of atoms in a compound (e.g., CH₂O for glucose). The molecular formula shows the actual number of atoms in one molecule (e.g., C₆H₁₂O₆ for glucose). The molecular formula is always a whole-number multiple of the empirical formula. To determine the molecular formula, you need both the empirical formula and the molar mass.
This calculator is specifically designed for C, H, and O compounds, which represent the majority of organic molecules. For compounds containing nitrogen, sulfur, halogens, or other elements, you would need a calculator with those elements included. However, the underlying method (mass → moles → ratios → rounding) is the same regardless of which elements are present.
When the mole ratios produce half-integers (like 1.5 or 2.5), multiplying all ratios by 2 converts them to whole numbers. For example, if the ratios are C = 1.5, H = 2.5, O = 1, multiplying by 2 gives C = 3, H = 5, O = 2, yielding the empirical formula C₃H₅O₂. This occurs because empirical formulas must have whole-number subscripts.
The accuracy of the empirical formula depends on the accuracy of the mass measurements. Typical elemental analysis has an uncertainty of ±0.3% for each element. Small deviations from exact integer ratios are expected due to experimental error. The calculator's rounding algorithm (tolerance of 0.1) accommodates normal experimental variation while still identifying the correct formula.
If the mass percentages don't sum to 100%, it may indicate the presence of additional elements (like nitrogen or water of crystallization) or experimental error. For the most accurate results, ensure the three elements (C, H, O) account for approximately 100% of the sample mass. If other elements are present, they should be included in the analysis.

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Empirical Formula Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Chemistry: The Central Science

by Brown, LeMay, Bursten

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.