Empirical and Molecular Formula Calculator

Enter elements with percentages or masses, or combustion data, and the molar mass to get the empirical formula, the multiplier and the molecular formula.

Runs in your browser. Your files never leave your device. See how to check

…

How to do it

  1. 1
    Enter elements

    One per line with percent or mass.

  2. 2
    Enter molar mass

    For the molecular formula.

  3. 3
    Or enter combustion data

    Sample, CO₂ and H₂O masses.

  4. 4
    Read the formulas

    Empirical, multiplier and molecular.

About this tool

The empirical formula gives the simplest whole-number ratio of atoms in a compound; the molecular formula gives the actual numbers. Chemists find them from elemental analysis: percentages by mass, or the CO₂ and water produced by burning a sample. This calculator turns either kind of data into the empirical formula, scales it to the molecular formula when you know the molar mass, and shows the mole ratios so you can see how the answer was found.

Who this is for

Chemistry students solving composition problems, lab students interpreting elemental analysis and teachers.

Entering data

Write one element per line with its percentage or mass, for example "C 40.0". Percentages do not have to add up to exactly 100; masses can be in any unit as long as they are consistent.

The method

1. Divide each mass by the element's atomic weight to get moles. 2. Divide all mole numbers by the smallest. 3. If the ratios are not close to whole numbers, multiply by 2, 3, 4 … until they are (within 0.1). 4. Round to the empirical formula.

Molecular formula

Divide the molar mass (from mass spectrometry or colligative properties) by the empirical formula mass and round: that is the multiplier. Glucose (180.16 g/mol) has the empirical formula CH₂O (30.03 g/mol), so the multiplier is 6: C₆H₁₂O₆.

Combustion analysis

Burning a compound of C, H and O converts all carbon to CO₂ and all hydrogen to H₂O. Carbon mass = CO₂ mass × 12.011 / 44.009; hydrogen mass = H₂O mass × 2.016 / 18.015; oxygen is found by difference from the sample mass. Enter the sample, CO₂ and H₂O masses to use this mode.

Tricky ratios

Ratios such as 1.5, 1.33 or 1.25 mean multiplying by 2, 3 or 4. Iron oxide with 69.94 % Fe gives Fe : O = 1 : 1.5, so the formula is Fe₂O₃. Measurement errors of a few tenths of a percent can blur ratios; check that the result makes chemical sense.

Good practice

Use at least three significant figures in your data and check that the molecular formula's molar mass matches the measured value.

Other elements

Nitrogen, sulfur and halogens are measured by other methods in elemental analysis; enter their percentages as additional lines, using the element symbol at the start of each line.

Worked example

A compound with 40.00 % C, 6.71 % H and 53.29 % O gives moles of 3.330, 6.657 and 3.331, a ratio of 1 : 2 : 1, so the empirical formula is CH₂O (30.03 g/mol). With a molar mass of 180.16 g/mol the multiplier is 6 and the molecular formula C₆H₁₂O₆.

Limits

Assumes accurate analysis data; isomers share formulas, so the formula alone does not identify a compound. Not an official analysis report.

Worked example

40.0 % C, 6.71 % H, 53.3 % O gives CH₂O; with 180 g/mol, C₆H₁₂O₆.

Quick facts

Frequently asked questions

What is an empirical formula?

The simplest whole-number ratio of atoms in a compound.

How do I get the molecular formula?

Multiply the empirical formula by molar mass divided by empirical mass.

What if a ratio is 1.5?

Multiply all ratios by 2.

How does combustion analysis work?

Carbon is measured as CO₂, hydrogen as H₂O, oxygen by difference.

Do percentages have to add to 100?

No, small differences are fine.

Is my data stored?

No. Everything is calculated in your browser.

Guides for this tool

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages