Empirical formula calculator

Type each element with its percent or mass, like C 40, H 6.71, O 53.29, to get the simplest whole-number ratio of atoms.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter elements with percent or grams.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Moles of each element = mass ÷ atomic weight; divide all by the smallest, then multiply by the smallest whole number (1 to 10) that brings every ratio within 0.1 of an integer.

Example

Inputs: Elements with percent or grams = C 40, H 6.71, O 53.29. Result: Empirical formula: CH2O; Empirical formula mass: 30.026 g/mol.

C 40, H 6.71, O 53.29
CH2O

Limits and caveats

  • Imprecise lab data can give a wrong formula; ratios within 0.1 of a whole number are accepted.
  • Elements appear in the order you typed them, and the true molecular formula needs the molar mass as well.

Questions about this tool

Do I enter percentages or grams?

Either works, because only the ratio between moles matters.

Why Fe2O3 and not FeO1.5?

A 1 to 1.5 ratio is multiplied by 2 to make whole numbers, giving Fe2O3.

What if oxygen is not given?

If oxygen is the remainder, subtract the other percentages from 100 and enter the result for O.