Empirical Formula Calculator Formula

Understand the math behind the empirical formula calculator. Each variable explained with a worked example.

Formulas Used

Moles of A

moles_a = mass_a / atomic_mass_a

Moles of B

moles_b = mass_b / atomic_mass_b

Ratio of A (divide by smallest)

ratio_a = (mass_a / atomic_mass_a) / ((mass_a / atomic_mass_a) < (mass_b / atomic_mass_b) ? (mass_a / atomic_mass_a) : (mass_b / atomic_mass_b))

Ratio of B (divide by smallest)

ratio_b = (mass_b / atomic_mass_b) / ((mass_a / atomic_mass_a) < (mass_b / atomic_mass_b) ? (mass_a / atomic_mass_a) : (mass_b / atomic_mass_b))

Variables

VariableDescriptionDefault
mass_aMass of Element A(g)40
atomic_mass_aAtomic Mass of A(g/mol)12.011
mass_bMass of Element B(g)6.7
atomic_mass_bAtomic Mass of B(g/mol)1.008

How It Works

How to Find the Empirical Formula

Steps

1. Convert mass of each element to moles: moles = mass / atomic mass 2. Divide each by the smallest number of moles 3. Round to the nearest whole number to get subscripts

Worked Example

A compound has 40 g C and 6.7 g H.

mass_a = 40atomic_mass_a = 12.011mass_b = 6.7atomic_mass_b = 1.008
  1. 01Moles C = 40 / 12.011 = 3.33
  2. 02Moles H = 6.7 / 1.008 = 6.65
  3. 03Divide by smallest (3.33): C = 1, H = 2
  4. 04Empirical formula: CH2

Frequently Asked Questions

What is an empirical formula?

The simplest whole-number ratio of atoms in a compound. For example, glucose (C6H12O6) has empirical formula CH2O.

How is empirical different from molecular?

The molecular formula is a whole-number multiple of the empirical formula. You need the actual molar mass to find which multiple.

What if the ratios are not whole numbers?

Multiply all ratios by the smallest integer that makes them whole. For example, 1:1.5 becomes 2:3.

Ready to run the numbers?

Open Empirical Formula Calculator