Empirical formula calculator with molecular formula
This empirical formula calculator follows the steps in OpenStax Chemistry: moles of each element, divide by the smallest, multiply to whole numbers. Nicotine with 74.02 % C, 8.710 % H and 17.27 % N gives C5H7N; with the molar mass 162.28 g/mol the molecular formula is C10H14N2.
How it is calculated
Three steps from composition to empirical formula: (1) divide each mass by the atomic mass to get moles, (2) divide every mole number by the smallest one, (3) if a ratio such as 1.5 remains, multiply all of them by the smallest whole number that clears it. Percentages work the same way – they are the grams in a 100 g sample.
Worked examples (rows 1–5 from OpenStax Chemistry 2e)
| Input | Mole ratio | Empirical formula | Molar mass | Molecular formula |
|---|---|---|---|---|
| Fe 34.97 g, O 15.03 g | 1 : 1.500 | Fe2O3 | – | – |
| C 27.29 %, O 72.71 % | 1 : 2.000 | CO2 | – | – |
| N 0.130 g, O 0.370 g | 1 : 2.492 | N2O5 | – | – |
| C 74.02 %, H 8.710 %, N 17.27 % | 4.998 : 7.008 : 1 | C5H7N | 162.28 g/mol | C10H14N2 |
| C 49.47 %, H 5.201 %, N 28.84 %, O 16.48 % | 3.999 : 5.009 : 1.999 : 1 | C4H5N2O | 194.2 g/mol | C8H10N4O2 |
| C 40.0 %, H 6.71 %, O 53.3 % | 1 : 1.999 : 1 | CH2O | 180.16 g/mol | C6H12O6 |
From empirical to molecular formula
The molecular formula is a whole multiple of the empirical formula: n = molar mass ÷ empirical formula mass. For nicotine C5H7N the formula mass is 81.118 g/mol; 162.28 ÷ 81.118 = 2.0005, so the molecular formula is C10H14N2. OpenStax gets the molar mass from 40.57 g = 0.2500 mol. The atomic masses here are the IUPAC standard atomic weights (C 12.011, H 1.0080, N 14.007, O 15.999, Fe 55.845). The reverse calculation – percent from a formula – is done by the percent composition calculator; the molar mass of any formula by the molar mass calculator.
Frequently asked questions
How do you find the empirical formula from percent?
Treat the percentages as grams in 100 g, convert to moles and divide by the smallest. 27.29 % C and 72.71 % O give 2.272 and 4.545 mol, ratio 1 : 2, so CO2.
What if the ratio is not a whole number?
Multiply all ratios by the same small integer: 1 : 1.5 becomes 2 : 3 (Fe2O3), 1 : 3.5 becomes 2 : 7 (Cl2O7), 1.33 needs a factor of 3.
How do I get the molecular formula?
Divide the molar mass by the empirical formula mass and multiply the subscripts by the result: 180.16 ÷ 30.026 = 6, CH2O × 6 = C6H12O6.
Can I enter grams instead of percent?
Yes. Fe 34.97 O 15.03 (grams of hematite) gives the same Fe2O3 as percentages would.
Which atomic masses are used?
The IUPAC CIAAW standard atomic weights, e.g. C 12.011, H 1.0080, O 15.999. Textbooks with rounded values can differ in the last digit of the ratios.
Is the empirical formula always the molecular formula?
No. CO2 and Fe2O3 are equal to their empirical formulas, but glucose C6H12O6 has the empirical formula CH2O.
Sources and legal basis
- OpenStax, Chemistry 2e, section 3.2 “Determining Empirical and Molecular Formulas” (Examples 3.11–3.13: hematite Fe2O3, CO2 from 27.29 % C, nicotine C5H7N → C10H14N2; Cl2O7, N2O5, caffeine C8H10N4O2) (read 09.10.2026)
- IUPAC CIAAW – Abridged Standard Atomic Weights (Atomic Weights 2021, revised 2024), as used by the molar mass calculator (checked 09.10.2026)
As of: · Editorial policy
Related tools
- Average atomic mass calculator: weighted mean of isotope massesAverage atomic mass calculator: isotope masses and abundances give the weighted average in u, or find the abundance of two isotopes from the average mass.
- Molar Mass CalculatorCalculate molar mass in g/mol from any chemical formula – with brackets, hydrates like CuSO4·5H2O, mass percent by element, working steps and n = m/M.
- Percent composition calculatorPercent composition calculator from the chemical formula: mass percent of each element, optionally with the mass in a sample, with the calculation steps.
- Molarity calculatorMolarity calculator: mol/L from mass and volume, the mass to weigh out for a solution, molarity from mass percent and density, and simple stoichiometry.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Interval Notation CalculatorInterval notation calculator: type an inequality like x ≥ 3 or an interval like [3, ∞) and get interval, inequality and set-builder notation with unions.
- Bearing life calculator: basic rating life L10 and L10h from load and speedBearing life calculator: basic rating life L10 in million revolutions and L10h in hours from load rating C, load P and speed, with reliability factor a1.
- CGPA to Percentage Calculator (and Percentage to CGPA)CGPA to percentage calculator for the 10-point scale: CBSE formula (CGPA × 9.5), × 10 or your university’s own formula – also percentage to CGPA, with working.
- Lakh to Million and Crore to Million / Billion ConverterLakh to million converter: change lakh and crore into million, billion and trillion or back, with Indian commas (1,00,000), the number in words and a table.