ToolNestr

Molecular Formula Calculator

Enter an empirical formula (e.g., CH2O) and the compound's actual molar mass to find its molecular formula, the whole-number multiplier n, and a live 3D view of the empirical cluster scaling up.

Reviewed by the ToolNestr Editorial Team — July 2026

Disclaimer: This tool is provided for educational purposes to support learning in chemistry. It is not a substitute for professional laboratory, safety, or dosage calculations.
Chemistry

Enter an empirical formula and the compound's actual molar mass

Molecular formula
Empirical formula mass
Multiplier n

Two ideas that trip students up

1. Molecular = empirical × n

The small cluster on the left is the empirical formula CH₂O. The larger cluster on the right is the molecular formula C₆H₁₂O₆ — the same atom ratio, just six times as many atoms. Illustrative only, not to scale.

2. Mass scales with n too

Two static bars compare the empirical formula mass (30.03 g/mol) with the molecular mass (180.16 g/mol) for the same glucose example — the taller bar is exactly 6× the shorter one.

Molecular formula graphs

Empirical mass vs actual molar mass vs molecular mass
Atom count per element — empirical vs molecular

How it works

The core idea in one line: the molecular formula is the empirical formula scaled up by a whole number n — and n is found by comparing the empirical formula's mass to the compound's real, measured molar mass.

Mempirical = Σ(ni × Ai)

empirical formula mass, same rule as molar mass

n = Mactual / Mempirical

rounded to the nearest whole number

molecular formula = empirical × n

multiply every subscript by n

Because the empirical formula only records the simplest ratio of atoms, many different molecules can share the same one — CH₂O is formaldehyde, acetic acid, or glucose, depending only on size. Dividing the actual molar mass by the empirical formula mass recovers that size as n = Mactual / Mempirical, then every subscript in the empirical formula is multiplied by n.

Worked example 1 — glucose

Given: The empirical formula of a sugar is CH₂O, and its actual molar mass (measured) is 180.16 g/mol. Find the molecular formula.

Empirical formula mass: 12.011 + 2(1.008) + 16.00 = 30.03 g/mol
Multiplier: n = 180.16 ÷ 30.03 = 6.00 → n = 6
Molecular formula: C₍₁×₆₎H₍₂×₆₎O₍₁×₆₎ = C₆H₁₂O₆ (glucose)

Worked example 2 — when n = 1

Given: A compound has empirical formula CH₄ and an actual molar mass of 16.04 g/mol. Find the molecular formula.

Empirical formula mass: 12.011 + 4(1.008) = 16.04 g/mol
Multiplier: n = 16.04 ÷ 16.04 = 1.00 → n = 1
Molecular formula: CH₄ × 1 = CH₄ — identical to the empirical formula (methane)

Whenever the actual molar mass equals the empirical formula mass, n = 1 and the two formulas are the same compound.

Empirical vs molecular formula for common compounds

Same empirical formula, different actual molar mass, gives a different n and a different molecular formula.

CompoundEmpiricalEmpirical massActual MnMolecular
FormaldehydeCH₂O30.03 g/mol30.03 g/mol1CH₂O
Acetic acidCH₂O30.03 g/mol60.05 g/mol2C₂H₄O₂
GlucoseCH₂O30.03 g/mol180.16 g/mol6C₆H₁₂O₆
BenzeneCH13.02 g/mol78.11 g/mol6C₆H₆
Hydrogen peroxideHO17.01 g/mol34.01 g/mol2H₂O₂

All three CH₂O rows share the same simplest ratio of atoms — only the actual molar mass tells them apart.

Where this actually matters

🔬 Compound identification

Combustion analysis gives only the empirical formula (a ratio of atoms). Mass spectrometry or another independent method supplies the actual molar mass, and combining the two pins down exactly which molecule you have.

🕵️ Forensic & materials analysis

Analysts identifying an unknown substance from trace samples often start with elemental composition (empirical formula) and use mass spectrometry to fix the true molecular size — critical for correctly identifying drugs, polymers, or contaminants.

💊 Pharmaceutical structure determination

Confirming a new drug candidate's molecular formula (not just its atomic ratio) is a required step before its structure, dosage and purity can be established.

Common misconceptions

"The empirical and molecular formulas are always different."

They are identical whenever n = 1 — e.g. water (H₂O) and methane (CH₄). "Empirical" just means simplest ratio; sometimes the simplest ratio already is the true molecule.

"You can find the molecular formula from the empirical formula alone."

No — the empirical formula only fixes the ratio of atoms. You always need an independent measurement of the actual molar mass (from mass spectrometry, freezing-point depression, or similar) to determine n.

"n should be rounded no matter how far off it is."

A small deviation (a percent or two) from a whole number is normal measurement error and should be rounded. But if n is off by more than roughly 5%, that signals a likely error in the empirical formula or the molar mass, not a valid rounding.

"The empirical formula mass and the molecular formula mass are unrelated."

They are directly related: molecular formula mass = empirical formula mass × n, exactly the same multiplier used to scale the atom counts.

Formula sources & further reading

The formulas here are standard, traceable to:

  • OpenStax, Chemistry 2e — determining empirical and molecular formulas (free, peer-reviewed). openstax.org
  • Brown, LeMay & Bursten, Chemistry: The Central Science — Chapter 3, Empirical Formulas from Analyses.
  • Zumdahl & Zumdahl, Chemistry — determination of molecular formula from empirical formula and molar mass.

n = actual molar mass ÷ empirical formula mass, rounded to the nearest whole number. Results are rounded for display.

How to use this calculator

1

Enter the empirical formula

Use standard element symbols and optional parentheses, e.g. CH2O or Ca(OH)2.

2

Enter the actual molar mass

Type the experimentally measured molar mass in g/mol.

3

Check the multiplier

A warning appears if n is not close to a whole number — check your formula and mass.

Related tools

Frequently asked questions

What is a molecular formula?

The molecular formula gives the actual number of atoms of each element in one molecule of a compound — e.g. glucose is C₆H₁₂O₆. It is always a whole-number multiple of the empirical formula, which shows only the simplest ratio of atoms.

How do you find the molecular formula from the empirical formula?

Compute the empirical formula mass (sum of atomic masses in the empirical formula), then divide the actual molar mass by it: n = M(actual) / M(empirical). Round n to the nearest whole number and multiply every subscript in the empirical formula by n.

Why do I need the actual molar mass as well as the empirical formula?

The empirical formula alone only fixes the ratio of atoms, not the true size of the molecule — CH₂O could be formaldehyde (n=1), acetic acid (n=2), glucose (n=6), or larger. The actual molar mass, usually from mass spectrometry or freezing-point depression, is what pins down n.

What if n does not come out close to a whole number?

A small rounding gap (a percent or two) is normal experimental error. If n is off by more than about 5% from a whole number, it usually means the empirical formula or the measured molar mass has an error — double-check both inputs.

Can the molecular formula equal the empirical formula?

Yes — whenever n = 1, the molecular and empirical formulas are identical. Water (H₂O) and methane (CH₄) are both cases where the simplest ratio is already the true molecular formula.

All tool categories

🧪 Chemistry (50 tools)
⏲️ Half-Life Calculator🔬 Molar Mass Calculator🧪 Molarity Calculator💨 Ideal Gas Law Calculator🔄 Combined Gas Law Calculator🌈 pH Calculator💧 Dilution Calculator🧴 Percent Concentration Calculator🌫️ PPM Calculator🧊 Molality Calculator⚗️ Normality Calculator🎈 Boyle's Law Calculator🔺 Charles's Law Calculator🌡️ Gay-Lussac's Law Calculator🧮 Chemical Equation Balancer⚖️ Limiting Reagent Calculator🎯 Percent Yield Calculator🔵 pOH Calculator🧫 Theoretical Yield Calculator🥼 Actual Yield Calculator🧬 Molecular Formula Calculator🔢 Mole Ratio Calculator🧿 Empirical Formula Calculator🧯 Henderson-Hasselbalch (Buffer) Calculator🫧 Neutralization Reaction Calculator💉 Titration Calculator🔁 Equilibrium Constant (Keq) Calculator⏳ Reaction Rate Calculator🌌 Avogadro's Number Calculator🧭 Reaction Quotient (Q) Calculator🌋 Enthalpy Calculator🥽 Calorimetry Calculator🎲 Entropy Calculator⚛️ Ka/Kb Equilibrium Constant Calculator🌬️ Dalton's Law (Partial Pressure) Calculator➡️ Gibbs Free Energy Calculator🔗 Bond Energy Calculator🔋 Nernst Equation Calculator🏔️ Arrhenius Equation Calculator☢️ Isotope Calculator🔘 Atom Calculator🔷 Electron Configuration Calculator🔌 Cell EMF Calculator🪫 Faraday's Law of Electrolysis Calculator♨️ Boiling Point Elevation Calculator❄️ Freezing Point Depression Calculator🔠 Interactive Periodic Table🔶 Atomic Mass Calculator⏱️ Rate Constant Calculator🫙 Vapor Pressure Calculator
🌐 Networking & IP Tools (36 tools)
🧮 Everyday (26 tools)
💪 Health & Fitness (30 tools)
💰 Finance (34 tools)
🔢 Math (23 tools)
📄 PDF Tools (10 tools)
🎨 Creators (12 tools)
💻 Developers (24 tools)
⚡ Engineering & Science (24 tools)
⚛️ Physics (48 tools)
🧬 Biology (50 tools)
🏠 Construction & Home Improvement (105 tools)
👗 Clothing & Garment Tools (68 tools)
🍳 Cooking & Baking (9 tools)
🚗 Automotive (26 tools)
🖼️ Image Tools (13 tools)
🔐 Security & Hash (15 tools)
📝 Text Tools (15 tools)
🔍 SEO Tools (11 tools)
🔄 Converters (69 tools)
🕐 Time & Date (15 tools)
📊 Chart Generators (11 tools)
🕌 Islamic Tools (16 tools)