FREE TOOL · CHEMISTRY

Molecular Formula Calculator

Convert between empirical and molecular formulas, or build one straight from percent composition — all instantly.

4 MODES · NO SIGN-UP · RUNS IN YOUR BROWSER
01 · THE CALCULATOR

Four calculators, one panel.

Pick a mode below — every result shows its full working, from mole ratios to the final whole-number formula.

The simplest whole-number ratio of atoms in the compound.

g/mol

The actual measured molar mass — usually given or found experimentally.

RESULTS

RESULTS

g/mol

The actual measured molar mass of the full molecule.

RESULTS

Any formula with whole-number subscripts — parentheses are supported too.

RESULTS
02 · HOW TO USE

Two numbers in, a formula out.

No manual required — but here's the entire flow in four moves.

STEP 01

Pick a mode

Empirical → Molecular when you already have both. % Comp → Empirical or % Comp → Molecular when you're starting from lab data. Simplify to reduce any formula.

STEP 02

Enter what you know

Type a formula, add element/percent rows with the + button, or key in a molar mass — whatever the mode calls for. The example chips fill everything in with one tap.

STEP 03

Read the results

The final formula sits up top with proper subscripts. Mole ratios, atomic masses, and the multiplier used sit below it, and the full calculation sits at the bottom.

STEP 04

Trust the checks

Unknown elements, mismatched parentheses, and impossible values all get flagged with a plain-English reason instead of a wrong answer. Copy any result set with one click.

03 · THE FORMULA

The logic behind every mode.

Three relationships cover everything this tool calculates.

Empirical → molecular

n = M ÷ Mₑ  →  ×n each subscript

Divide the compound's molar mass by the empirical formula's mass to get a whole number, then multiply every subscript by it.

% composition → empirical

nᵢ = %ᵢ ÷ Aᵢ  →  ÷ smallest

Treat each percentage as grams per 100 g, convert to moles, then divide every value by the smallest to get a ratio.

Simplifying a formula

Divide all subscripts by their GCD

Find the greatest common divisor shared by every subscript in the formula and divide each one by it.

04 · FAQ

Questions people actually ask.

The short answers — with the long ones one tap away.

What is the difference between an empirical and a molecular formula?+

An empirical formula shows the simplest whole-number ratio of atoms in a compound, while a molecular formula shows the actual number of each atom in one molecule. The molecular formula is always a whole-number multiple of the empirical formula — the empirical formula CH2O becomes C6H12O6 for glucose.

How do you find a molecular formula from an empirical formula?+

Divide the compound's actual molar mass by the empirical formula's mass to get a whole number n, then multiply every subscript in the empirical formula by n. Enter both values in the Empirical → Molecular tab and the calculator does this automatically.

How do you find an empirical formula from percent composition?+

Treat each percentage as grams in a 100 g sample, divide each by its element's atomic mass to get moles, then divide every mole value by the smallest one. If the results aren't whole numbers, multiply all of them by the same small integer until they are. The % Comp → Empirical tab runs this for any set of elements.

Can you find a molecular formula directly from percent composition?+

Yes. First find the empirical formula from the percent composition, then divide the compound's known molar mass by the empirical formula's mass to get the multiplier. The % Comp → Molecular tab combines both steps in one calculation.

How do you simplify a molecular formula to its empirical formula?+

Find the greatest common divisor of all the subscripts in the formula and divide each one by it. For C6H12O6 the subscripts 6, 12 and 6 share a greatest common divisor of 6, giving CH2O. The Simplify formula tab does this for any formula you enter.

Is this tool free, and where does my data go?+

It's completely free and runs entirely in your browser — nothing you type is uploaded, logged, or sent to any server. No account, no sign-up, no limits.