Empirical Formula Calculator

This calculator determines the empirical formula of a compound, the simplest whole-number ratio of its atoms, from the percentage composition or masses of its elements. The empirical formula is a fundamental result in chemistry: it tells you the relative numbers of each kind of atom in a substance, reduced to the lowest terms. Glucose, for instance, has the molecular formula C6H12O6 but the empirical formula CH2O, because the atoms are in the ratio one to two to one. Chemists determine empirical formulas from experimental data, typically the percentage by mass of each element found by analysis, which is the first step in identifying an unknown compound. The method is a clear sequence: treat the percentages as grams in a 100 gram sample, convert each element's mass to moles by dividing by its molar mass, then divide all the mole figures by the smallest to get the ratio, and finally scale up to the nearest whole numbers. It is reliable but tedious by hand, with plenty of room for arithmetic slips. This tool does it automatically. You enter each element's symbol, its percentage or mass, and its molar mass, for up to three elements, and the calculator works out the mole ratio and presents the empirical formula. It shows the mole ratios too, so you can follow the logic. The results update as you type. Use it for chemistry homework, for interpreting analytical data, or to check your working. A note: the empirical formula gives the ratio, not the actual molecule; to get the molecular formula you also need the compound's molar mass. The calculation rounds the ratio sensibly to the nearest small whole numbers.

CH₂O
empirical formula (simplest whole-number ratio)
-

Enter percent by mass (or grams) and molar mass for each element. Leave an element blank to ignore it. Gives the ratio, not the molecular formula. Rounded sensibly.

How it works

Each element's percentage is treated as grams in a 100 gram sample and divided by its molar mass to give moles. All the mole values are divided by the smallest, producing a ratio. That ratio is then scaled by a small whole number where needed so every element comes out as a whole number, giving the empirical formula.

Worked example

A compound that is 40.0% carbon, 6.7% hydrogen and 53.3% oxygen gives moles of about 3.33, 6.65 and 3.33. Dividing each by the smallest, 3.33, gives 1, 2 and 1. So the empirical formula is CH2O, the same as the empirical formula of glucose and many other carbohydrates.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

© 2019 to 2026 Calculate.co.nz. All rights reserved.