Skip to main content

Empirical & Molecular Formula Calculator from Mass % + Molar Mass

Convert mass percent composition or mass data into empirical formulas. Use measured molar mass to determine molecular formulas. See step-by-step mole calculations, ratios, and subscript determination.

Enter Composition Data

Total: 0.00%
Element
Percent (%)
Override Mr (opt)
g/mol

Provide this to calculate the molecular formula from the empirical formula.

Enter Element Data

Enter the percent composition or mass data for your compound to determine its empirical and molecular formulas.

How it works:
  1. Choose input mode (percent or mass)
  2. Enter element symbols and values
  3. Optionally enter measured molar mass
  4. Click Calculate view formulas

Mass % to Mole Conversion Steps

Start with percent composition data from combustion analysis or elemental analysis. Assume you have exactly 100 grams of compound—this converts percentages directly into grams. If your unknown is 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen, you're working with 40.0 g C, 6.7 g H, and 53.3 g O.

Convert each mass to moles using atomic weights. Carbon: 40.0 g ÷ 12.011 g/mol = 3.33 mol. Hydrogen: 6.7 g ÷ 1.008 g/mol = 6.65 mol. Oxygen: 53.3 g ÷ 15.999 g/mol = 3.33 mol. Keep at least three significant figures through these intermediate steps to avoid rounding errors in your final answer.

Watch units throughout. Grams cancel with grams in the denominator of atomic weight, leaving moles. If you accidentally divide by atomic number instead of atomic weight, your mole counts will be completely wrong. Carbon's atomic number is 6, but its atomic weight is 12.011—those give very different results.

Reducing to Smallest Whole-Number Ratio

Divide every mole value by the smallest mole value in your set. This normalizes one element to 1.00 while preserving the ratios among all elements. If your moles are 3.33 C, 6.65 H, and 3.33 O, divide by 3.33 to get 1.00 C : 2.00 H : 1.00 O.

Round ratios to integers only when they're within about ±0.1 of a whole number. A ratio of 1.97 rounds to 2. A ratio of 1.05 rounds to 1. But 1.50 or 1.33 should not be rounded directly—these indicate you need multiplication to reach whole numbers.

The empirical formula from our example is CH2O. This represents the simplest whole-number ratio of atoms in the compound. Many different molecules can share the same empirical formula—formaldehyde (CH2O), acetic acid (C2H4O2), and glucose (C6H12O6) all reduce to CH2O.

Scaling by Measured Molar Mass

The empirical formula alone doesn't tell you which compound you have. You need the actual molar mass, typically from mass spectrometry, freezing point depression, or vapor density measurements. Compare this measured value to the empirical formula mass.

Calculate the empirical formula mass first. CH2O weighs 12.011 + 2(1.008) + 15.999 = 30.03 g/mol. If your mass spec shows a molecular ion at m/z = 180, divide to find the multiplier: 180 ÷ 30.03 = 5.99, which rounds to 6. The molecular formula is C6H12O6.

The multiplier must be a positive integer. If your calculation gives 2.7 or 4.3, something is wrong—either the measured molar mass has error, the percent composition is off, or you made an arithmetic mistake. Recheck your inputs before accepting a non-integer result.

Math Backbone

Core equation: Molecular formula = n × Empirical formula, where n = (measured molar mass) / (empirical formula mass). This relationship connects experimental mass data to actual molecular structure.

Converting % to moles:

moles = (percent / 100) × 100 g / atomic weight

Simplified: moles = percent / atomic weight

Finding mole ratios:

ratio_i = moles_i / min(all moles)

Scaling to molecular:

n = M_measured / M_empirical (round to integer)

The 100 g assumption in the first step is just for convenience—it makes percentages equal grams numerically. You could use any sample size; the ratios would be the same since percent composition is scale-invariant.

Mini Lab Scenario

Problem: Combustion analysis of an unknown organic compound gives 85.6% carbon and 14.4% hydrogen. Mass spectrometry shows the molecular ion at m/z = 56. Find the molecular formula.

Step 1: Convert to moles

C: 85.6 / 12.011 = 7.13 mol

H: 14.4 / 1.008 = 14.29 mol

Step 2: Find mole ratios

C: 7.13 / 7.13 = 1.00

H: 14.29 / 7.13 = 2.00

Empirical formula: CH2

Step 3: Calculate empirical mass

M = 12.011 + 2(1.008) = 14.03 g/mol

Step 4: Find multiplier

n = 56 / 14.03 = 3.99 ≈ 4

Step 5: Write molecular formula

Molecular formula: C4H8

C4H8 could be several isomers: 1-butene, 2-butene, isobutylene, or cyclobutane. The formula alone doesn't distinguish them—you'd need NMR or IR spectroscopy for structural identification.

When Ratios Don't Round Cleanly

Ratio ≈ 1.5: Multiply all ratios by 2. The pattern 1:1.5:2 becomes 2:3:4. This commonly appears in compounds like Fe2O3 (iron oxide).

Ratio ≈ 1.33: Multiply all ratios by 3. The pattern 1:1.33 becomes 3:4. You see this in molecules where one element has 4/3 the count of another.

Ratio ≈ 1.25: Multiply all ratios by 4. The pattern 1:1.25 becomes 4:5. Less common, but it appears in some phosphate and sulfate compounds.

Ratio ≈ 1.67: Multiply all ratios by 3. The pattern 1:1.67 becomes 3:5. This one tricks students because 1.67 looks like it might round to 2.

If none of these multipliers work and you still have decimals, check your original calculations. Combustion analysis data typically has ±0.3% error, which can shift ratios just enough to confuse the pattern. Try recalculating with slight adjustments to see if a clean formula emerges.

Limitations

• Isomers indistinguishable: Many compounds share the same molecular formula. C2H6O could be ethanol or dimethyl ether—spectroscopy is needed to tell them apart.

• Experimental uncertainty: Combustion analysis has inherent error. Small deviations in percent composition can shift mole ratios enough to complicate formula determination.

• Discrete molecules only: This method works for molecular compounds. Ionic compounds, polymers, and network solids don't have true molecular formulas in the same sense.

Sources

Quick Answers

What is an empirical formula?
The empirical formula is the simplest whole-number ratio of atoms of each element in a compound. For example, glucose has the molecular formula C₆H₁₂O₆, but its empirical formula is CH₂O because the ratio 6:12:6 simplifies to 1:2:1. The empirical formula shows composition ratios, not actual atom counts. Many compounds can share the same empirical formula but have different molecular formulas (e.g., CH₂O is the empirical formula for glucose C₆H₁₂O₆, formaldehyde CH₂O, and acetic acid C₂H₄O₂). Understanding empirical formulas helps you see how percent composition relates to molecular structure and why formulas are determined from experimental data.
What is a molecular formula?
The molecular formula shows the actual number of atoms of each element in one molecule of the compound. It's always a whole-number multiple of the empirical formula: Molecular formula = n × Empirical formula, where n is a positive integer. For example, glucose has molecular formula C₆H₁₂O₆, which is 6 times the empirical formula CH₂O (n = 6). To determine the molecular formula, you need the measured molar mass (from mass spectrometry, freezing point depression, etc.). Calculate n by dividing the measured molar mass by the empirical molar mass, then multiply each subscript in the empirical formula by n. Understanding molecular formulas helps you see actual atom counts and how formulas connect to molar mass.
How do I convert percent composition to empirical formula?
The process involves: (1) Assume a 100 g sample so percentages become grams (e.g., 40% C = 40 g C). (2) Convert grams to moles: moles = mass ÷ atomic mass (e.g., 40 g C ÷ 12.01 g/mol = 3.33 mol C). (3) Find the smallest number of moles among all elements. (4) Divide each element's moles by the smallest to get mole ratios (e.g., if smallest is 3.33, then C: 3.33 ÷ 3.33 = 1.00, H: 6.66 ÷ 3.33 = 2.00, O: 3.33 ÷ 3.33 = 1.00). (5) Round ratios to whole numbers (or multiply to eliminate fractions) to get subscripts (e.g., 1:2:1 gives CH₂O). Understanding this process helps you determine empirical formulas from experimental data and connect percent composition to molecular structure.
Why don't my percentages add up to exactly 100%?
Experimental measurements always have some uncertainty. Percents that total 98–102% are typically acceptable due to rounding and measurement error. If percents are significantly off (> 5%), check for: (1) Transcription errors (wrong numbers entered), (2) Missing elements (often oxygen is calculated by difference: 100% - sum of other elements), (3) Calculation errors. Sometimes oxygen isn't measured directly but is calculated as the difference from 100%. Understanding this helps you know when percent deviations are acceptable and when to check for errors. The calculator will note if percents don't add to 100%—review the notes to verify your inputs.
What if my mole ratios aren't whole numbers?
If ratios like 1.5, 1.33, or 1.25 appear, multiply all ratios by a common factor to get whole numbers: (1) Ratios like 1.5 or 2.5 → multiply all by 2 (e.g., 1.5:2.5 becomes 3:5). (2) Ratios like 1.33 or 1.67 → multiply all by 3 (e.g., 1.33:2.67 becomes 4:8). (3) Ratios like 1.25 or 1.75 → multiply all by 4 (e.g., 1.25:3.75 becomes 5:15). The goal is to find the smallest multiplier that gives whole numbers within rounding tolerance (typically within 0.1 of an integer). The calculator does this automatically—observe it to reinforce the multiplication step. Understanding this helps you handle non-integer ratios and see that empirical formulas must have whole-number subscripts.
How do I determine the molecular formula?
You need the measured molar mass (from mass spectrometry, freezing point depression, vapor density, etc.). Calculate the multiplier n: n = Measured Molar Mass ÷ Empirical Molar Mass. Then multiply each subscript in the empirical formula by n. For example, if empirical formula is CH₂O (molar mass ≈ 30 g/mol) and measured molar mass is 180 g/mol, then n = 180 ÷ 30 = 6, so molecular formula is C₆H₁₂O₆. The multiplier n must be a positive integer (1, 2, 3, ...). If n is not close to a whole number, check for errors in the measured molar mass, percent composition, or empirical formula calculation. Understanding this relationship helps you see how empirical formulas connect to molecular formulas through molar mass.
What is Hill notation?
Hill notation is the standard way to write chemical formulas: (1) For carbon compounds: C first, then H, then other elements alphabetically (e.g., C₆H₁₂O₆ for glucose, C₂H₆O for ethanol). (2) For compounds without carbon: all elements in alphabetical order (e.g., H₂O for water, NaCl for salt). Hill notation ensures consistency in formula representation and makes formulas easier to compare and search. Understanding Hill notation helps you write formulas correctly and understand why formulas are written in specific orders. The calculator uses Hill notation automatically—observe it to reinforce the standard order.
Can this tool identify unknown compounds?
No. The empirical/molecular formula alone cannot identify a compound because many compounds share the same formula (isomers). For example, both ethanol (CH₃CH₂OH) and dimethyl ether (CH₃OCH₃) have the molecular formula C₂H₆O. Structural isomers (different connectivity) and compounds with different molecular formulas can share the same empirical formula (e.g., CH₂O is the empirical formula for glucose, formaldehyde, and acetic acid). Additional spectroscopic data (NMR, IR, mass spectrometry), physical properties, and structural information are needed for compound identification. Understanding this limitation helps you see why formulas are just one piece of compound identification, and why this tool is for educational purposes only, not actual chemical identification.
What are the limitations of this calculator?
This tool works only for discrete molecular compounds, not ionic compounds, polymers, or network solids. It assumes pure samples with no impurities. It uses averaged atomic masses and cannot account for isotopic variations. It cannot distinguish structural isomers (different compounds with the same molecular formula). It does not determine structural formula (connectivity of atoms). Results should be verified for educational purposes only. Real compound identification requires multiple analytical techniques (spectroscopy, chromatography, etc.). Understanding these limitations helps you see why this tool is educational, not predictive, and why additional data is needed for complete compound identification.
Why is my multiplier n not a whole number?
If n is not close to a whole number (like 2.7 instead of 3), this suggests either: (1) The measured molar mass is incorrect (check your experimental data), (2) There are errors in the percent composition (verify all percentages), or (3) The empirical formula calculation went wrong (check mole ratios and rounding). The multiplier n must be a positive integer (1, 2, 3, ...) because molecular formulas are whole-number multiples of empirical formulas. If n is significantly off (e.g., 2.3 or 3.7), double-check all input values. Understanding this helps you troubleshoot formula determination problems and verify your calculations are correct.
Empirical to Molecular Formula - From % + Molar Mass