Empirical & Molecular Formula Calculator
Use the measured mass percentages of two to four elements to test which whole-number atom ratios fit. The calculator checks the full bounded set of simplest ratios, shows why several can fit loose measurements, and uses an optional molar-mass interval to test whole-number multiples of each ratio.
Find formulas that fit your measurements
Test the measured percentages and optional molar mass against the whole-number ratios in your search.
Composition measurements
Enter the measured mass percentage for each distinct element. Use one tolerance in percentage points for all rows.
1 empirical formula fits.
1 fit the composition before the molar-mass check. Maximum 24 atoms in the simplest formula.
A is CH2O, 30.026 g/mol empirical mass. Compatible molecular formula C6H12O6.
Composition fit by element
The center line is the reported value. Each shaded band is the allowed range. The marks show the differences from that value in percentage points.
Candidate ledger
Open ranked formulas
Rows rank by the largest absolute difference from any reported percentage. Choose A or B to inspect a candidate in the chart.
| Empirical | Atoms | Mass (g/mol) | Largest error (pp) | Molecular | Compare |
|---|---|---|---|---|---|
| CH2O | 4 | 30.026 | 0.0062 | C6H12O6 |
Export measurements and formulas
Show selectable CSV
How to use this calculator
- Choose two to four element symbols and enter their reported mass percentages.
- Enter one absolute tolerance in percentage points and set the maximum total number of atoms in the simplest formula.
- Enable measured molar mass if you have an independent measurement. Enter both the mass and its absolute tolerance in g/mol.
- Compare the ranked candidates. Choose rows for comparison A and B to see their predicted percentage differences within each measurement band.
- Open the candidate ledger or download the complete CSV to keep the measurements, the candidate ratios, and compatible molecular multiples.
The Formula
The mathematical logic powering this calculation is:
Each measured percentage p defines an inclusive interval from p minus the shared tolerance to p plus the tolerance, clipped to 0 through 100%. A reported set may differ from 100% if its intervals can still accommodate an exact 100% total. The calculator keeps the entered percentages.
For a candidate with positive atom counts nᵢ and pinned nominal atomic weights Aᵢ, the empirical mass is the sum of nᵢAᵢ. Predicted percentage i is 100nᵢAᵢ divided by that total. The search considers the positive count vectors with greatest common divisor one and at most the entered total number of empirical atoms. Ratios of the measurement intervals restrict the possible counts without excluding a fit. Every surviving vector is checked against each full percentage interval by exact cross multiplication.
If measured molar mass is enabled, a positive integer multiple of the empirical mass must fall inside the stated mass interval. The first eligible multiple is the larger of one and the lower-bound quotient rounded up. The last is the upper-bound quotient rounded down. The entire inclusive range is retained. If no positive integers fit, the formula is excluded from the filtered list.
Results rank by smallest largest absolute error across the entered percentages, then fewer empirical atoms, then the counts in Hill formula order. The chart uses percentage-point differences from the reported center. The candidate table is paginated and the download includes all candidates and exact prediction fractions.
Use two to four distinct elements with an available nominal CIAAW atomic weight. Enter percentages and uncertainty in percentage points to four decimal places. The total empirical atom limit is at most 36. Optional positive molar mass and absolute tolerance can be up to 100,000 g/mol with four decimals. The tolerance describes the entered measurements. The model uses the 2024 abridged nominal atomic weights without propagating natural isotopic variation. A numerical fit alone cannot determine identity, bonding, or whether a proposed molecule exists.Worked Example
If you input:
- Element mass percentages (%): C 40.00%, H 6.71%, O 53.29%
- Composition tolerance (pp): 0.06
- Maximum empirical atoms: 24
- Measured molar mass (g/mol): 180.16 ± 0.05
Result:
CH2O is the only empirical formula in the entered search. It predicts C 40.0020%, H 6.7142%, and O 53.2838%, with an empirical mass of 30.026 g/mol. Six times this mass is 180.156 g/mol, inside 180.11–180.21 g/mol. The compatible molecular formula is C6H12O6.
Frequently Asked Questions
What is the difference between an empirical and molecular formula?
An empirical formula expresses the simplest whole-number ratio of the listed elements. The molecular formula expresses the number of atoms of each element in a molecule. One empirical ratio can correspond to several whole-number multiples.
Do my reported percentages need to add to exactly 100%?
The entered percent bands need to contain a total of 100%. Each candidate itself sums to exactly 100%. If rounding makes the reports total 99.99%, a suitable measured tolerance can still allow a fit.
What does 0.06 percentage points mean?
A reported 40.00% with a tolerance of 0.06 percentage points accepts 39.94% through 40.06%. The same absolute tolerance applies to every entered element.
Why can more than one simplest formula fit?
A measurement interval can contain predictions from several primitive integer ratios. Larger count bounds can admit additional fits. The residual chart compares these fits against the reported values.
What if the molar mass excludes a formula that fits the percentages?
The composition and molar-mass checks use independent intervals. If no whole-number multiple of an empirical mass falls inside the measured interval, that empirical formula is removed from the mass-filtered list.
Does the best fit identify the compound?
The chart only tests numerical compatibility with the entered nominal-weight model. Identification requires other evidence about the sample and its structure.
Similar Calculators
Stoichiometry Calculator
Balance a reaction, find limiting reactants and calculate theoretical yield or target-product requirements. Inspect formula masses, leftovers and actual yield separately.
Serial Dilution Calculator
Plan serial dilutions by factor, target concentration or transfer volume. Keep the volume you need at every stage, inspect material balances and export the series.
Ratio Calculator
Simplify ratios, find equivalent ratios, and solve for a missing value in a proportion.
Percentage Calculator
Easily calculate percentages, percentage changes, and find what percent one number is of another.
