Empirical and Molecular Formula Calculator
Find the empirical formula of a compound from its percent composition or element masses, and the molecular formula from its molar mass.
How to use this calculator
Enter each element with its percentage by mass or its mass in grams from an analysis. The calculator converts each to moles, divides by the smallest, and finds the simplest whole-number ratio. If you know the compound's molar mass, it also gives the molecular formula.
Formula
Moles of each element = mass (or %, treating 100 g of compound) ÷ atomic weight. Divide every value by the smallest. If the ratios are not close to whole numbers, multiply them all by 2, 3, 4 … until they are. Molecular formula = empirical formula × (molar mass ÷ empirical formula mass), rounded to a whole number.
Calculator credits
Calculator developmentJulia Edwards
Editorial supervisionSamad Aslam Khan
Expert reviewAslamResearcher, Chemical Engineer
Published byThe Calculatorz
Last updated
Read how we research, test, review and correct our calculators in our editorial policy.
Frequently asked questions
What is an empirical formula?
The simplest whole-number ratio of atoms in a compound. CH₂O is the empirical formula of glucose, acetic acid and formaldehyde.
What is the difference between empirical and molecular formulas?
The molecular formula gives the actual number of atoms in a molecule, which is a whole-number multiple of the empirical formula.
Why assume 100 g of compound?
Then each percentage equals a mass in grams, which makes the conversion to moles straightforward.
What if a ratio is 1.5 or 1.33?
Multiply all ratios by 2 or 3 respectively. The calculator tries multipliers up to 12 automatically.
What if the percentages do not add to 100?
Analyses often omit oxygen. If oxygen is the only unmeasured element, add it as 100 minus the other percentages.
How accurate must the data be?
Small analytical errors can blur ratios. The calculator accepts values within about 0.1 of a whole number after scaling.
References & methodology sources
These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.
- Flowers, P., Theopold, K., Langley, R., & Robinson, W. R. (2019). Determining empirical and molecular formulas. In Chemistry 2e (Section 3.2). OpenStax. View source
- Flowers, P., Theopold, K., Langley, R., & Robinson, W. R. (2019). Formula mass and the mole concept. In Chemistry 2e (Section 3.1). OpenStax. View source
- Commission on Isotopic Abundances and Atomic Weights. (n.d.). Standard atomic weights. International Union of Pure and Applied Chemistry. View source
- Flowers, P., Theopold, K., Langley, R., & Robinson, W. R. (2019). Chemistry 2e. OpenStax. View source