Percent Composition Calculator

Percent composition by mass tells you what fraction of a compound's total molar mass is contributed by each element. It is one of the most fundamental analyses in chemistry because it links a compound's formula to measurable physical quantities, specifically the masses of the individual elements. The formula for each element is straightforward: multiply the number of atoms of that element in one formula unit by the element's molar mass to get the element's contribution to the molar mass, then divide by the compound's total molar mass and multiply by 100. The percentages of all elements must sum to exactly 100 percent. This calculator accepts up to six elements. For each element you enter a symbol (for labelling), the number of atoms in the formula and the molar mass of that element in grams per mole. Common molar masses: H = 1.008, C = 12.011, N = 14.007, O = 15.999, Na = 22.990, Cl = 35.45, Ca = 40.078. The calculator returns the molar mass contribution of each element, the compound's total molar mass and the percentage by mass for each element. The worked example is pre-filled for water (H2O) showing hydrogen at 11.19% and oxygen at 88.81%. Percent composition data are used to verify molecular formulas from synthesis, to identify unknowns by elemental analysis, and as the starting point for deriving empirical formulas.

Advertisement

Enter up to 6 elements (symbol, number of atoms, molar mass g/mol):

18.015 g/mol
molar mass of compound
ElementAtomsMM (g/mol)Contribution (g/mol)% by mass

Molar masses: H = 1.008, C = 12.011, N = 14.007, O = 15.999, Na = 22.990, Cl = 35.45, Ca = 40.078, Fe = 55.845, S = 32.06, P = 30.974.

How it works

For each element i, the mass contribution is: contribution_i = atoms_i x molar_mass_i. The total molar mass M = sum of all contributions. The percentage by mass of element i is: % = (contribution_i / M) x 100. The percentages sum to 100 percent (within rounding). To find the empirical formula from percent composition, divide each percentage by the element's molar mass to get a mole ratio, then simplify to the smallest whole-number ratio.

Worked example

Water (H2O): Hydrogen (H) has 2 atoms at 1.008 g/mol, contribution = 2.016 g/mol. Oxygen (O) has 1 atom at 15.999 g/mol, contribution = 15.999 g/mol. Total molar mass = 18.015 g/mol. Percent H = 2.016 / 18.015 x 100 = 11.19%. Percent O = 15.999 / 18.015 x 100 = 88.81%. Sum = 100.00%. These match the defaults pre-filled above.

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.

Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.

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 by 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.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-07-27 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.