BYTETOOLS

Empirical Formula Calculator

Turn percent composition or measured masses into an empirical formula, then scale it to the molecular formula using the compound's molar mass.

Composition (percent by mass)

CH₂O
Empirical formula
30.026 g/mol
Empirical formula mass
C₆H₁₂O₆
Molecular formula

Working

ElementGiven (%)Atomic massMoles÷ smallest× 1Subscript
CCarbon4012.0113.33028111
HHydrogen6.721.0086.666672.00192.00192
OOxygen53.2815.9993.33021111
  • Moles = amount ÷ atomic mass. A percentage is treated as grams in a 100 g sample.
  • Every mole value is divided by the smallest of them.
  • Empirical formula: CH₂O 30.026 g/mol
  • Molecular formula: 180.16 ÷ 30.026 = 6.0001 → rounds to 6, giving C₆H₁₂O₆ at 180.156 g/mol

Elements are written in Hill order — carbon first, hydrogen second, everything else alphabetically — which is the convention used by CAS and most journals. Atomic masses are IUPAC standard atomic weights, so results carry the same uncertainty as those published values.

What is the Empirical Formula Calculator?

An empirical formula is the simplest whole-number ratio of atoms in a compound. Divide each element's mass percent by its atomic mass, divide all the results by the smallest one, then multiply until every ratio is close to a whole number.

  • Accepts percent by mass or masses in grams, with any number of elements
  • Handles ratios that land on .5, .33 or .25 by multiplying up automatically
  • Scales to the molecular formula from a known molar mass
  • Full working table: moles, ratio, multiplier and subscript per element
  • Formulas written in Hill order, the convention CAS and journals use
  • Warns when percentages do not add up to 100 or ratios refuse to round

How to use the Empirical Formula Calculator

  1. 1

    Choose whether your data is percent by mass or a mass in grams.

  2. 2

    Type an element symbol, name or atomic number in each row and its amount beside it, adding rows as needed.

  3. 3

    Optionally enter the compound's molar mass to get the molecular formula as well.

  4. 4

    Read the empirical formula, its formula mass and the molecular formula at the top.

  5. 5

    Open the working table to see moles, the divide-by-smallest ratios and the final subscripts.

About the Empirical Formula Calculator

The ByteTools Empirical Formula Calculator converts a percent composition or a set of measured masses into the simplest whole-number formula for a compound. Enter 40.00% carbon, 6.72% hydrogen and 53.28% oxygen and it returns CH2O, showing the moles, the divide-by-smallest step and the multiplier it used to clear the fraction.

Give it the compound's molar mass as well and it scales the empirical formula up to the molecular formula — 180.16 g/mol on that same composition gives C6H12O6, glucose. This is the standard combustion-analysis question in general chemistry, and the same arithmetic a lab uses to identify an unknown from elemental analysis data.

Everything is computed in your browser using a built-in table of IUPAC standard atomic weights. No numbers are sent anywhere, so the calculator is private, instant and available offline once the page has loaded.

Frequently asked questions

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

The empirical formula is the simplest whole-number atom ratio, while the molecular formula counts the atoms actually present in one molecule. Glucose has the empirical formula CH2O but the molecular formula C6H12O6 — the same ratio, six times over.

How do you find an empirical formula from percent composition?

Treat the percentages as grams in a 100 gram sample, divide each by that element's atomic mass to get moles, then divide every mole value by the smallest one. If the ratios land near a half or a third, multiply them all by 2 or 3 to reach whole numbers.

Why do my percentages need to add up to 100?

They do not strictly have to, because only the relative amounts matter. But a large gap usually means an element is missing from your data — oxygen is very often found by difference in combustion analysis, so a shortfall near that value is a strong hint.

What if the ratio comes out at something like 1.33?

That is a three-in-one fraction, so multiply every ratio by 3. This tool tries multipliers from 1 up to 8 and picks the smallest one that brings every ratio within about a tenth of a whole number, telling you which multiplier it used.

Can two different compounds share an empirical formula?

Yes, and it happens often. Formaldehyde, acetic acid and glucose all reduce to CH2O. That is exactly why the molar mass is needed to pin down which molecule you actually have.

Related tools