Skip to content
Quasar Tools Logo

Empirical Formula Calculator

Calculate the empirical formula and molecular formula of any chemical compound. Enter the mass percentages (%) or weights (g) for each element in your sample, optionally add the molar mass of the compound, and the calculator computes the simplest whole-number ratio of atoms and the true molecular formula. All calculations run locally in your browser with no signup required.

Empirical Formula Calculator

Determine the empirical formula and molecular formula of a chemical compound from element percentages or raw masses. Add up to 10 elements, toggle modes, and view step-by-step ratio derivations in real time.

Load Common Presets

Elements Composition List

Up to 10 Elements
Element Symbol:
Element Weight:
Carbon (12.011 g/mol)
Percentage (%):
Element Symbol:
Element Weight:
Hydrogen (1.008 g/mol)
Percentage (%):
Element Symbol:
Element Weight:
Oxygen (15.999 g/mol)
Percentage (%):

Molecular Formula Solving (Optional)

Actual molecular weight of the substance to calculate the true Molecular Formula

Chemical Nomenclature definitions

  • Empirical Formula: The lowest whole-number chemical subscript ratio (e.g. $HO$).
  • Molecular Formula: The actual chemical composition subscript count of a single compound molecule (e.g. $H_2O_2$).
  • Hill System Sorting: Element subscript strings are ordered placing Carbon (C) first, Hydrogen (H) second, and all other elements in alphabetical order. If no Carbon is present, all elements are arranged alphabetically.

Why Use Our Empirical Formula Calculator?

Instant Empirical Solver

Input element percentages or gram weights and get the simplest chemical ratio formula instantly. Our browser-based engine runs with zero delay.

Molecular Formula Scaling

Enter the compound’s molar mass to automatically calculate empirical weight and scale subscripts, solving the true molecular formula.

Smart Subscript Ratio Solver

Automatically translates fractional decimal ratios (like 1.33 or 2.5) into whole numbers (like 4 and 5) using an advanced small-integer scaling algorithm.

100% Local Device Privacy

All calculations, mass lookups, and molar ratios are computed client-side inside your browser sandbox. Your academic data is never sent to any server.

Common Use Cases for Empirical Formula Calculator

Chemistry Students & Homework Helper

Quickly verify textbook stoichiometry problems. Convert mass percent composition to empirical formulas and confirm molecular structures with step-by-step ratios.

Elemental Analysis Verification

Scientists can convert raw CHNS elemental combustion analysis results (mass percentages of carbon, hydrogen, nitrogen, sulfur) into corresponding empirical formulas.

Mineralogy & Geological Assays

Geologists and crystallographers can convert oxide weight percentages from mineral samples into chemical formula representations for identification.

Novel Compound Synthesis

Synthetic chemists working with new organic compounds or coordination complexes can input experimental mass values to establish the tentative empirical formula.

Industrial Quality Control

Double check chemical specifications and bulk composition batches by translating raw element weights into empirical ratios for material certification.

Biochemical Material Modeling

Biochemists can estimate formula structures of complex biomolecules or polymers from mass ratio data, identifying basic structural monomeric repeats.

Understanding Empirical and Molecular Formulas

Empirical vs. Molecular Formulas

In chemistry, the empirical formula of a compound is the simplest whole-number ratio of atoms of each element present in the compound. For example, the empirical formula of hydrogen peroxide is HO, which tells us there is a 1:1 ratio of hydrogen to oxygen atoms. However, the actual number of atoms in a single molecule of the compound is represented by its molecular formula, which for hydrogen peroxide is H₂O₂. Another classic example is benzene: its empirical formula is CH, while its molecular formula is C₆H₆. The empirical formula is determined experimentally via combustion analysis, where the mass percentages of each element are measured.

How to Calculate Empirical Formulas Step-by-Step

To determine the empirical formula from mass percentages or weights manually, follow these standard steps:

  1. Assume 100 g Sample (for percentages): If given mass percentages, assume a 100 g sample so that each percentage maps directly to grams. For example, 40% Carbon becomes 40 g of Carbon.
  2. Convert Mass to Moles: Divide the mass of each element by its molar mass (atomic weight from the periodic table). Moles (n) = Mass (m) / Atomic Weight (AW).
  3. Determine the Mole Ratio:Divide each element's mole value by the smallest number of moles calculated in the previous step. This sets the smallest value to 1 and yields relative ratios for the others.
  4. Convert to Whole Numbers (Scaling): If the ratios are not integers (within a narrow rounding margin), multiply all ratios by a small whole number (2, 3, 4, 5, etc.) to clear the decimals. For example, if the ratio is 1.5, multiply all elements by 2.
  5. Write the Formula: Construct the chemical representation using these whole-number ratios as subscripts.

Small-Integer Ratio Scaling Logic

Ratios derived from dividing by the smallest mole value often contain decimal fractions because atoms combine in discrete integer amounts. Our empirical formula calculator uses an intelligent scaling solver that checks multipliers from 1 to 10. If the decimal portion is close to a standard fraction, the solver identifies the correct multiplier:

  • Ratios ending in ~0.50: Multiplied by 2 (e.g., 1.50 × 2 = 3).
  • Ratios ending in ~0.33 or ~0.67: Multiplied by 3 (e.g., 1.33 × 3 = 4).
  • Ratios ending in ~0.25 or ~0.75: Multiplied by 4 (e.g., 1.25 × 4 = 5).
  • Ratios ending in ~0.20 or ~0.40 or ~0.60 or ~0.80: Multiplied by 5.

If elements deviate slightly due to measurement rounding in real-world lab assays, our calculator applies a tolerance of 0.07 to automatically round the values to the nearest whole integer, preventing spurious formulas and ensuring realistic results.

Finding the Molecular Formula

If the actual molecular weight (molar mass) of the compound is known, the molecular formulacan be resolved. The molecular formula is always a whole-number multiple of the empirical formula:
Molecular Formula = (Empirical Formula) × nWhere the multiplier n is:
n = Molar Mass of Compound / Mass of Empirical FormulaOnce n is computed, all element subscripts in the empirical formula are multiplied by n to produce the molecular formula.

Frequently Asked Questions About Empirical Formula Calculator

An empirical formula represents the simplest whole-number ratio of the elements in a compound (e.g. CH₂O for glucose). A molecular formula represents the actual, exact number of atoms of each element in a single molecule of the compound (e.g. C₆H₁₂O₆ for glucose). The molecular formula is always a whole-number multiple of the empirical formula.

To find the molecular formula, toggle the element inputs, enter their mass percentages or weights, and input the actual "Compound Molar Mass" (in g/mol) in the dedicated molecular formula field. The calculator will find the empirical formula first, compute its formula weight, find the integer multiplier, and output the exact molecular formula subscripts.

No. While theoretical calculations assume 100% mass, real-world laboratory assays have experimental rounding and measurement errors. Our empirical formula calculator is robust enough to handle total percentages that sum to slightly more or less than 100%. The mathematical ratios will still be resolved correctly.

Our calculator runs a subscript scaling search that tests multipliers from 1 to 10. It checks if multiplying all ratios by a number yields values that are very close to integers (within a 0.07 tolerance limit). If a ratio is close to a standard decimal fraction, it multiplies all elements by the corresponding scaling factor (like 2 for halves, 3 for thirds, etc.).

Yes. You can toggle the input mode between "Mass Percent (%)" and "Mass in Grams (g)". The underlying math remains identical because mass percentages are equivalent to grams in a hypothetical 100 g sample. You can enter any raw weight values in grams for each element.

All 118 elements of the periodic table are supported. You can type the standard element symbols (e.g., C, H, O, N, Na, Cl, Fe) into the input fields, and the calculator will automatically look up and display their IUPAC 2021 standard atomic weights.

Yes, entirely. The empirical formula calculator performs all ratios, divisions, and scaling locally in your web browser. No chemical formulas, element lists, mass values, or results are ever sent to our servers or stored externally. Your lab data stays private.

The rounding tolerance (set to 0.07) is the maximum deviation allowed when rounding a scaled decimal mole ratio to the nearest integer. For example, a scaled value of 2.05 will round to 2 because its deviation (0.05) is under the 0.07 tolerance. This accounts for minor experimental errors in combustion analysis.