Empirical Formula Calculator
Find the simplest whole-number ratio of atoms in a compound from each element’s mass percent or mass.
How does this calculator work?
Convert each element’s mass percent (or grams) to moles by dividing by its atomic weight, divide every result by the smallest mole value to get ratios, then scale by a small integer until all values are whole numbers. Those integers are the subscripts of the empirical formula, the simplest atom ratio in the compound.
Formula
How this is calculated
Enter one element per line as "Element,percent" (for example C,40.0). The percent column may be a mass percentage that sums to about 100, or an actual mass in grams — the math is identical because the ratios are unaffected by a constant scale factor. Each symbol is matched to its standard atomic weight.
For every element the calculator divides its mass (or percent) by its atomic weight to obtain a relative number of moles. All mole values are then divided by the smallest mole value, giving ratios where the least-abundant element becomes 1. If these ratios are not yet close to whole numbers, the set is multiplied by successive small integers (2 through 6) until every value rounds to an integer within tolerance — this resolves cases like 1.5 (×2) or 1.33 (×3).
The rounded integers become the subscripts of the empirical formula. Note this gives the simplest ratio, not necessarily the molecular formula: glucose (C6H12O6) and formaldehyde (CH2O) share the empirical formula CH2O. Inputs must use valid element symbols and positive amounts; unrecognized symbols or non-positive values are rejected.
Frequently asked questions
The empirical formula is the simplest whole-number ratio of atoms, while the molecular formula gives the actual count per molecule. Multiply the empirical formula by molar mass / empirical mass to get the molecular formula.
Yes. Because every value is later scaled relative to the smallest, using grams or mass percent produces the same ratios and the same empirical formula.
When dividing by the smallest mole value yields fractions such as 1.5 or 1.33, the whole set is multiplied by the smallest integer that makes every value a near-integer, preserving the correct ratio.
Also known as
TG we-Calculate Editorial Team. (2026). Empirical Formula Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/empirical-formula-calculator
TG we-Calculate Editorial Team. "Empirical Formula Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/empirical-formula-calculator.
TG we-Calculate Editorial Team, "Empirical Formula Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/empirical-formula-calculator
@misc{wecalculate_empirical_formula_calculator, title = {Empirical Formula Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/empirical-formula-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
