Free to Use

Molecular Formula Calculator

Determine molecular and empirical formulas from percent composition by mass and molar mass. Get step-by-step solutions with detailed calculations for chemistry students and professionals.

The experimentally determined molar mass of the unknown compound
Element Symbol Percent Composition (%)
The experimentally determined molar mass of the unknown compound

Enter the subscript counts from your known empirical formula:

Molecular Formula Examples

๐Ÿงช Glucose (Cโ‚†Hโ‚โ‚‚Oโ‚†)

Problem: A compound has the following percent composition: C = 40.00%, H = 6.71%, O = 53.29%. Its molar mass is 180.16 g/mol. Find the molecular formula.

Step 1: Assume 100 g sample โ†’ C = 40.00 g, H = 6.71 g, O = 53.29 g

Step 2: Moles: C = 40.00/12.01 = 3.331, H = 6.71/1.008 = 6.657, O = 53.29/16.00 = 3.331

Step 3: Divide by smallest: C = 3.331/3.331 = 1, H = 6.657/3.331 = 2, O = 3.331/3.331 = 1

Step 4: Empirical formula: CHโ‚‚O

Step 5: Empirical mass = 12.01 + 2(1.008) + 16.00 = 30.03 g/mol

Step 6: n = 180.16/30.03 = 6

Step 7: Molecular formula = Cโ‚†Hโ‚โ‚‚Oโ‚† (Glucose)

๐Ÿ”ฅ Butane (Cโ‚„Hโ‚โ‚€)

Problem: A hydrocarbon compound contains 82.66% carbon and 17.34% hydrogen. Its molar mass is 58.12 g/mol. Determine the molecular formula.

Given: C = 82.66%, H = 17.34%, Molar Mass = 58.12 g/mol

Moles: C = 82.66/12.01 = 6.883, H = 17.34/1.008 = 17.202

Ratio: C = 6.883/6.883 = 1, H = 17.202/6.883 = 2.5 โ†’ Multiply by 2 โ†’ Cโ‚‚Hโ‚…

Empirical mass: 2(12.01) + 5(1.008) = 29.06 g/mol

n = 58.12/29.06 = 2

Molecular formula: Cโ‚„Hโ‚โ‚€ (Butane)

๐Ÿ’ง Hydrogen Peroxide (Hโ‚‚Oโ‚‚)

Problem: A compound contains 5.90% hydrogen and 94.10% oxygen. Its molar mass is 34.02 g/mol. Find the molecular formula.

Moles: H = 5.90/1.008 = 5.853, O = 94.10/16.00 = 5.881

Ratio: H = 5.853/5.853 = 1, O = 5.881/5.853 = 1.005 โ‰ˆ 1

Empirical formula: HO

Empirical mass: 1.008 + 16.00 = 17.01 g/mol

n = 34.02/17.01 = 2

Molecular formula: Hโ‚‚Oโ‚‚ (Hydrogen Peroxide)

Molecular Formula Guide

Empirical Formula ร— n = Molecular Formula
n = Molar Mass รท Empirical Formula Mass

How to Find the Molecular Formula

1
Assume a 100 g sample. Convert each percent composition value directly to grams. For example, 40.00% C becomes 40.00 g of carbon.
2
Convert grams to moles. Divide the mass of each element by its atomic mass (g/mol) from the periodic table.
3
Find the mole ratio. Divide each mole value by the smallest mole value among all elements present.
4
Get whole numbers. If the ratios are close to integers (within ยฑ0.1), round them. If not (e.g., 1.5, 0.33), multiply all ratios by a common factor (2, 3, etc.) to obtain whole numbers. This gives the empirical formula.
5
Calculate empirical formula mass. Sum the atomic masses of all atoms in the empirical formula.
6
Find the multiplier n. Divide the given molar mass by the empirical formula mass: n = Molar Mass / Empirical Mass
7
Determine the molecular formula. Multiply each subscript in the empirical formula by n. The result is the molecular formula.

Common Atomic Masses (g/mol)

Element Symbol Atomic Mass (g/mol)
HydrogenH1.008
HeliumHe4.003
LithiumLi6.941
BerylliumBe9.012
BoronB10.811
CarbonC12.011
NitrogenN14.007
OxygenO15.999
FluorineF18.998
NeonNe20.180
SodiumNa22.990
MagnesiumMg24.305
AluminumAl26.982
SiliconSi28.086
PhosphorusP30.974
SulfurS32.065
ChlorineCl35.453
ArgonAr39.948
PotassiumK39.098
CalciumCa40.078
IronFe55.845
CopperCu63.546
ZincZn65.409
BromineBr79.904
SilverAg107.868
IodineI126.904
BariumBa137.327
GoldAu196.967

Key Concepts

๐Ÿ“Œ Empirical Formula

The empirical formula shows the simplest whole-number ratio of atoms in a compound. For example, CHโ‚‚O is the empirical formula for glucose (Cโ‚†Hโ‚โ‚‚Oโ‚†). Different compounds can share the same empirical formula.

๐Ÿ“Œ Molecular Formula

The molecular formula shows the actual number of atoms of each element in a molecule. It is always a whole-number multiple of the empirical formula. Water is Hโ‚‚O, hydrogen peroxide is Hโ‚‚Oโ‚‚.

๐Ÿ“Œ Percent Composition

Percent composition is the mass percentage of each element in a compound. It can be determined experimentally through combustion analysis or other analytical techniques.

๐Ÿ“Œ The Multiplier n

The value of n must be a positive integer (1, 2, 3...). If n is close to 1, the empirical and molecular formulas are the same. If n is not close to an integer, recheck your empirical formula.

Important Rules

  • The percentages should sum to approximately 100% (ยฑ1%). If they don't, oxygen is often the balancing element.
  • When dividing by the smallest mole value, watch for ratios like 0.5 (ร—2), 0.33 (ร—3), 0.25 (ร—4), 0.67 (ร—3), and 0.75 (ร—4) โ€” these indicate multipliers are needed.
  • The multiplier n should be a whole number. If it's not close to an integer, the empirical formula or molar mass may be incorrect.
  • Molecular formulas for ionic compounds are the same as their empirical formulas (n = 1).
๐Ÿ“Š
Percent Composition Mode
Input up to 4+ elements with their percent compositions by mass. Automatically calculates moles, ratios, and the empirical formula from your data.
๐Ÿงฌ
Empirical Formula Mode
Already know the empirical formula? Enter the element counts and molar mass to directly compute the molecular formula and multiplier.
๐Ÿ“
Step-by-Step Solutions
Every calculation includes a detailed 7-step breakdown showing mass-to-mole conversions, ratio analysis, rounding, and formula determination.
๐Ÿ“‹
Atomic Mass Database
Built-in atomic masses for all common elements. Automatically looks up atomic weights so you don't need a periodic table.

โš ๏ธ Important Note: Percent compositions must sum to 100% (ยฑ1% tolerance). The calculator assumes accurate experimental data. Always verify molecular formulas using additional analytical techniques such as mass spectrometry or NMR spectroscopy for confirmation.

Frequently Asked Questions

What is the difference between empirical and molecular formula?
The empirical formula represents 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 per molecule (e.g., Cโ‚†Hโ‚โ‚‚Oโ‚† for glucose). The molecular formula is always a whole-number multiple (n) of the empirical formula: Molecular Formula = Empirical Formula ร— n.
How do you find the molecular formula from percent composition?
First, determine the empirical formula by assuming a 100 g sample, converting the mass of each element to moles, and finding the simplest whole-number mole ratio. Then calculate the empirical formula mass. Finally, divide the given molar mass by the empirical formula mass to get the multiplier n. Multiply all subscripts in the empirical formula by n to obtain the molecular formula.
What does it mean if the multiplier n is not a whole number?
If n is not close to a whole number (within ยฑ0.1), it indicates that the empirical formula may be incorrect, the molar mass data may be inaccurate, or there may be experimental errors in the percent composition. The multiplier n must be a whole number because molecules contain discrete, integer numbers of atoms. Recheck your empirical formula calculations, especially the step where you convert mole ratios to whole numbers.
Can two different compounds have the same empirical formula?
Yes, many compounds share the same empirical formula but have different molecular formulas. For example, CHโ‚‚O is the empirical formula for glucose (Cโ‚†Hโ‚โ‚‚Oโ‚†), formaldehyde (CHโ‚‚O), and several other sugars. This is why the molar mass is essential โ€” it allows you to determine which molecular formula corresponds to your compound by finding the correct multiplier n.
What is the 100 g assumption in empirical formula calculations?
The 100 g assumption is a mathematical convenience used when working with percent composition data. Since percentages are based on 100, assuming a 100 g sample allows you to directly treat each percentage value as the mass in grams of that element. For example, 40.00% carbon becomes 40.00 g of carbon. This simplifies the calculation without affecting the mole ratios, which are dimensionless.
Why do I need the molar mass to find the molecular formula?
The empirical formula only gives the ratio of atoms, not the actual count. Multiple molecular formulas (e.g., CHโ‚‚O, Cโ‚‚Hโ‚„Oโ‚‚, Cโ‚ƒHโ‚†Oโ‚ƒ) can share the same empirical formula (CHโ‚‚O). The molar mass is needed to determine which multiple (n) is correct. Without the molar mass, you can only determine the empirical formula. This is why both percent composition data AND molar mass are required for molecular formula determination.