Loading…

Law of Constant Composition

General Chemistry • Chemical Compounds

View all topics

Build a chemical formula by choosing each element and its subscript (count). The calculator uses standard atomic masses to compute the compound’s percent composition by mass. Optionally enter a sample mass to get grams of each element.

Quick formula input (optional)
Accepts parentheses and Unicode subscripts (H₂O). Ionic charges/electrons are not supported.
Compound definition
Up to 6 distinct elements. Duplicate selections are combined automatically.
g
Ready

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What does the law of constant composition mean in chemistry?

It states that every pure sample of the same compound contains the same elements in the same mass ratios, regardless of how the compound was made. This is also called the law of definite proportions.

How do you calculate percent composition from a chemical formula?

First compute molar mass M = sum(n_i A_i). Then each element’s mass fraction is w_i = (n_i A_i)/M and percent composition is %_i = 100 x w_i.

How do I find grams of each element from a sample mass?

Use the mass fraction for each element and multiply by the sample mass: m_i = w_i x m_sample. The calculator performs this automatically when you enter a sample mass in grams.

Why should the percent composition values add up to 100%?

Percent composition partitions the total mass of the compound into the element contributions, so the sum of all element percents is 100% (up to rounding). Small differences can occur from rounding displayed values.

Why does the calculator combine duplicate elements in the formula builder?

A correct formula counts the total atoms of each element, even if entered in multiple rows. Combining duplicates ensures each element’s total subscript is used once in the molar mass and percent calculations.