Chemistry Calculator

Empirical and Molecular Formula Calculator

Updated Oct 29, 2026 100% Free Mobile Friendly

Empirical and Molecular Formula Calculator

Empirical Formula Calculator

Enter each element, its atomic mass, and its percentage or mass. The calculator converts the values to moles and finds the simplest whole-number formula.

Enter correct atomic masses and positive values. Percentages should total about 100%. Small rounding differences are allowed.

How to Calculate Empirical Formula and Molecular Formula

An empirical formula shows the simplest whole-number ratio of atoms in a compound. A molecular formula shows the actual number of atoms of each element in one molecule.

Steps to Calculate an Empirical Formula

  1. Write the mass or percentage of each element.
  2. Divide each mass by that element’s atomic mass to calculate moles.
  3. Divide every mole value by the smallest mole value.
  4. Convert the ratios into whole numbers. Multiply all ratios by 2, 3, or another suitable number when needed.

How to Calculate a Molecular Formula

  1. Find the empirical formula first.
  2. Calculate the empirical formula mass by adding the atomic masses in the formula.
  3. Divide the molecular molar mass by the empirical formula mass.
  4. Multiply every empirical formula subscript by the resulting whole-number multiplier.
Molecular formula calculation

Multiplier (n) = Molecular molar mass ÷ Empirical formula mass

Molecular formula = empirical formula with every subscript multiplied by n.

Empirical Formula vs. Molecular Formula

FeatureEmpirical formulaMolecular formula
MeaningSmallest whole-number atom ratioActual number of atoms in a molecule
Glucose exampleCH₂OC₆H₁₂O₆
Needs molar mass?Not alwaysUsually, to derive it from the empirical formula
Can both be the same?YesYes, when the multiplier is 1

Worked Examples

Example 1: Calculate an Empirical Formula from Percentages

A compound contains 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen. Assume a 100 g sample. The masses are 40.0 g carbon, 6.7 g hydrogen, and 53.3 g oxygen.

ElementMass (g)Atomic massMoles (approx.)Ratio
C40.012.0113.331
H6.71.0086.652
O53.315.9993.331

The simplest ratio is 1:2:1. Therefore, the empirical formula is CH₂O.

Example 2: Calculate a Molecular Formula

The empirical formula is CH₂O and the molecular molar mass is 180.16 g/mol.

  • Empirical formula mass = 12.011 + (2 × 1.008) + 15.999 = about 30.03 g/mol.
  • Multiplier = 180.16 ÷ 30.03 = about 6.
  • Multiply each subscript in CH₂O by 6.

The molecular formula is C₆H₁₂O₆.

Example 3: When Both Formulas Are the Same

Water has the molecular formula H₂O. The ratio of hydrogen to oxygen is already 2:1, the smallest whole-number ratio. Its empirical formula is also H₂O.

Common Mistakes to Avoid

  • Do not divide percentages directly by one another. Convert each element’s value to moles first.
  • Do not round mole values too early. Keep several decimal places until the ratio becomes clear.
  • If a ratio is close to 1.5, multiply all ratios by 2. If it is close to 1.33 or 1.67, multiplying by 3 may help.
  • Do not assume the empirical formula and molecular formula are always different.
  • Use the molecular molar mass of the same compound and keep units consistent.

Frequently Asked Questions

What is an empirical formula?

An empirical formula gives the simplest whole-number ratio of atoms in a compound. For example, CH₂O is the empirical formula of glucose.

What is a molecular formula?

A molecular formula gives the actual number of each type of atom in one molecule. Glucose has the molecular formula C₆H₁₂O₆.

Can the empirical formula equal the molecular formula?

Yes. They match when the molecular formula is already in its simplest whole-number ratio, as with water, H₂O.

How do I find moles from percent composition?

Assume a 100 g sample. Treat each percentage as grams, then divide each mass by the element’s atomic mass.

Why do I multiply a mole ratio by 2 or 3?

Multiplying every ratio by the same number can turn fractional ratios into whole numbers without changing the relative proportions.

Can I find a molecular formula without molar mass?

You can usually find the empirical formula, but you cannot determine the unique molecular formula from the empirical formula alone. You need the molecular molar mass or other suitable information.

Disclaimer: This educational calculator uses the atomic masses you enter and rounded numerical methods. Check your working and follow your course or laboratory instructions.

Free & instant results
Zain Bin Shabbir
Written by

Zain Bin Shabbir

Zain Bin Shabbir is a content creator and website publisher with 2 years of experience in SEO, web content, and practical online tools. He focuses on creating clear, useful, and user-friendly resources that simplify everyday calculations.