An empirical formula shows the simplest whole-number ratio of atoms in a compound. Enter each element’s percentage by mass, or its mass if you have a sample analysis, and this calculator converts the values to mole ratios and gives the simplest formula. You will need the elements present and their measured composition.
Formula
For each element, divide its mass by its atomic mass to calculate moles: n = m / A. Here, n is the amount in moles, m is the element’s mass in grams (or a proportional mass such as a percentage), and A is its standard atomic mass in g/mol. Divide each mole amount by the smallest mole amount to get the simplest ratio: ratio = n / nsmallest.
The calculator applies this method to hydrogen, carbon, and oxygen. The inputs may be masses or percentages because only their relative proportions matter; use one type consistently. Atomic masses used are H = 1.008 g/mol, C = 12.011 g/mol, and O = 15.999 g/mol. The displayed output is the three normalized ratios in H:C:O order. This limited calculator is suitable only when those are the elements in the compound; use the same method with the correct elements for other compositions.
Worked Example
Use the defaults: 2.016 parts hydrogen, 12.011 parts carbon, and 31.998 parts oxygen. These can be grams or percentages; they represent relative composition.
- Convert each value to moles: H = 2.016 g ÷ 1.008 g/mol = 2.0000 mol; C = 12.011 g ÷ 12.011 g/mol = 1.0000 mol; O = 31.998 g ÷ 15.999 g/mol = 2.0000 mol.
- Find the smallest amount, 1.0000 mol.
- Divide each amount by the smallest: H = 2.0000 ÷ 1.0000 = 2.000; C = 1.0000 ÷ 1.0000 = 1.000; O = 2.0000 ÷ 1.0000 = 2.000.
- Write the ratio as H:C:O = 2:1:2. The corresponding empirical formula is H2CO2.
The calculator reports the ratio, not a formatted chemical formula. Convert its values to whole-number subscripts when they are close to whole numbers. With these defaults, it reports 2.000:1.000:2.000.
Assumptions
- The input values represent the relative masses of each element in the same sample or composition.
- Only hydrogen, carbon, and oxygen are included; other elements require additional calculations.
- The supplied composition is accurate enough that small rounding differences do not alter the intended ratio.
- This is a calculation for study and lab-planning arithmetic, not a method for identifying unknown elements.
What You’ll Need
- The elements in the compound and a measured mass or percentage for each.
- A periodic table or reliable atomic-mass values.
- A calculator, spreadsheet, or the calculator above.
- If using percentages, a complete composition that sums to about 100% within measurement and rounding error.
Step-by-Step
- List every element. Record each element’s measured percentage or mass. Do not leave out an element known to be present. If the composition includes an element other than H, C, or O, calculate it separately using the same steps; the calculator above does not include it.
- Choose one consistent basis. If you have percentages, you can treat them as grams in a hypothetical 100 g sample. For example, 40% becomes 40 g per 100 g. If you have measured masses, use those masses directly. Do not combine percentages for some elements with sample masses for others.
- Convert each element’s mass to moles. Divide the mass or percentage by that element’s atomic mass. Use g/mol for atomic mass and grams for mass. For percentages, the calculation gives proportional mole amounts rather than actual moles in a weighed sample, which is fine because the next step uses ratios.
- Identify the smallest mole amount. Compare the mole values and select the smallest. Check the arithmetic and units before proceeding; all the calculated amounts should be in moles or proportional mole amounts.
- Divide every mole amount by the smallest. This makes the smallest ratio equal to 1. Keep several decimal places while working so that rounding does not hide a near-integer value.
- Convert the ratios to whole numbers. If all ratios are already close to whole numbers, round them to the nearest integers. If values are near halves, thirds, quarters, or fifths, multiply every ratio by the same small integer to clear the fractions. For example, 1:1.5 becomes 2:3 by multiplying each value by 2.
- Write the empirical formula. Put element symbols in the chosen conventional order and use the whole-number ratios as subscripts. A subscript of 1 is omitted. The formula describes the simplest ratio, not necessarily the actual number of atoms in one molecule.
- Check your result. Recalculate the mass contribution for each element using the proposed subscripts. The resulting mass fractions should be consistent with the composition you started with, allowing for measurement precision and rounding.
Common Mistakes
- Using percentages as if they were mole amounts: A percentage is a mass proportion. Divide it by atomic mass before comparing element ratios.
- Using the wrong atomic mass: Each element has its own value. Dividing every mass by the same number gives an incorrect result.
- Rounding too early: Keep several digits through the mole and ratio calculations. Round only after you recognize a simple whole-number ratio.
- Rounding every decimal directly: A ratio such as 1.33 is not 1:1; it is close to 4:3 after multiplying all ratios by 3.
- Mixing units or sample bases: Convert masses to the same unit and use either all percentages or all masses from one sample.
- Assuming the empirical formula is the molecular formula: A molecule may contain an integer multiple of the empirical formula. Molecular mass is needed to determine that multiplier.
Tips
- For percentage data, using a notional 100 g sample makes each percentage value numerically equal to grams.
- Keep unrounded values in your calculator and display rounded values only for the final ratio.
- Useful fraction patterns include 1.25, 1.33, 1.50, 1.67, and 1.75, which may correspond approximately to quarters, thirds, halves, fifths, and quarters.
- Composition percentages may total slightly above or below 100% because of rounding. A small discrepancy is not automatically an error.
- If a compound contains only two elements, the same mole-conversion and ratio steps apply; omit any absent elements rather than entering zero.
Troubleshooting
The ratios are far from simple fractions: Check the atomic masses, units, element list, and measured composition. Confirm that each mass belongs to the same sample. Consider whether measurement uncertainty or an unreported element could explain the mismatch.
A ratio is close to a fraction but not exact: Preserve extra digits, then multiply all ratios by the denominator of the likely fraction. For example, 1.49 may indicate 1.5 if the data are imprecise; multiplying the complete ratio by 2 can reveal whole numbers. Do not force a fraction if it does not fit the measurement quality.
Percentages do not add to 100%: Check whether some elements were omitted, whether the values are rounded, and whether the analysis reports only selected components. If the values are relative proportions, they can still be normalized, but the final formula is only as reliable as the composition data.
The calculator gives an unexpected result: Its inputs represent H, C, and O only, in that order. Make sure none is zero, use the correct type of value for every field, and calculate additional elements separately if they are present. Do not interpret the combined output as a complete formula when other elements are missing.
Frequently Asked Questions
What does an empirical formula tell me?
It gives the simplest whole-number ratio of the elements in a compound. It does not necessarily give the actual atom count in a molecule.
Can I use percentage composition?
Yes. Treat each percentage as a mass in a hypothetical 100 g sample, then divide by the corresponding atomic mass.
Why do I divide by the smallest number of moles?
That scales the mole amounts so the smallest ratio is 1, making it easier to identify the simplest relative proportions.
What if one ratio is 1.5?
Multiply every ratio, not just that one, by 2. The resulting values may be whole numbers, such as 2:3.
How do I find the molecular formula?
Determine the empirical formula mass, then divide the compound’s molar mass by it. If the quotient is a whole number, multiply every empirical-formula subscript by that number.
Can an empirical formula contain a fractional subscript?
No. Reduce the ratios to whole numbers. A fractional intermediate ratio means you may need to multiply all ratios by an integer before writing the formula.
Related
Formula used
in h | Hydrogen mass or percent | - | 2.016 | 0 in c | Carbon mass or percent | - | 12.011 | 0 in o | Oxygen mass or percent | - | 31.998 | 0 out r | Empirical formula ratio, H:C:O | - | (h / 1.008) / min(h / 1.008, c / 12.011, o / 15.999) + (c / 12.011) / min(h / 1.008, c / 12.011, o / 15.999) + (o / 15.999) / min(h / 1.008, c / 12.011, o / 15.999) | 3
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Percent Composition Formula and Worked Example17.76 %
- What Is r in the Free Energy Equation?1.0000
- Average Atomic Mass Equation and Calculator10.81103 u
- Arrhenius Equation: A-Level Chemistry and Calculator52.91 kJ/mol
- Theoretical Yield Calculator and Stoichiometry Formula1.8015 g
- Empirical Formula Equation: Calculate the Simplest Ratio