Molecular Formula Calculator

Calculate the molecular formula from empirical formula and molar mass

What Is a Molecular Formula?

A molecular formula shows the exact number and types of atoms in a molecule. It differs from the empirical formula, which gives only the simplest whole-number ratio of atoms. For example, the empirical formula of glucose is CH₂O (the ratio of C:H:O = 1:2:1), but the molecular formula is C₆H₁₂O₆, revealing that the actual molecule contains six carbon, twelve hydrogen, and six oxygen atoms.

The molecular formula is determined by comparing the empirical formula mass to the experimentally measured molecular mass. The multiplier n is calculated as the ratio of molecular mass to empirical mass: n = molecular mass / empirical mass. The molecular formula is then obtained by multiplying all subscripts in the empirical formula by n.

This calculator takes the empirical formula, its mass, and the molecular mass as inputs and determines the molecular formula. The empirical formula mass can be calculated using a molar mass calculator. The molecular mass is typically determined experimentally using techniques like mass spectrometry, freezing point depression, or vapor density measurements.

The Molecular Formula Equation

The relationship between empirical and molecular formulas is governed by a simple multiplier derived from the mass ratio.

Molecular Formula Determination

n = molecular mass / empirical formula mass; molecular formula = (empirical formula) × n

Where:

  • n= Integer multiplier (ratio of molecular to empirical mass)
  • molecular mass= Measured molecular mass of the compound (g/mol)
  • empirical mass= Molar mass of the empirical formula (g/mol)

How to Use This Calculator

Follow these steps to determine the molecular formula from experimental data:

  1. Enter the Empirical Formula: Type the simplest whole-number formula (e.g., CH₂O for glucose).
  2. Enter the Empirical Formula Mass: Input the molar mass of the empirical formula in g/mol. You can calculate this using a molar mass calculator.
  3. Enter the Molecular Mass: Input the experimentally determined molecular mass in g/mol, typically from mass spectrometry.
  4. View Results: The calculator displays the multiplier n and the molecular formula.

The multiplier n is rounded to the nearest integer, since it represents a whole-number ratio of formula units.

How to Determine Molecular Mass

Several experimental techniques can determine the molecular mass needed for this calculation:

Mass spectrometry is the most accurate modern method. It ionizes molecules and measures their mass-to-charge ratio, directly giving the molecular mass. Techniques like electrospray ionization (ESI) and matrix-assisted laser desorption (MALDI) can handle large biomolecules.

Freezing point depression uses the colligative property relationship ΔTf = Kf × m. By measuring the freezing point lowering of a solution with known molality, the molar mass of the solute can be calculated. This classical method is still used in teaching laboratories.

Vapor density measurements determine the molar mass of volatile substances by measuring the density of their vapor relative to a reference gas. Osmotic pressure measurements are useful for large polymers and proteins where other methods may be impractical.

Real-World Applications

Determining molecular formulas is fundamental to analytical chemistry and structural determination. When a new compound is isolated from a natural source, chemists first determine its empirical formula through elemental analysis, then use mass spectrometry to find the molecular mass and calculate the molecular formula.

In pharmaceutical development, the molecular formula is essential for drug identification, dosage calculations, and patent documentation. Regulatory agencies require exact molecular formulas for all approved drugs.

In materials science, polymer molecular formulas determine material properties like strength, flexibility, and thermal stability. The repeat unit formula (analogous to empirical formula) is multiplied by the degree of polymerization to give the full molecular formula.

In environmental chemistry, identifying molecular formulas of pollutants helps determine their toxicity, persistence, and fate in the environment. The molecular formula is the starting point for understanding any chemical's behavior.

Worked Examples

Glucose

Problem:

The empirical formula of a compound is CH₂O (empirical mass = 30.03 g/mol). The molecular mass is 180.18 g/mol. What is the molecular formula?

Solution Steps:

  1. 1n = molecular mass / empirical mass = 180.18 / 30.03
  2. 2n = 6.00 (rounded to nearest integer)
  3. 3Multiply each subscript in CH₂O by 6
  4. 4C: 1×6 = 6, H: 2×6 = 12, O: 1×6 = 6

Result:

Molecular formula = C₆H₁₂O₆ (glucose)

Hydrogen Peroxide

Problem:

Empirical formula is HO (empirical mass = 17.01 g/mol). Molecular mass = 34.02 g/mol. Find the molecular formula.

Solution Steps:

  1. 1n = 34.02 / 17.01 = 2.00
  2. 2Multiply HO subscripts by 2
  3. 3H: 1×2 = 2, O: 1×2 = 2

Result:

Molecular formula = H₂O₂ (hydrogen peroxide)

Benzene

Problem:

Empirical formula = CH (empirical mass = 13.02 g/mol). Molecular mass = 78.11 g/mol. Determine the molecular formula.

Solution Steps:

  1. 1n = 78.11 / 13.02 = 6.00
  2. 2Multiply CH subscripts by 6
  3. 3C: 1×6 = 6, H: 1×6 = 6

Result:

Molecular formula = C₆H₆ (benzene)

Tips & Best Practices

  • First determine the empirical formula from elemental analysis (percent composition).
  • Calculate the empirical formula mass using a molar mass calculator.
  • Obtain the molecular mass from mass spectrometry for the most accurate results.
  • The multiplier n = molecular mass / empirical mass should be close to a whole number.
  • If n is not close to an integer, check for experimental errors or impure samples.
  • Remember: molecular formula = (empirical formula)ₙ where n is a positive integer.

Frequently Asked Questions

The empirical formula gives the simplest whole-number ratio of atoms in a compound (e.g., CH₂O for glucose), while the molecular formula shows the actual number of atoms in one molecule (e.g., C₆H₁₂O₆). Some compounds have the same empirical and molecular formulas (like H₂O), while others differ by a whole-number multiplier.
In principle, n should be a whole number since molecular formulas represent discrete molecules. However, experimental errors in mass measurements can give non-integer values. If n is close to an integer (within about 5%), round to the nearest whole number. If it falls near a half-integer, recheck your measurements for errors.
Use a molar mass calculator to calculate the mass of the empirical formula. Add up the atomic masses of all atoms in the formula. For CH₂O: C = 12.011, 2H = 2.016, O = 15.999, giving 30.026 g/mol. You can also use the molar mass calculator on this site to compute it directly.
If n = 1, the empirical and molecular formulas are identical. This is common for simple ionic compounds (NaCl), elemental molecules (O₂), and many small molecules (H₂O, CO₂). In these cases, elemental analysis directly gives the molecular formula without needing mass spectrometry.
The multiplier n represents the number of empirical formula units in one molecule, which must be a whole number. Experimental mass measurements have some uncertainty, so n may not come out exactly integer. Rounding to the nearest whole number accounts for this experimental error while maintaining chemical sense.

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Molecular Formula Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Chemistry: The Central Science

by Brown, LeMay, Bursten

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.