Moles, mole ratios and the smallest whole-number formula from element masses or percentages, plus the molecular formula from a molar mass, checked against OpenStax Chemistry 2e
How the Empirical Formula Is Found
- Grams. Use the masses given, or treat percentages as grams of a 100 g sample.
- Moles. Divide each by its atomic mass: in OpenStax Example 3.11, 34.97 g Fe ÷ 55.845 = 0.6262 mol and 15.03 g O ÷ 15.999 = 0.9394 mol.
- Ratio. Divide by the smallest: Fe 1.000, O 1.500.
- Whole numbers. 1.5 is not whole, so multiply both by 2: Fe₂O₃.
Ratios that end near .5 call for ×2, near .33 or .67 for ×3, and near .25 or .75 for ×4. The calculator tries multipliers 1 through 10 and takes the first that brings every ratio within 0.1 of a whole number.
From Empirical to Molecular Formula
A molecular formula is a whole-number multiple of the empirical formula. Divide the molar mass by the empirical formula mass. For nicotine, the empirical formula C₅H₇N has a mass of 81.13 g/mol (OpenStax’s figure), and a 40.57 g sample containing 0.2500 mol gives a molar mass of 162.3 g/mol: 162.3 ÷ 81.13 = 2, so the molecular formula is C₁₀H₁₄N₂.
OpenStax Examples, Reproduced
The last row is caffeine’s formula, C₈H₁₀N₄O₂, from its percent composition and a molecular mass of 194.2 amu. Atomic masses come from the site’s molar mass calculator, so masses can differ from the textbook’s in the last decimal place.
Common Mistakes
- Dividing grams instead of moles. The ratio of masses is not the ratio of atoms.
- Rounding too early. 1.5 rounded to 2 gives FeO₂ instead of Fe₂O₃. Keep four significant figures until the last step.
- Rounding 1.33 to 1. Ratios near a third mean multiply by 3.
- Using molecular masses for diatomic elements. Oxygen is 15.999 g/mol per atom here, not 32 for O₂.
- Assuming the empirical formula is the molecular formula. Without a molar mass you only know the simplest ratio; CH₂O could be formaldehyde, acetic acid (C₂H₄O₂) or glucose (C₆H₁₂O₆).
What This Calculator Does Not Cover
It assumes the data describe one pure compound with a definite composition. Hydrates, combustion analysis (finding C and H from the masses of CO₂ and H₂O) and data with large experimental error need extra steps; for the molar mass of a formula, use the molar mass calculator.
Frequently Asked Questions
How do you find an empirical formula from percent composition?
Treat the percentages as grams of a 100 g sample, convert each to moles, divide all by the smallest, and multiply by a whole number if needed to make every ratio whole.
What is the empirical formula for 27.29% C and 72.71% O?
CO₂: 2.272 mol C and 4.544 mol O give a 1 : 2 ratio (OpenStax Chemistry 2e Example 3.12).
How do you get the molecular formula from the empirical formula?
Divide the molar mass by the empirical formula mass and multiply every subscript by that whole number.
What do you do when the ratio is 1.5?
Multiply all ratios by 2. In OpenStax Example 3.11, Fe 1 and O 1.5 become Fe₂O₃.
What is the empirical formula of nicotine?
C₅H₇N; with a molar mass of 162.3 g/mol the molecular formula is C₁₀H₁₄N₂.
Can the empirical and molecular formulas be the same?
Yes, when the molar mass equals the empirical formula mass, as for CO₂ or H₂O.
How to Use This Calculator
- Enter each element and its amount — in grams or as a percentage, e.g. C 74.02%, H 8.710%, N 17.27%.
- Add a molar mass if you have one — to get the molecular formula; leave 0 to skip.
- Check the mole steps — moles, ratios and the multiplier are shown for each element.
- Read the formulas — the empirical formula and, with a molar mass, the molecular formula.
📚 Sources & References- [1] OpenStax. Chemistry 2e, 3.2 Determining Empirical and Molecular Formulas (2019; accessed October 2026). openstax.org
- [2] OpenStax. Chemistry 2e, 4.3 Reaction Stoichiometry (2019; accessed October 2026). openstax.org
✅
Editorial Standards — Every calculator is built from peer-reviewed formulas and official data sources, editorially reviewed for accuracy, and updated regularly.
Read our full methodology ·
About the author