Empirical Formula Calculator
Enter the composition of a compound and find its simplest whole-number formula.
Enter each element's percentage by mass. The values are treated as a 100 g sample and must total approximately 100%.
Empirical formula
CH₂O
Simplest whole-number ratio: C : H : O = 1 : 2 : 1
| Element | Amount | Atomic mass | Moles | Ratio |
|---|---|---|---|---|
| C | 40.00 g | 12.011 | 3.330 | 1.000 |
| H | 6.71 g | 1.008 | 6.657 | 1.999 |
| O | 53.29 g | 15.999 | 3.331 | 1.000 |
Smallest mole value: 3.330
Whole-number ratio: 1 : 2 : 1
Empirical formula: CH₂O
How it works
From composition to formula
Enter the composition
Add one row per element with its percentage by mass or measured mass in grams. Percentages must total approximately 100%, each element appears only once, and at least two elements are needed.
Convert to moles
Divide each mass by its atomic mass: moles = mass ÷ atomic mass. Shared atomic weights are used at full precision.
Divide by the smallest
Divide every mole value by the smallest one: ratio = element moles ÷ smallest mole value.
Find whole numbers
Test small integer multipliers up to 10. The calculator selects the smallest multiplier that brings every normalized ratio within the configured tolerance of a whole number. If no validated ratio is found, the values are flagged instead of forcing a formula.
What is an empirical formula?
An empirical formula is the simplest whole-number ratio of the elements in a compound.
For example, glucose has the empirical formula CH₂O. Its molecular formula, C₆H₁₂O₆, is a separate question answered by a separate tool.
Concepts
Ratios you can trust
Ratios, not rounded guesses
A ratio of 1.50 becomes 2 : 3 by doubling, not 1 : 2 by rounding each number on its own. Rounding independently is the classic empirical-formula mistake.
Percents mean a 100 g sample
40.00% C is treated as 40.00 g of carbon in a 100 g sample. The sample size cancels out, so only the ratios matter.
Small multipliers only
The calculator tests multipliers from 1 to 10 in order and uses the smallest validated whole-number ratio. This avoids arbitrarily rounding each ratio on its own.
Empirical is not molecular
CH₂O says the ratio is 1 : 2 : 1. It does not say how many atoms a molecule holds. Molecular formulas arrive in a later tool.
Examples
Try an example
| Example | Composition | Result |
|---|---|---|
| Glucose | C 40.00%, H 6.71%, O 53.29% | |
| Iron oxide | Fe 69.94%, O 30.06% | |
| Carbon dioxide | C 27.29%, O 72.71% |
FAQ
Frequently asked questions
What is an empirical formula?
The simplest whole-number ratio of the elements in a compound. Glucose, for example, has the empirical formula CH₂O.
How is an empirical formula calculated?
Convert each amount to moles, divide every mole value by the smallest one, then scale the ratios to whole numbers with the smallest validated multiplier within the configured tolerance.
Should I enter percents or grams?
Either. Percentages are treated as grams in a 100 g sample, so both modes follow the same steps from there.
What does no clear whole-number ratio mean?
The values are too inconsistent for a validated small ratio, so no formula is forced. Check the measurements or percentages and try again.
Why multiply by 2, 3, or 4?
Some ratios only become whole together: 1 : 1.5 doubles to 2 : 3, and 1 : 1.33 triples to 3 : 4. The calculator tests small multipliers in order and uses the smallest validated whole-number ratio.
My percentages do not total 100%. What now?
Percentages must total approximately 100% before a formula is calculated, because percent mode assumes a 100 g sample. Adjust the values so they add up to 100%, or switch to mass in grams.
How many elements do I need?
At least two rows with symbols and positive amounts. That is a tool requirement rather than a chemistry law: with one element there is no ratio to reduce.
Can I enter the same element twice?
No. Duplicate rows are rejected, so C 40%, C 20%, O 40% will not calculate. Enter one row per element.
Does the entry order matter?
Yes for display: the formula lists elements in the order you entered them, so C, H, O gives CH₂O.
Why is capitalization important?
Element symbols are case-sensitive. Co is cobalt while CO is carbon plus oxygen, and lowercase input matches no element.
What is the difference between empirical and molecular formula?
Empirical gives the simplest ratio, such as CH₂O. Molecular gives actual atom counts, such as C₆H₁₂O₆. Molecular formulas arrive in a later tool.
Why does my answer differ from another calculator?
Different calculators may use different atomic-weight datasets, rounding rules, or ratio tolerances. This calculator keeps full precision during the calculation and uses a defined tolerance for whole-number ratios.