# Empirical Formula Calculator - From Percent Composition or Combustion Analysis

> Find the empirical and molecular formula from mass percent, element masses or combustion data (CO₂, H₂O, N₂), with a whole-number ratio search and full working.

- URL: https://qilingtools.com/en/math/empirical-formula
- Category: Chemistry Tools (https://qilingtools.com/en/chemistry)
- Tags: [Chemistry](https://qilingtools.com/en/tags/chemistry)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

An empirical formula gives the simplest whole-number ratio of atoms in a compound; the molecular formula is a whole-number multiple of it. The method has four steps: treat mass percentages as grams in a 100 g sample, divide by atomic weights to get moles, divide everything by the smallest number of moles, and multiply by a small integer until every ratio is a whole number. For glucose (40.00% C, 6.71% H, 53.29% O): n(C) = 40.00 ÷ 12.011 = 3.330, n(H) = 6.71 ÷ 1.008 = 6.657, n(O) = 53.29 ÷ 15.999 = 3.331, a 1 : 2.00 : 1 ratio, so the empirical formula is CH₂O (30.03 g/mol); with a molar mass of 180.16 g/mol, n = 6 and the molecular formula is C₆H₁₂O₆. Ratios like 1.33, 1.5 or 1.25 must not be rounded — multiply by 3, 2 or 4 instead: ascorbic acid (40.92% C, 4.58% H, 54.50% O) gives H 1.334, so ×3 gives C₃H₄O₃. This calculator accepts mass percentages (with an option to make the remainder oxygen), masses in grams, or combustion analysis: from the sample mass and the masses of CO₂, H₂O and optionally N₂ it works out C, H and N, with oxygen by difference. It searches multipliers 1 to 10 within a tolerance you choose, flags near-misses like x.5 or x.33, and shows the full working table; add a known molar mass to get the molecular formula, written in Hill order for carbon compounds.

## How to use

1. Choose an input: mass percent, element masses or combustion analysis, then enter data or pick an example
2. Read the moles, ratios and multiplier to get the empirical formula
3. Enter a known molar mass for the molecular formula, then copy it or check it in the molar mass calculator

## Features

- Three inputs: mass percent, element masses in grams, combustion analysis (CO₂, H₂O, N₂)
- Remainder-to-oxygen (or any element) option for percentages
- Oxygen by difference in combustion analysis, with a warning for inconsistent data
- Whole-number ratio search over multipliers 1–10 with tolerance 0.05, 0.1 or 0.15
- Explains near-fractions such as 1.5, 1.33 and 1.25 and why a multiplier is needed
- Molecular formula from molar mass, with a warning if n is not close to a whole number
- Full table: mass, atomic weight, moles, ratio, scaled ratio and subscript
- Hill-order output with subscripts and one-click copy

## FAQ

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

The empirical formula only shows the simplest whole-number ratio of atoms; the molecular formula shows the actual number of atoms in one molecule and is n times the empirical formula. Glucose has the empirical formula CH₂O and the molecular formula C₆H₁₂O₆ (n = 6). Elemental analysis alone gives only the empirical formula — you also need the molar mass (from mass spectrometry, gas density and so on) to find n = M ÷ empirical formula mass.

### What if the mole ratios are not whole numbers?

Ratios within about ±0.1 of a whole number can be rounded, since lab data have some error. Ratios near 1.5, 1.33, 1.67 or 1.25 mean you must multiply everything by 2, 3 or 4 — for example 1 : 1.33 × 3 = 3 : 4. The calculator tries multipliers 1 to 10 and picks the first one that puts every ratio within the tolerance, and it tells you which element forced the multiplier.

### How does combustion analysis give the element masses?

On complete combustion all carbon ends up in CO₂ and all hydrogen in H₂O, so m(C) = m(CO₂) × 12.011 ÷ 44.009 and m(H) = m(H₂O) × 2 × 1.008 ÷ 18.015; nitrogen is measured as N₂. Oxygen is the sample mass minus C, H and N. For a 0.2000 g sample giving 0.2998 g CO₂ and 0.1227 g H₂O, that is 0.0818 g C, 0.0137 g H and 0.1045 g O, so the empirical formula is CH₂O.

### How do I go the other way, from a formula to percent composition?

Mass percent of an element = number of atoms × atomic weight ÷ molar mass × 100%. Enter the formula in the molar mass calculator on this site to get the percent composition of every element — it is also a quick way to check the formula found here.

## Related tools

- [Significant Figures Calculator](https://qilingtools.com/en/math/significant-figures): Free online sig fig calculator: count significant figures digit by digit, round to N sig figs or decimals with six rounding modes, and compute by sig fig rules.
- [Chemical Equation Balancer](https://qilingtools.com/en/math/chemical-equation): Balance chemical equations by the algebraic method: smallest whole-number coefficients, brackets, hydrates, ionic charges, electrons, atom and charge checks.
- [Molar Mass Calculator](https://qilingtools.com/en/math/molar-mass): Molar mass of any formula with IUPAC atomic weights: brackets and hydrates, mass percent of each element, grams ↔ moles ↔ particles and solution molarity.
- [Interactive Periodic Table](https://qilingtools.com/en/math/periodic-table): Interactive periodic table of all 118 elements: colour by category, block, electronegativity, atomic mass, phase or melting point; search and click for details.
- [pH Calculator](https://qilingtools.com/en/math/ph): Free pH calculator for strong and weak acids and bases, polyprotic acids, salts and buffers, with an exact charge-balance solution and species plots.
- [Titration Curve](https://qilingtools.com/en/math/titration): Free acid-base titration curve simulator: exact curves for strong, weak and polyprotic acids and bases, equivalence-point pH, the jump and indicator picks.
- [Gas Law Calculator](https://qilingtools.com/en/math/gas-law): Free gas law calculator: solve PV=nRT for any variable, combined gas laws, gas density, Dalton's partial pressures, gas over water and van der Waals Z.
- [Solution & Dilution Calculator](https://qilingtools.com/en/math/solution): Free dilution calculator: solve C1V1=C2V2, convert molarity, % w/w, ppm and molality, mix solutions, plan serial dilutions and dilute stock acids.
