Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Empirical & Molecular Formula Calculator

From percentages, masses or combustion data to a formula, with every rounding shown.

Science No upload Works offline Free, no sign-up
Data

Type each element and its mass percentage. Tick “by difference” for one element to use 100 % minus the others.

    g/mol
    How close to a whole number a ratio must be.
    Empirical formula —

    From masses to whole numbers

    Which multiplier?

    Each ratio times k, and how far the worst one is from a whole number. The first k within the tolerance is used.

      How it was worked out

      Next steps

      About the Empirical & Molecular Formula Calculator

      Turn composition data into a formula. Type the mass percentage or the mass of each element, or the masses of CO₂ and H₂O from a combustion analysis, and get the empirical formula — the simplest whole-number ratio of atoms. Add the compound’s molar mass to get the molecular formula. One element can be found by difference (often oxygen), and other elements measured separately can be added to combustion data.

      The calculator shows every step: the moles of each element from IUPAC (CIAAW 2024) atomic weights, the ratios to the smallest, and a table of multipliers so you can see why, for example, 1 : 1.5 becomes 2 : 3. A separate Hydrate mode finds the water of crystallisation — the x in CuSO₄·xH₂O — from the masses before and after heating.

      How to use it

      1. Choose the data you have: Mass percent, Masses, Combustion analysis or Hydrate (heating).
      2. Type each element (symbol or name) with its value; use Add element for more rows and tick by difference for the one that makes up the rest.
      3. For combustion analysis, type the sample mass and the masses of CO₂ and H₂O; oxygen is found by difference unless you untick it.
      4. Optionally type the molar mass to get the molecular formula, and choose how strictly ratios are rounded (± 0.10 by default).
      5. Read the formula, the step table and the multiplier table; copy the result when you are done.

      Examples

      From masses
      Input
      34.97 g Fe and 15.03 g O
      Result
      Fe₂O₃

      Ratio 1 : 1.500, multiplied by 2 — OpenStax Chemistry 2e Example 3.11.

      From percentages
      Input
      27.29 % C, 72.71 % O
      Result
      CO₂

      OpenStax Example 3.12.

      Molecular formula
      Input
      74.02 % C, 8.710 % H, 17.27 % N; molar mass 162.3 g/mol
      Result
      Empirical C₅H₇N (81.118 g/mol), n = 2, molecular C₁₀H₁₄N₂ (nicotine)

      OpenStax Example 3.13.

      Caffeine
      Input
      49.47 % C, 5.201 % H, 28.84 % N, 16.48 % O; 194.2 g/mol
      Result
      C₄H₅N₂O → C₈H₁₀N₄O₂
      Combustion analysis
      Input
      0.00126 g sample → 0.00394 g CO₂ and 0.00161 g H₂O
      Result
      CH₂ (polyethylene)

      OpenStax §4.5. Oxygen by difference is 0.4 % of the sample — measurement error — so none is included.

      A hydrate
      Input
      CuSO₄: 2.500 g before heating, 1.598 g after
      Result
      x = 5.00 → CuSO₄·5H₂O

      Common uses

      • Homework on empirical and molecular formulas, with the working to compare against.
      • Interpreting elemental (CHN) or combustion analysis results in the lab.
      • Lab reports on the formula of a hydrate by heating to constant mass.
      • Checking whether analysis data fit a proposed formula.

      How an empirical formula is found

      1. Turn every value into grams: with percentages, imagine 100 g of compound, so 40.0 % C is 40.0 g.
      2. Divide each mass by the element’s atomic weight to get moles.
      3. Divide every number of moles by the smallest one.
      4. If the ratios are not all close to whole numbers, multiply them all by the smallest whole number k that makes them so, then round.

      The molecular formula is a whole-number multiple of the empirical formula: n = molar mass ÷ empirical formula mass, and every subscript is multiplied by n (OpenStax Chemistry 2e §3.2). CH₂O (30.026 g/mol) with a molar mass of 180.16 g/mol gives n = 6 and C₆H₁₂O₆.

      Choosing the multiplier

      Typical decimal endings and the multiplier that clears them:

      • .5 → × 2 (1.5 → 3)
      • .33 or .67 → × 3 (1.33 → 4, 2.67 → 8)
      • .25 or .75 → × 4 (1.25 → 5)
      • .2, .4, .6 or .8 → × 5 (1.2 → 6)
      • .17 or .83 → × 6 (1.17 → 7)

      The calculator tries k = 1 to 12 and takes the first one that brings every ratio within the tolerance of a whole number (± 0.10 unless you choose otherwise). The multiplier table shows the worst distance for each k, so a borderline case is easy to judge. Measured data are never perfect: values such as 4.998 and 7.008 are rounded to 5 and 7.

      Combustion analysis

      Burning a compound of C, H (and O) in excess oxygen turns all its carbon into CO₂ and all its hydrogen into H₂O (OpenStax §4.5). So m(C) = m(CO₂) × 12.011 ÷ 44.009 and m(H) = m(H₂O) × 2.016 ÷ 18.015. Any other element measured separately (N, S, a halogen) can be added as a mass, and oxygen is whatever is left of the sample. If that remainder is under 1 % of the sample it is treated as measurement error and left out.

      Hydrates

      Heating a hydrate to constant mass drives off its water of crystallisation. The water lost is the mass before minus the mass after; dividing the moles of water by the moles of anhydrous salt gives x in salt·xH₂O. If you weighed in a crucible, type its empty mass and it is subtracted. x is rounded to a whole number — or, below 4, to a half when it is clearly closer, as in CaSO₄·½H₂O. The result assumes that heating removed all the water and nothing else.

      Sources

      Limitations

      • An empirical formula gives only the ratio of atoms; it cannot tell isomers apart (glucose and fructose are both C₆H₁₂O₆), and the molecular formula needs a separately measured molar mass.
      • Rounding depends on the quality of the data. Poor data can round to a wrong formula: use the multiplier table and the tolerance to judge.
      • Combustion mode assumes complete combustion and that all hydrogen ends up as water.
      • The hydrate mode assumes heating removed all the water without decomposing the salt.

      Privacy

      Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

      Frequently asked questions

      How do I find an empirical formula from percentages?

      Treat the percentages as grams in 100 g, convert each to moles, divide by the smallest, and multiply to whole numbers. 40.0 % C, 6.71 % H and 53.28 % O give 3.330, 6.657 and 3.330 mol — a 1 : 2 : 1 ratio, so CH₂O.

      What is the difference between empirical and molecular formulas?

      The empirical formula is the simplest whole-number ratio of atoms (CH₂O); the molecular formula is the actual number of atoms in a molecule (C₆H₁₂O₆ for glucose), a whole-number multiple of it. To get it you need the molar mass.

      What do I do when a ratio is 1.5 or 1.33?

      Multiply every ratio by the same small whole number: 1.5 by 2 (1 : 1.5 → 2 : 3), 1.33 by 3 (→ 3 : 4), 1.25 by 4. The multiplier table on the page shows which k works.

      Why do my percentages not add up to 100 %?

      Usually one element was not measured — very often oxygen. Tick “by difference” for it, so it gets 100 % minus the others. A small shortfall can also be measurement error; the page warns when the sum is more than 1 % away from 100.

      How does combustion analysis give a formula?

      All the carbon in the sample becomes CO₂ and all the hydrogen becomes H₂O, so their masses give the masses of C and H; oxygen is the rest of the sample. 0.00394 g CO₂ and 0.00161 g H₂O from 0.00126 g of polyethylene give CH₂.

      How do I find the formula of a hydrate?

      Weigh it, heat it until the mass stops changing, and weigh again. Moles of water lost ÷ moles of anhydrous salt = x. 2.500 g of copper sulfate hydrate leaving 1.598 g of CuSO₄ gives x = 5.00, so CuSO₄·5H₂O.

      Quick answers and tool search

      Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.