From elemental composition to empirical and molecular formula
An empirical formula expresses the simplest whole-number ratio of elements in a compound. Convert each element amount to moles, divide by the smallest mole amount, and scale ratios to nearby whole numbers.
A molecular formula is an integer multiple of the empirical formula. Its molar mass must therefore be close to a whole-number multiple of the empirical-formula mass. Ambiguous experimental ratios require chemical judgment and uncertainty analysis.
How to use the empirical formula calculator
- Enter each element: Use valid case-sensitive symbols and positive masses or percentages on one consistent basis.
- Add or remove rows: Include every element in the compound once; repeated symbols are combined.
- Optionally enter molar mass: Provide a positive molecular molar mass to estimate the molecular formula.
- Calculate and inspect ratios: Confirm the proposed subscripts are chemically plausible and supported by measurement precision.
Formula and variables
The calculator searches small integer multipliers to convert approximate mole ratios to whole-number subscripts.
ni = mi/Mi; ratioi = ni/nmin; molecular factor = M/mass(empirical)- mi — Element mass
- Mass or mass percentage for element i
- Mi — Atomic weight
- Average molar mass of element i (g/mol)
- ni — Element moles
- Relative amount of element i (mol)
- M — Molecular molar mass
- Optional measured compound molar mass (g/mol)
Glucose composition example
A compound contains approximately 40.0% C, 6.7% H, and 53.3% O with molar mass 180.16 g/mol.
- Composition
- C 40.0, H 6.7, O 53.3
- Molar mass
- 180.16 g/mol
- Convert each amount to moles using atomic weights
- Normalize to an approximate 1:2:1 ratio
- Empirical mass ≈ 30.03 g/mol; 180.16/30.03 ≈ 6
Result: Empirical formula CH₂O; molecular formula C₆H₁₂O₆.
Rounding and analytical uncertainty should support the inferred integer ratios.
Understanding your results
Review the proposed integer ratios
The algorithm finds a nearby small-integer ratio, but close alternatives can occur with noisy data.
- Percent inputs need not total exactly 100% because of rounding, but large discrepancies deserve investigation.
- Molecular molar mass must be an integer multiple within tolerance.
- Standard atomic weights can vary slightly with isotopic composition.
Assumptions
- All compound elements and their relative masses are included.
- A small whole-number ratio adequately represents composition.
- Average atomic weights are appropriate.
Limitations
- Uses a numerical tolerance and searches multipliers only through eight.
- Does not propagate measurement uncertainty or rank alternative formulas.
- Does not determine structure, charge, hydration, isotopic labeling, or chemical plausibility.
- Atomic-weight values are abridged approximations.
Common mistakes
- Using element symbols with incorrect capitalization.
- Dividing mass values directly instead of converting to moles.
- Rounding mole ratios too early.
- Forcing an incompatible molecular molar mass to the nearest multiple.
Practical use cases
Composition exercises
Convert elemental mass or percentage data to a simplest formula.
Molecular formula estimation
Scale an empirical formula using an independently measured compatible molar mass.
Frequently asked questions
Must percentages total exactly 100?
Ideally they should be close; small differences can result from rounding, while large differences suggest missing components or data problems.
Why divide every mole amount by the smallest?
This normalizes the relative amounts so the smallest provisional subscript is one.
Why can the molecular formula calculation fail?
The entered molar mass must be close to a positive whole-number multiple of the empirical-formula mass.
Sources and review
- Empirical formula — IUPAC Gold Book. Accessed 2026-07-13.
- Periodic Table of the Elements — National Institute of Standards and Technology. Accessed 2026-07-13.
Reviewed 2026-07-13.