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)
Working
| Element | Given (%) | Atomic mass | Moles | ÷ smallest | × 1 | Subscript |
|---|---|---|---|---|---|---|
| CCarbon | 40 | 12.011 | 3.33028 | 1 | 1 | 1 |
| HHydrogen | 6.72 | 1.008 | 6.66667 | 2.0019 | 2.0019 | 2 |
| OOxygen | 53.28 | 15.999 | 3.33021 | 1 | 1 | 1 |
- 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
Choose whether your data is percent by mass or a mass in grams.
- 2
Type an element symbol, name or atomic number in each row and its amount beside it, adding rows as needed.
- 3
Optionally enter the compound's molar mass to get the molecular formula as well.
- 4
Read the empirical formula, its formula mass and the molecular formula at the top.
- 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
Percent Composition Calculator
Find the mass percent of every element in a chemical formula. Enter a compound and get the full composition table plus grams per element in any sample size.
Molar Mass Calculator
Work out the molar mass of any chemical formula in g/mol, with a per-element breakdown. Handles brackets, hydrates and a grams-to-moles converter.
Stoichiometry Calculator
Type a balanced equation, give the amount of one substance, and get moles and grams of every other reactant and product with the working shown.
Interactive Periodic Table
Explore all 118 elements in the standard layout. Click any element for its atomic weight, group, period, block, electron configuration and state.
Electron Configuration Calculator
Get the full and noble-gas electron configuration of any element or ion, with an orbital diagram, valence count and the last electron's quantum numbers.