Chemistry calculator

Molecular Formula Calculator

Calculate the molecular formula of a compound from its empirical formula and molar mass. The calculator finds the empirical formula mass, determines the whole-number multiplier, and shows the complete calculation.

Enter compound data

Calculate molecular formula

Free tool

Enter the simplest whole-number ratio of elements in the compound.

g/mol

Use the experimentally measured or supplied molar mass of the molecular compound.

Try an example:

Your result will appear here

Enter an empirical formula and compound molar mass to calculate the molecular formula.

Calculator guide

How this calculator works

Molecular Formula Calculator determines the actual number of atoms of each element in a compound using its empirical formula and molecular mass. It helps chemistry students, researchers, and laboratory professionals identify complete molecular compositions accurately.

Formula explanation

The molecular formula combines empirical formula information with molar mass to determine the actual number of atoms in a molecule.

Formula

Molecular Formula = Empirical Formula × (Molecular Mass ÷ Empirical Formula Mass)

Worked example

Example: A compound's empirical formula can be multiplied by a factor to match its molecular mass.

Assumptions

  • The empirical formula is correctly determined.
  • The molecular mass value is accurate.
  • The multiplier produces a whole-number molecular formula.

Examples

  • Example: A compound with a known empirical formula and molecular mass can be converted into its complete molecular formula.
  • Example: Chemists use molecular formulas to represent the exact number of atoms in chemical compounds.

Common mistakes

  • Using incorrect molecular mass.
  • Confusing empirical and molecular formulas.
  • Ignoring formula ratios.

Variables

  • Empirical formula
  • Molecular mass
  • Empirical formula mass
  • Whole-number multiplier
  • Molecular formula

Limitations

  • Accuracy depends on correct empirical formulas and molecular mass measurements.
  • Incorrect input values can produce an incorrect molecular formula.

Scientific references

  • OpenStax Chemistry: Chemical Formulas and Molecular Composition
  • NIST Chemistry Reference Data
  • Scientific chemical analysis guidelines

Content review

Reviewed by: ScienceCalcHub Chemistry Review Team | Last reviewed: 2026-08-30

Applications

  • Chemical compound identification
  • Molecular structure analysis
  • Laboratory research
  • Chemistry education

Frequently asked questions

How is a molecular formula calculated?

A molecular formula is calculated by multiplying the empirical formula by the ratio of molecular mass to empirical formula mass.

What information is needed to find a molecular formula?

The calculation requires an empirical formula and the compound's molecular mass.

What is the difference between empirical and molecular formulas?

An empirical formula shows the simplest element ratio, while a molecular formula shows the actual number of atoms in a molecule.

Accuracy and transparency

Created and maintained by our editorial team

This chemistry calculator is maintained by the ScienceCalcHub Editorial Team. Its calculation logic is tested with representative inputs, while the supporting guidance is checked for formula clarity, units, assumptions, and common mistakes.

Written by
ScienceCalcHub Editorial Team
Reviewed by
ScienceCalcHub Scientific Review Team
Review standard
Formula accuracy, units, examples, and educational clarity

Learn more about our formula-review and correction process, explore our calculation methodology, or view our scientific references.

  • Calculation logic tested
  • Variables and units explained
  • Assumptions stated clearly
  • Corrections handled transparently

How to calculate a molecular formula

A molecular formula gives the actual number of atoms of every element in one molecule. To determine it, you need the compound's empirical formula and molar mass.

  1. Calculate the molar mass of the empirical formula.
  2. Divide the compound molar mass by the empirical formula mass.
  3. Round the result to the nearest valid whole number.
  4. Multiply every subscript in the empirical formula by that whole-number multiplier.

Molecular formula equation

n = compound molar mass ÷ empirical formula mass

Molecular formula = (empirical formula)n

The value of n should be a positive whole number because chemical formulas contain whole numbers of atoms.

Worked example: glucose

The empirical formula of glucose is CH2O, and its molar mass is approximately 180.156 g/mol.

  1. Empirical formula mass of CH2O: approximately 30.026 g/mol.
  2. Multiplier: 180.156 ÷ 30.026 ≈ 6.
  3. Multiply every subscript by 6.
  4. Molecular formula: C6H12O6.

Empirical formula vs. molecular formula

FeatureEmpirical formulaMolecular formula
MeaningSimplest ratio of atomsActual number of atoms
Example for glucoseCH2OC6H12O6
Can be identical?Yes, when the molecular multiplier equals 1.

Common calculation mistakes

  • Using an incorrect or unbalanced empirical formula.
  • Dividing the empirical formula mass by the compound molar mass in the wrong order.
  • Rounding a value that is not reasonably close to a whole number.
  • Multiplying only one subscript instead of every element subscript.
  • Confusing formula mass with the measured molar mass of the compound.

Related chemistry calculators

Use the empirical formula calculator when you have elemental masses or percentages. Use the molecular weight calculator to calculate the molar mass of a known chemical formula.

You may also continue with the stoichiometry calculator, mass to moles calculator, or molarity calculator.

Frequently asked questions

How do you calculate a molecular formula?

First calculate the empirical formula mass. Divide the compound molar mass by the empirical formula mass, round the result to the nearest valid whole number, and multiply every empirical-formula subscript by that number.

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

An empirical formula shows the simplest whole-number ratio of atoms in a compound. A molecular formula shows the actual number of atoms of each element in one molecule.

Can an empirical formula and molecular formula be the same?

Yes. They are the same when the compound molar mass equals the empirical formula mass, producing a whole-number multiplier of 1.

Why must the molecular multiplier be a whole number?

A molecular formula represents whole atoms. Therefore, the molecular molar mass must be approximately a whole-number multiple of the empirical formula mass.

What units should I use for molar mass?

Enter molar mass in grams per mole, written as g/mol. The empirical formula itself does not require a unit.