Empirical Formula Calculator
Enter the mass percentages or gram amounts of each element in a compound and instantly get its empirical formula, mole ratios, and the molar mass of the simplest formula.
Find a Compound's Empirical Formula from Its Composition
Empirical Formula
Where:
- \(m_i\) — mass (or mass percent) of element \(i\)
- \(A_i\) — atomic weight of element \(i\) (g/mol)
- \(n_i\) — moles of element \(i\)
- \(n_{\min}\) — the smallest number of moles among all elements
- \(r_i\) — the mole ratio of element \(i\) relative to the least abundant element
- \(k\) — the smallest whole number that turns every ratio into an integer
Each mass is converted to moles by dividing by the element's atomic weight. Dividing every mole count by the smallest one gives relative ratios, which are then scaled by the smallest whole-number multiplier \(k\) (1, 2, 3…) that makes all subscripts integers. The result is the simplest whole-number formula of the compound.
Empirical Formula – Calculation Example
Example: a compound is analyzed and found to contain 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen by mass.
Convert each mass percent to moles:
\[ n_C = \frac{40.0}{12.011} = 3.330 \text{ mol}, \quad n_H = \frac{6.7}{1.008} = 6.647 \text{ mol}, \quad n_O = \frac{53.3}{15.999} = 3.333 \text{ mol} \]
Divide each by the smallest value (3.330):
\[ C: 1.000, \quad H: 1.995 \approx 2, \quad O: 1.001 \approx 1 \]
The ratios are already whole numbers (\(k = 1\)), so no multiplier is needed.
Result: the empirical formula is CH2O, with a molar mass of 30.026 g/mol. (With an experimental molar mass you could go one step further and find the molecular formula — see the molecular mass calculator.)
How to use the calculator
- In the Elements and Their Masses or Mass Percentages field, list every element in the compound: its chemical symbol followed by a value, one element per entry. Separate entries with a newline, semicolon, comma, colon, or "=". For example:
C 40.0; H 6.7; O 53.3. - Enter each value either as a mass percent (as in combustion analysis data) or as a mass in grams (as in lab weighing data) — the two give the same result because only the ratios matter. Do not mix units within one entry list; use all percentages or all grams.
- Click Calculate. The tool converts each entry to moles using IUPAC atomic weights, finds the smallest whole-number ratios, and reduces them to lowest terms.
- Read the results: the Empirical Formula (Simplest Whole-Number Formula), a table of Element Mole Ratios showing every intermediate step, and the Empirical Formula Molar Mass in g/mol.
What is an empirical formula?
The empirical formula of a compound is the simplest whole-number ratio of atoms of each element it contains. It tells you the proportions of the elements, not the actual number of atoms in one molecule. Glucose, for example, has the molecular formula C6H12O6, but its empirical formula is CH2O — the same 1:2:1 ratio, reduced to lowest terms. Formaldehyde (CH2O), acetic acid (C2H4O2), and glucose all share this empirical formula, which is why the empirical formula alone cannot identify a unique substance.
Empirical formulas come directly from experimental composition data. In combustion analysis, an instrument measures the masses of CO2 and H2O produced from a sample, and these are converted back to masses of carbon and hydrogen. In gravimetric analysis, an element may be precipitated and weighed directly. Whatever the method, the raw output is a set of masses or mass percentages — exactly what this calculator takes as input.
To interpret the results, focus on the mole ratio table. The "÷ smallest" column shows the relative ratios before rounding; values very close to whole numbers (like 1.995 ≈ 2) confirm clean data, while awkward ratios such as 1.33 (4/3) or 2.50 (5/2) signal that the raw ratios must be multiplied by 3 or 2 respectively to reach whole numbers. The calculator performs this scaling automatically for multipliers up to 12.
Once you know the empirical formula, comparing its molar mass with the experimentally measured molar mass of the compound gives the molecular formula: the multiplier \(n = M_{\text{compound}} / M_{\text{empirical}}\) scales every subscript. If the two masses are equal, the empirical and molecular formulas are the same.
Tips, assumptions, and limitations
- Percentages or grams both work. If your percentages do not sum to exactly 100% (common with experimental error or missing oxygen by difference), the calculator still works — ratios, not totals, determine the formula.
- Oxygen by difference. Many analyses report C and H directly and obtain oxygen as 100% minus the rest. You can enter that remainder as a normal entry, e.g.
C 40.0; H 6.7; O 53.3. - Experimental error is tolerated. Ratios within about 2% of a whole number are rounded to it. If the data cannot fit any whole-number ratio with multipliers up to 12, the calculator reports the ratios rounded to two decimals instead — a sign the input data should be double-checked.
- Supported elements. The calculator recognizes the standard one- and two-letter symbols of the common elements (about 60 of them, from hydrogen to uranium). Two-letter symbols are case-corrected automatically, so "cl" is read as chlorine Cl, not C + l.
- Duplicate entries are combined. If the same element appears more than once, the values are added together before the ratio is computed.
- The result is empirical, not molecular. To get the molecular formula you also need the molar mass of the compound; for that step, see the molecular mass calculator or the atomic mass calculator to check individual atomic weights. If you also need to convert between atoms and moles while working out compositions, the atoms-to-moles converter can help, and once you have both sides of a reaction you can balance it with the chemical equation balancer.
Frequently Asked Questions
How do I find the empirical formula by hand, step by step?
Start by writing down the mass or mass percentage of each element. Divide each mass by that element's atomic weight to get moles. Then divide every mole value by the smallest of them, giving ratios with the least abundant element as 1. If the ratios are whole numbers (or very close), you are done. If not, multiply all of them by 2, 3, or another small integer until they are. The final whole numbers become the subscripts.
What should I do if a mole ratio comes out to 0.5 or 1.33 instead of a whole number?
Fractional ratios are normal — just multiply everything by the denominator. A ratio of 1.5 means multiplying all subscripts by 2; 1.33 (i.e. 4/3) means multiplying by 3; 1.25 means multiplying by 4; 1.67 (i.e. 5/3) also means multiplying by 3. Only round when the value is within about 2% of a whole number; otherwise treat it as an exact fraction. The calculator handles this scaling automatically for multipliers up to 12.
What is the difference between an empirical formula and a molecular formula?
The empirical formula shows the smallest whole-number atom ratio, while the molecular formula shows the actual number of atoms in one molecule. Benzene's empirical formula is CH, but its molecular formula is C6H6. Several different compounds can share one empirical formula — CH2O covers formaldehyde, acetic acid, and glucose — so the empirical formula alone identifies a composition, not a specific substance.
How do I get the molecular formula once I know the empirical formula?
Divide the experimentally measured molar mass of the compound by the molar mass of the empirical formula. The result, n, must be a whole number. Multiply every subscript in the empirical formula by n. For example, if the empirical formula is CH2O (30.03 g/mol) and the compound's molar mass is 180.2 g/mol, then n = 6 and the molecular formula is C6H12O6. If n = 1, the two formulas are identical.
Can I use data from combustion analysis (masses of CO2 and H2O)?
Not directly — first convert the combustion products into element masses. Multiply the mass of CO2 by 12.011/44.009 to get the mass of carbon, and the mass of H2O by 2.016/18.015 to get the mass of hydrogen. If oxygen is also present in the original compound, find it by difference: 100% minus the sum of the other elements' percentages. Then enter the resulting element masses or percentages into the calculator.
What are the most common mistakes when calculating empirical formulas?
The top error is dividing masses by the wrong numbers — always use atomic weights, not mass numbers or formula masses. Other frequent mistakes: rounding mole ratios too early (round only after dividing by the smallest value), forgetting to multiply all subscripts when one ratio is fractional, treating percentages as grams inconsistently within one problem, and ignoring elements found by difference, especially oxygen. Also double-check two-letter symbols — 'CO' means carbon monoxide, not cobalt, which is 'Co'.
Why do my percentages not need to add up to exactly 100%?
Because the empirical formula depends only on the ratios between elements, not on the total. Whether your values sum to 99.8% or 101.2% due to experimental error, or to 100% exactly, the relative proportions stay effectively the same, and so does the resulting formula. Small deviations of a few percent are absorbed by the rounding tolerance; larger discrepancies usually indicate contaminated data or a missing element and should be investigated.