Percent Composition Calculator

By: Calculator Grid

Percent Composition Calculator

Find the molar mass and mass percentage of each element in a compound from element choices and atom counts.

3 active elements 7 total atoms 100.00% total

Workbook ready for the startup example.

Compound inputs

Choose an element or leave this row unused.
Duplicate elements are rejected.
Atomic weights are standard rounded values.
Optional row.
Optional row.

Live results

Molecular weight
98.072 g/mol
Largest mass share
O · 65.25%
Formula summary
H₂SO₄
Molecular weight 98.072 grams per mole. Oxygen is 65.25 percent by mass.

Mass-share breakdown

The donut compares the mass contributions of hydrogen, sulfur, and oxygen within one mole of sulfuric acid.

Element detail

Element Symbol Atoms Atomic weight Mass contribution Mass percent
Hydrogen H 2 1.008 2.016 g/mol 2.06%
Sulfur S 1 32.06 32.060 g/mol 32.69%
Oxygen O 4 15.999 63.996 g/mol 65.25%
Mass contribution equals atomic weight multiplied by atom count. Percentages are calculated from unrounded contributions and may differ slightly from hand calculations that round early.

How to use the percent composition calculator

What this calculator does. This tool converts a compound's element list and atom counts into its molecular weight and the percentage of total mass contributed by each element. It is useful for checking formula work, preparing a laboratory calculation, comparing compounds, and understanding why elements with similar atom counts can contribute very different amounts of mass. It evaluates mass composition from a molecular or formula unit; it does not identify an unknown compound, determine purity, predict reaction yield, or account for a nonstandard isotope mixture.

When to use it. Use it when you need to verify a classroom percent-composition exercise, estimate how many grams of an element occur in 100 g of a pure compound, compare the mass burden of elements in candidate formulations, or create a documented spreadsheet of a completed calculation. Atomic weights in this calculator use conventional rounded values consistent with standard periodic-table practice; consult the IUPAC periodic table and atomic-weight guidance when precision or isotopic variation matters.

How to calculate. The calculator opens with a complete sulfuric-acid example, H₂SO₄, so the results, chart, table, and Excel workbook are available immediately.

  1. For First element through Fifth element, choose each distinct element present in the chemical formula. Leave unused rows set to “Unused.”
  2. Enter the matching Number of atoms as a positive whole number. For H₂SO₄, enter 2 for hydrogen, 1 for sulfur, and 4 for oxygen.
  3. Read Molecular weight, Largest mass share, and Formula summary, then inspect the mass-share chart and element-detail table.
  4. Select Download Excel to create a current-state workbook. Selecting Reset clears the demonstration data and disables export until a complete valid compound is entered again.

Input guide. Each element selector is optional by itself, but at least one active element is required. A selected element must have a matching atom count. Atom counts accept digits only, must be whole numbers from 1 through 1,000,000, and cannot use decimals, signs, commas, units, or scientific notation. For example, glucose uses carbon 6, hydrogen 12, and oxygen 6. Increasing an atom count increases that element's mass contribution and usually its percentage, while also increasing molecular weight. A common mistake is entering a coefficient from a balanced equation instead of the subscript inside one compound formula. Another is selecting the same element twice; duplicates are rejected because their counts should be combined into one row. Unused rows should remain “Unused” with a count of 0 or blank.

Output guide. Molecular weight is the sum of all element mass contributions in g/mol; it is numerically equal to relative molecular mass in unified atomic mass units for the same formula. Largest mass share identifies the element with the highest mass percentage, not necessarily the greatest atom count. Formula summary compacts the selected symbols and counts into a readable formula. The summary pills report active elements, total atoms, and composition total. The table columns show the element name, symbol, atom count, atomic weight, mass contribution, and mass percent. A high percentage means that element supplies a large fraction of the compound's mass; a value near zero means its contribution is small. Valid percentages always total 100% apart from display rounding. The donut chart represents the same mass percentages as the table and is an exact part-to-whole comparison, not a recommendation or uncertainty estimate.

Worked example. For H₂SO₄, hydrogen contributes 2 × 1.008 = 2.016 g/mol, sulfur contributes 1 × 32.06 = 32.060 g/mol, and oxygen contributes 4 × 15.999 = 63.996 g/mol. Their sum is 98.072 g/mol. Dividing each contribution by 98.072 and multiplying by 100 gives 2.06% hydrogen, 32.69% sulfur, and 65.25% oxygen. Oxygen therefore appears as the largest mass share even though the molecule contains only four oxygen atoms. The first-open display and workbook use these same unrounded values.

Learn more. The NIST atomic-weight and isotopic-composition resource explains the measurement basis behind atomic masses, while the OpenStax discussion of empirical and molecular formulas shows how percent composition connects to formula determination.

Formula and interpretation

mass percent of element = (atom count × atomic weight ÷ compound molecular weight) × 100

The numerator is the mass contribution of one element in one mole of the compound. The denominator is the sum of every contribution. Because both quantities use the same mass-per-mole unit, the ratio is dimensionless and becomes a percentage after multiplication by 100.

Do not round each contribution too aggressively before dividing. Keeping canonical precision until the final display produces percentages that cross-foot more reliably to 100%.

Common mistakes and limits

  • Use subscripts from one formula unit, not stoichiometric coefficients from a reaction equation.
  • Combine repeated occurrences of the same element before entering the formula.
  • Remember that atomic weights are averages for naturally occurring isotope mixtures. Isotopically enriched samples can have different molar masses.
  • Percent composition describes a pure compound. Real mixtures, hydrates, solutions, and impure samples may require additional mass-balance terms.