Skip to content

Empirical Formula Calculator

Type the mass percent (or grams) of each element to get the simplest whole-number…

Type the mass percent (or grams) of each element to get the simplest whole-number formula, and the molar mass to get the molecular formula, with the mole ratios worked out.

Leave one percentage blank to work it out by difference from 100%.

ExampleMolecular formula

C6H8O6

The empirical formula is C₃H₄O₃ (88.062 g/mol); 176.12 ÷ 88.062 = 2, so the molecule is 2 of those units.

Type your own composition.

Mole ratios × 3, against whole numbers
  • C3.000 → 3
  • H4.001 → 4
  • O3.000 → 3
Empirical formula
C₃H₄O₃
Empirical formula mass
88.062 g/mol
Molecule = empirical ×
2
How this works: 5 sources,

How this works

Method

Assume 100 g of the compound, so each mass percent becomes grams. Divide each element’s grams by its atomic weight to get moles. Vitamin C is 40.92% carbon, 4.58% hydrogen and 54.50% oxygen, which gives 40.92 ÷ 12.011 = 3.407 mol C, 4.58 ÷ 1.008 = 4.544 mol H and 54.50 ÷ 15.999 = 3.406 mol O. Full method

How it’s tested

2 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.

Privacy

On your device. Nothing you enter or open leaves this browser. About privacy labels

Changes

  • First published: molar mass with each element’s share of the mass and atoms, grams to moles and back, percent composition, empirical formula, limiting reagent, theoretical and percent yield.

Every change on What’s new

How we make toolsReport a mistake

How to find an empirical formula

Assume 100 g of the compound, so each mass percent becomes grams. Divide each element’s grams by its atomic weight to get moles. Vitamin C is 40.92% carbon, 4.58% hydrogen and 54.50% oxygen, which gives 40.92 ÷ 12.011 = 3.407 mol C, 4.58 ÷ 1.008 = 4.544 mol H and 54.50 ÷ 15.999 = 3.406 mol O.

Divide every mole amount by the smallest one, here 3.406, to get the ratio 1 : 1.334 : 1. When a ratio ends in about .33, .5, .25 or .67, multiply everything by the small whole number that clears it: × 3 gives 3 : 4 : 3, so the empirical formula is C3H4O3. The tool tries multipliers from 1 to 10 and takes the first that brings every ratio within 0.1 of a whole number.

The empirical formula is only the simplest ratio. The molecule can be any whole-number multiple of it, and the molar mass decides which. C3H4O3 weighs 88.06 g/mol; vitamin C’s measured molar mass is about 176.12 g/mol, twice that, so its molecular formula is C6H8O6 (176.12 g/mol).

moles = mass ÷ atomic weight; ratio = moles ÷ smallest; × k until whole

Different compounds, same empirical formula

Molecular formulas and the simplest ratios they reduce to, with the multiple n. Compounds that share a row’s empirical formula have exactly the same percent composition.

Molecular formulas and the simplest ratios they reduce to, with the multiple n. Compounds that share a row’s empirical formula have exactly the same percent composition.
CompoundMolecular formulaEmpirical formulanMolar mass (g/mol)
FormaldehydeCH₂OCH₂O130.026
Acetic acidC₂H₄O₂CH₂O260.052
Lactic acidC₃H₆O₃CH₂O390.078
RiboseC₅H₁₀O₅CH₂O5150.13
GlucoseC₆H₁₂O₆CH₂O6180.156
AcetyleneC₂H₂CH226.038
BenzeneC₆H₆CH678.114
StyreneC₈H₈CH8104.152
Hydrogen peroxideH₂O₂HO234.014
EthaneC₂H₆CH₃230.07
Show all 13 rows
OctaneC₈H₁₈C₄H₉2114.232
Vitamin CC₆H₈O₆C₃H₄O₃2176.124
HydrazineN₂H₄NH₂232.046

Common questions

What if the ratios aren’t close to whole numbers?

Multiply them all by 2, 3, 4 and so on until they are. A ratio of 1.5 needs × 2, 1.33 or 1.67 needs × 3, and 1.25 or 1.75 needs × 4. If nothing up to 10 works, the percentages were probably rounded too far.

What does “by difference” mean?

Lab analyses often measure every element except oxygen and take oxygen as whatever is left of 100%. Leave one percentage blank here and it is filled in that way.

Can I use grams instead of percentages?

Yes. Only the ratios matter, so grams from a combustion analysis or a reaction work the same way. Switch to Grams above the boxes.

How do I get the molecular formula?

Divide the molar mass by the empirical formula’s mass and round to a whole number n, then multiply every subscript by n. Type the molar mass in the box and it is done for you.