---
title: "Empirical Formula Calculator - % to Formula | MolDraw"
url: https://www.moldraw.com/tools/free-chem-tools/empirical-formula-calculator.html
description: "Empirical and molecular formula calculator: enter percent composition or grams, get the simplest whole-number ratio and molecular formula. With steps."
lang: en
publisher: Scidart Academy
generated: 2026-11-25
---
[MolDraw](https://www.moldraw.com/) › [Chemistry tools](https://www.moldraw.com/tools/) › Empirical Formula Calculator

# Empirical Formula Calculator

**In short:** Empirical and molecular formula calculator: enter percent composition or grams, get the simplest whole-number ratio and molecular formula. It is free, works in your web browser and needs no download.

Enter the percent composition (or grams) of each element. The calculator converts to moles, divides by the smallest value, finds the whole-number ratio and, if you give a molar mass, the molecular formula. Every step is shown.

**Quick answer:** 40.0% C, 6.70% H and 53.3% O gives the mole ratio 1 : 2 : 1, so the empirical formula is **CH2O**. With M = 180 g/mol the molecular formula is **C6H12O6**.

Molar mass of compound, g/mol (optional, for the molecular formula)

Enter mass percentages or grams from an analysis. They do not need to add up to 100.

Results appear here.

## How to use the empirical formula calculator

1. Enter each element and its mass percent (or the grams found by analysis). Assume a 100 g sample, so 40.0% C means 40.0 g C.
2. The calculator divides each mass by the element's atomic mass to get moles.
3. It divides every mole value by the smallest one, then multiplies by 2, 3… if needed to reach whole numbers (e.g. 1.5 → ×2).
4. Optionally enter the compound's molar mass. n = molar mass ÷ empirical formula mass gives the molecular formula.

## Worked examples

### 40.0% C, 6.70% H, 53.3% O

C 3.330 mol, H 6.647 mol, O 3.332 mol
÷ 3.330 → 1 : 1.996 : 1.000

Empirical CH2O (30.026 g/mol)

M = 180 → n = 6 → C6H12O6

### 64.8% C, 13.6% H, 21.6% O

C 5.395, H 13.49, O 1.350 mol
÷ 1.350 → 3.996 : 9.993 : 1

C4H10O

(e.g. butanol or diethyl ether, 74.12 g/mol)

### 69.94% Fe, 30.06% O

Fe 1.2524, O 1.8789 mol → 1 : 1.500
× 2 → 2 : 3

Fe2O3

## Empirical vs molecular formula

The **empirical formula** is the simplest whole-number ratio of atoms in a compound. The **molecular formula** is the actual number of atoms in one molecule, always a whole-number multiple of it. Glucose (C6H12O6), formaldehyde (CH2O) and acetic acid (C2H4O2) all share the empirical formula CH2O.

`moles = mass ÷ atomic mass → ratio = moles ÷ smallest moles → n = M(compound) ÷ M(empirical)`

### Handling ratios that are not whole numbers

| Ratio ends in about… | Multiply all by |
| --- | --- |
| .5 | 2 |
| .33 or .67 | 3 |
| .25 or .75 | 4 |
| .2, .4, .6, .8 | 5 |

Small deviations (±0.1) come from rounding in experimental data and are rounded away. Large deviations usually mean a wrong percentage or a missing element: if the percentages add to less than 100, the remainder is often oxygen.

Going the other direction, formula to percent composition, is done by the [molecular weight calculator](https://www.moldraw.com/tools/free-chem-tools/molecular-weight-calculator.html).

**Found the molecular formula?** Draw the possible isomers in MolDraw to check which structure fits your spectra.

[Draw isomers in MolDraw](https://www.moldraw.com/)

## Frequently asked questions

### How do you calculate an empirical formula from percent composition?

Treat the percentages as grams in a 100 g sample, convert each to moles, divide by the smallest number of moles and round (or multiply up) to whole numbers.

### How can I calculate the molecular formula from the empirical formula?

Divide the compound's molar mass by the empirical formula mass to get n, then multiply every subscript by n. CH2O (30.03) with M = 180 gives n = 6, C6H12O6.

### What is the empirical formula of a compound with 40.0% C, 6.70% H and 53.3% O?

CH2O. The mole ratio is 3.33 : 6.65 : 3.33, which simplifies to 1 : 2 : 1.

### What is the empirical formula of a compound that is 64.8% C, 13.6% H and 21.6% O?

C4H10O. Moles: C 5.40, H 13.5, O 1.35. Dividing by 1.35 gives 4 : 10 : 1.

### What if the percentages do not add up to 100?

The calculator works with any amounts, because only the ratio matters. If an element is missing from the analysis (often oxygen), add it as 100 minus the sum.

### Can the empirical and molecular formula be the same?

Yes, when n = 1. Water (H2O) and carbon dioxide (CO2) are examples.

## Related chemistry tools

[**Molecular formula finder**From exact mass or CHN %](https://www.moldraw.com/tools/free-chem-tools/molecular-formula-finder.html)[**Degree of unsaturation calculator**IHD / rings + π bonds](https://www.moldraw.com/tools/free-chem-tools/degree-of-unsaturation-calculator.html)[**Molecular weight calculator**Formula to g/mol with % composition](https://www.moldraw.com/tools/free-chem-tools/molecular-weight-calculator.html)[**Molar mass calculator**Step-by-step molar mass working](https://www.moldraw.com/tools/free-chem-tools/molar-mass-calculator.html)[**Grams to moles calculator**Convert mass and moles](https://www.moldraw.com/tools/free-chem-tools/grams-to-moles-calculator.html)[**Percent yield calculator**Actual vs theoretical yield](https://www.moldraw.com/tools/free-chem-tools/percent-yield-calculator.html)[**Limiting reagent calculator**Limiting reactant and theoretical yield](https://www.moldraw.com/tools/free-chem-tools/limiting-reagent-calculator.html)[**Exact mass calculator**Monoisotopic mass for MS](https://www.moldraw.com/tools/free-chem-tools/exact-mass-calculator.html)[**Chemical equation balancer**Balance reactions and redox ions](https://www.moldraw.com/tools/free-chem-tools/chemical-equation-balancer.html)[**Interactive periodic table**All 118 elements with data](https://www.moldraw.com/tools/free-chem-tools/interactive-periodic-table.html)[**Combustion analysis calculator**CO₂ and H₂O to empirical formula](https://www.moldraw.com/tools/free-chem-tools/combustion-analysis-calculator.html)[**Isomer generator**Count and draw structural isomers](https://www.moldraw.com/tools/free-chem-tools/isomer-generator.html)

Need to sketch molecules for a report? [Draw chemical structures online](https://www.moldraw.com/) with MolDraw, a free [online ChemDraw alternative](https://www.moldraw.com/) (see the [ChemDraw vs MolDraw comparison](https://www.moldraw.com/blog/chemdraw-vs-moldraw-free-alternative-guide.html)).

Last updated: October 11, 2026
