FormatFlow

No tool matches “”

Try a format (“webp”, “mp3”) or a verb (“merge”, “compress”).

Loading index

↵to open

Chemistry Tools · Updated October 21, 2026 · Reviewed by FormatFlow Editorial

Percent Composition Calculator

You can calculate the mass percent of every element in a chemical formula, with an optional sample mass to show how many grams of each element that sample contains.

Runs in your browserFree · No sign-up · No watermark
FORMULA → MASS %Runs in your browser
Loading the tool…

Everything runs locally in this tab. No file is uploaded while the tool loads.

This tool runs in your tab. Nothing is uploaded and no copy is stored.

How files are handled

At a glance

Works with
FORMULA → MASS %
Processing
In your browser
Price
Free, no account
Updated
October 21, 2026
All Chemistry Tools

About Percent Composition Calculator

Percent composition answers a practical question: what fraction of a compound's mass comes from each element? It is how you check an empirical formula, plan a gravimetric experiment, or explain why one oxide of iron is richer in iron than another.

The calculator parses the formula with the same engine as the molar mass tool, including nested brackets and hydrate dots, then divides every element's contribution by the total molar mass. Add an optional sample mass and the same percentages become grams of each element in that sample.

What this tool does

The details that matter when you use Percent Composition Calculator for real work.
  • Mass percent for every element

    Each element is listed with its atom count, atomic mass, molar mass contribution and the percentage of the compound's mass it accounts for.

  • Optional sample mass

    Enter a sample mass in grams and the table gains a column showing the mass of each element in that sample.

  • Nested groups and hydrates

    Formulas such as Ca3(PO4)2 and CuSO4·5H2O parse correctly, so grouped and hydrated compounds get the right composition.

  • Step-by-step working

    The calculation shows the molar mass arithmetic and each percentage division, so every value can be checked by hand.

  • Clear formula errors

    Unknown symbols, unbalanced brackets and zero subscripts are reported with the same specific messages as the molar mass calculator.

  • Local and private

    The formula and sample mass are processed in the page; nothing is uploaded, stored or logged.

How to use Percent Composition Calculator

No account, no installation — the whole job happens in this browser tab.
  1. 01

    Enter the formula

    Type the chemical formula with normal digits for subscripts, for example H2SO4 or Al2(SO4)3.

  2. 02

    Add a sample mass if needed

    Optionally enter a mass in grams to convert the percentages into the mass of each element in that sample.

  3. 03

    Read the composition table

    Check the molar mass, then the contribution and mass percentage for each element.

  4. 04

    Use the working panel

    Follow the arithmetic for each percentage and, when a sample mass is set, for each element's mass in the sample.

  5. 05

    Reset for another compound

    Press Reset to clear the formula and sample mass and start again.

How this tool works

Works with
FORMULA → MASS %
Processing
Client-side, in your browser. Nothing is uploaded.
Requirements
Chrome, Edge, Firefox or Safari · JavaScript enabled

Limitations worth knowing

  • Uses conventional standard atomic weights, so displayed percentages may not total exactly 100 after rounding.
  • Calculates composition from a formula only; finding an empirical or molecular formula from measured percentages is not included.
  • Isotope-specific and mixture compositions are not modelled, because those need measured isotope data.

Privacy and file handling

Formulas and sample masses are processed in your browser tab. Nothing you enter is uploaded, stored or logged, and the calculator makes no network request.

Read the full privacy policy

Percent Composition Calculator FAQ

Short, direct answers to the questions people ask before using this tool.
How do I calculate percent composition from a formula?
Work out the molar mass, then divide the total mass of each element in one mole by the molar mass and multiply by 100. For water, hydrogen is 2.016 / 18.015 × 100 = 11.19% and oxygen is 15.999 / 18.015 × 100 = 88.81%.
Why do the percentages sometimes add up to 99.99 or 100.01?
Atomic weights and displayed percentages are rounded, so rounding errors of a few hundredths of a percent are normal. The underlying calculation is exact for the atomic weights used; the displayed values are not adjusted to force an exact total.
How are hydrate formulas like CuSO4·5H2O handled?
The hydrate dot parts are counted as one formula unit, so the water molecules contribute their hydrogen and oxygen to the total. For copper sulfate pentahydrate the percentages include the water of crystallization, and the molar mass includes five water molecules.
What does the optional sample mass add?
It converts percentages into grams. If a 50 g sample is 11.19% hydrogen by mass, then 0.1119 × 50 g = 5.60 g of that sample is hydrogen, and the table shows the same conversion for every element.
Is percent composition the same as an empirical formula?
They are related but opposite. Percent composition starts from a formula and gives mass percentages; finding an empirical formula starts from measured percentages, divides by atomic masses and reduces the mole ratio, which is a separate calculation this tool does not perform.
Do nested brackets and groups work?
Yes. The parser handles round, square and curly brackets, including nested groups, so formulas such as K4[Fe(CN)6] and Ca3(PO4)2 are expanded into the correct atom counts before the percentages are calculated.
Does the calculator use isotope-specific masses?
No. It uses standard relative atomic masses, which are weighted averages over the natural isotope mixture. For isotopically labeled compounds, or samples with unusual isotope ratios, the percentages from this tool will differ slightly from measured values.

Background reading

Format guides that explain the trade-offs behind Percent Composition Calculator.