Skip to content
ScienceQuest

Empirical Formula Calculator

CalculatorSchool Updated

Support ScienceQuest on Buy Me a Coffee (opens in a new tab)

Work out the empirical formula from percent composition or masses, then the molecular formula from the molar mass, with the unrounded mole ratio shown.

Calculator

Composition

Either works, and they run through the same arithmetic: dividing by the smallest mole figure cancels any common scale.

Composition alone can only give the simplest whole-number ratio. CH2O, C2H4O2 and C6H12O6 all have the same percentages, so the molar mass is what separates them.

Molecular formula C6H12O6

Empirical formula CH2O

180.16 / 30.026 = 6.0001, so every subscript is multiplied by 6.

Element%ArMolesRatioSubscript
C4012.0113.330311
H6.711.0086.65671.99892
O53.2915.9993.33081.00021

Working, step by step

  1. Taking 100 g of the compound, each percentage is a mass in grams.
  2. n(C) = 40 / 12.011 = 3.3303 mol
  3. n(H) = 6.71 / 1.008 = 6.6567 mol
  4. n(O) = 53.29 / 15.999 = 3.3308 mol
  5. Dividing every one by the smallest, n(C) = 3.3303 mol.
  6. C ratio = 3.3303 / 3.3303 = 1
  7. H ratio = 6.6567 / 3.3303 = 1.9989
  8. O ratio = 3.3308 / 3.3303 = 1.0002
  9. Atoms of each element in one molecule: the molar mass times that element’s share of the total mass, divided by its atomic mass.
  10. C per molecule = 180.16 × 40 / 100 / 12.011 = 5.9998
  11. H per molecule = 180.16 × 6.71 / 100 / 1.008 = 11.993
  12. O per molecule = 180.16 × 53.29 / 100 / 15.999 = 6.0008
  13. Each is within 0.0072 of a whole number. Dividing those counts by 6, the largest number that divides them all, gives the empirical formula.
  14. Empirical formula: CH2O
  15. M(CH2O) = 30.026 g/mol
  16. molar mass / empirical molar mass = 180.16 / 30.026 = 6.0001
  17. Molecular formula: C6H12O6

Ratios are shown before rounding on purpose. A ratio of 1.4998 says the data is good and the answer needs doubling; 1.47 says something is wrong with the figures.

Cite this tool

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

On the syllabus: AP Chemistry, Unit 1: Atomic Structure and Properties; MCAT, 4E: Atoms, nuclear decay, electronic structure, and atomic chemical behavior.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

ratioi=mi/Ar,imin⁡j(mj/Ar,j)\text{ratio}_i = \frac{m_i / A_{r,i}}{\min_j (m_j / A_{r,j})}

Proust (1797), law of definite proportions, with the method of OpenStax Chemistry 2e, section 3.2

The equation as an image to reuse
Empirical Formula Calculator: the equation ratio i = (m i / A r,i)/min j(m j / A r,j).
The equation the calculator is built on, with its source. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

How do you calculate an empirical formula?

To calculate an empirical formula from masses or percentage composition: convert each element’s mass to moles by dividing by its molar mass, divide all mole quantities by the smallest mole value, and if a ratio is a fraction such as 1.5, multiply every ratio by the same small whole number (such as 2, 3, 4 or 5) rather than rounding, to reach the simplest whole-number ratio.

Four steps, and only one of them is hard

An empirical formula is the simplest whole-number ratio of atoms in a compound, found by converting each element’s mass to moles, dividing every mole figure by the smallest and scaling the ratios to whole numbers. Every empirical formula question is the same sequence. Take the percentage of each element as a mass in grams, which is what "per 100 grams" means. Divide each mass by that element’s relative atomic mass to get moles. Divide every mole figure by the smallest of them. Then find the whole number that turns those ratios into subscripts.

The first three steps are arithmetic. The fourth is where marks are lost, because a ratio of 1.5 is not a 2, and treating it as one turns Fe2O3 into FeO2. Rounding it down to 1 is no better and gives FeO. That is why the ratio column above shows the unrounded value next to the subscript it produced.

Worked example: 40.00% C, 6.71% H, 53.29% O

Per 100 g there are 40.00 g of carbon, 6.71 g of hydrogen and 53.29 g of oxygen. Dividing by 12.011, 1.008 and 15.999 gives 3.3303, 6.6567 and 3.3308 moles. The smallest is carbon at 3.3303, so the ratios are 1, 1.9989 and 1.0002.

Those are already whole numbers to within 0.002, so the empirical formula is CH2O and the empirical formula mass is 30.03 g/mol. This is as far as composition can take you. The compound might be formaldehyde at 30.03 g/mol, acetic acid at 60.05, or glucose at 180.16, and all three have exactly these percentages. Supplying 180.16 gives 180.16 / 30.03 = 6, so every subscript multiplies by six and the molecular formula is C6H12O6.

What the ratio is telling you

A ratio close to a neat fraction is the signal to multiply rather than round. 1.5 means multiply everything by 2, 1.333 by 3, 1.25 by 4 and 1.2 by 5. Those are the common cases, and some compounds need more: heptane, C7H16, has 2.286 hydrogens per carbon and needs 7, and sucrose, C12H22O11, needs 11.

A ratio that fits no small multiplier, like 2.14 or 1.62, can mean a percentage was mistyped, the figures were rounded harder than the question intended, or the sample was not pure. It can also be a real compound: 2.14 is tetradecane’s 15/7 rounded to three figures, the C7H15 of C14H30. Composition alone cannot tell those apart, so this tool searches multipliers up to 12, says so when none fits, and works the subscripts out from the molar mass when you enter one.

Percentages, masses, and combustion data

Masses in grams work exactly as well as percentages, and go through the same arithmetic, because dividing by the smallest mole figure cancels any common scale. That matters for the most common lab version of this question: a mass of metal that gains mass on heating in air. Weigh 2.50 g of copper, heat it to constant mass at 3.13 g, and the 0.63 g gained is the oxygen. Enter both and the answer is CuO.

Combustion analysis needs one conversion first. The carbon dioxide and water are products, not the sample, so convert each to the mass of its element: multiply the CO2 mass by 12.011 / 44.009, and the H2O mass by 2.016 / 18.015. Then enter those masses here. If the compound also contains oxygen, subtract the carbon and hydrogen masses from the sample mass rather than using the remainder checkbox, which assumes percentages that total 100.

The order of the elements

The formula comes out with the elements in the order you entered them. That is deliberate. The strict convention, Hill notation, puts carbon first, then hydrogen, then everything else alphabetically, and in a compound with no carbon lists every element, hydrogen included, alphabetically. That is correct for a chemical database and renders calcium carbonate as CCaO3, sulfuric acid as H2O4S and hydrogen chloride as ClH. Since questions list the elements in the order the expected answer uses, typing them in as given produces the formula as written.

Common mistakes

  • Rounding 1.5 up. The single biggest error here. Multiply the whole set by 2 rather than rounding one member of it.
  • Dividing by molar mass instead of atomic mass. The conversion in step two uses each element’s own relative atomic mass, not the molar mass of the compound.
  • Using percentages by moles or by volume. Everything here assumes percent by mass. Composition data for a gas mixture is often by volume, and that is a mole ratio already.
  • Forgetting the oxygen. Questions that give only carbon and hydrogen for an organic compound usually intend the rest to be oxygen. The checkbox adds it by difference and states the figure it used in the working.
  • Stopping at the empirical formula. If the question gives a molar mass or a relative molecular mass, it wants the molecular formula, and the two are only the same when the multiplier happens to be 1.
  • Trusting a multiplier that came from imprecise data. If the ratios needed a large multiplier to become whole, check the input, or enter the molar mass to confirm it, before writing the answer down.

Sources

Worked examples

Each one runs through the calculator above, so the arithmetic here is the arithmetic it does.

What is the empirical formula of an iron oxide with 34.97 g of iron and 15.03 g of oxygen?

  1. n(Fe) = 34.97 / 55.845 = 0.6262 mol
  2. n(O) = 15.03 / 15.999 = 0.93943 mol
  3. Dividing every one by the smallest, n(Fe) = 0.6262 mol.
  4. Fe ratio = 0.6262 / 0.6262 = 1
  5. O ratio = 0.93943 / 0.6262 = 1.5002
  6. Multiplying every ratio by 2 makes them whole numbers, within 0.00044.
  7. Empirical formula: Fe2O3
  8. M(Fe2O3) = 159.69 g/mol

OpenStax Chemistry 2e Example 3.11 asks this of hematite, an oxide of iron found in many iron ores. Divide the 0.6262 mol of iron and 0.93943 mol of oxygen by the smaller and you get 1 to 1.5002, so double both for 2 to 3.

What is nicotine’s molecular formula, 74.02% C, 8.71% H, 17.27% N, if 40.57 g is 0.2500 mol?

  1. Taking 100 g of the compound, each percentage is a mass in grams.
  2. n(C) = 74.02 / 12.011 = 6.1627 mol
  3. n(H) = 8.71 / 1.008 = 8.6409 mol
  4. n(N) = 17.27 / 14.007 = 1.233 mol
  5. Dividing every one by the smallest, n(N) = 1.233 mol.
  6. C ratio = 6.1627 / 1.233 = 4.9983
  7. H ratio = 8.6409 / 1.233 = 7.0083
  8. N ratio = 1.233 / 1.233 = 1
  9. Atoms of each element in one molecule: the molar mass times that element’s share of the total mass, divided by its atomic mass.
  10. C per molecule = 162.3 × 74.02 / 100 / 12.011 = 10.002
  11. H per molecule = 162.3 × 8.71 / 100 / 1.008 = 14.024
  12. N per molecule = 162.3 × 17.27 / 100 / 14.007 = 2.0011
  13. Each is within 0.024 of a whole number. Dividing those counts by 2, the largest number that divides them all, gives the empirical formula.
  14. Empirical formula: C5H7N
  15. M(C5H7N) = 81.118 g/mol
  16. molar mass / empirical molar mass = 162.3 / 81.118 = 2.0008
  17. Molecular formula: C10H14N2

OpenStax Chemistry 2e Example 3.13 gives the sample as a mass and an amount, so divide first and type 40.57 g / 0.2500 mol = 162.3 g/mol into the molar mass box. The percentages give C5H7N at 81.1 g/mol, and 162.3 is twice that, so every subscript doubles.

What is vitamin C’s empirical formula at 40.92% C, 4.58% H and the rest oxygen?

  1. Oxygen by difference: 100 − 45.5 = 54.5 percent.
  2. Taking 100 g of the compound, each percentage is a mass in grams.
  3. n(C) = 40.92 / 12.011 = 3.4069 mol
  4. n(H) = 4.58 / 1.008 = 4.5437 mol
  5. n(O) = 54.5 / 15.999 = 3.4065 mol
  6. Dividing every one by the smallest, n(O) = 3.4065 mol.
  7. C ratio = 3.4069 / 3.4065 = 1.0001
  8. H ratio = 4.5437 / 3.4065 = 1.3338
  9. O ratio = 3.4065 / 3.4065 = 1
  10. Multiplying every ratio by 3 makes them whole numbers, within 0.0015.
  11. Empirical formula: C3H4O3
  12. M(C3H4O3) = 88.062 g/mol

A hydrogen ratio of 1.33 means thirds, so multiply every ratio by 3. PubChem gives vitamin C, ascorbic acid, as C6H8O6 at 176.12 g/mol, twice C3H4O3: enter that molar mass to get the molecular formula.

Common questions

What is the difference between an empirical and a molecular formula?

The empirical formula is the simplest whole-number ratio of atoms; the molecular formula is how many atoms are actually in one molecule. Composition alone can only give the ratio, because CH₂O, C₂H₄O₂ and C₆H₁₂O₆ all contain 40.00 percent carbon by mass. The molar mass is what separates them: divide it by the empirical formula mass and multiply every subscript by the whole number that comes out.

Why divide by the smallest number of moles?

Because it turns the mole figures into a ratio against 1, which is the easiest form to spot a whole-number pattern in. Any divisor would preserve the ratio, but dividing by the smallest guarantees no value below 1 and makes a result like 1.5 or 1.333 immediately recognizable as needing doubling or tripling.

My ratio came out as 1.5, so do I round it to 2?

No. Rounding 1.5 to 2 changes the compound: Fe₂O₃ becomes FeO₂. Multiply every ratio by 2 instead, and by 3 for a 1.333, by 4 for a 1.25 and by 5 for a 1.2. This tool searches multipliers up to 12 and tells you which one it used. Some ordinary compounds need more than 5: heptane, C₇H₁₆, needs 7, and sucrose, C₁₂H₂₂O₁₁, needs 11. When you enter the molar mass, the tool works the subscripts out from it directly.

Do the percentages have to add up to 100?

Not exactly. Rounded exam data often totals 99.8 or 100.1, and it makes no difference, because dividing every mole figure by the smallest cancels any common scale. This calculator reports the total rather than normalizing it, so a genuine gap is visible. If a large amount is missing, the question probably expects the remainder to be oxygen, which is what the checkbox does.