Law of constant composition (definite proportions)
A pure compound always contains the same elements in the same fixed mass ratio, no matter where it comes from or how it is prepared. A definite proportions calculator applies this idea to compute elemental mass fraction and mass percent from a chemical formula (and optionally grams of each element in a sample).
Core definitions and essential equations
\[
\begin{aligned}
M &= \sum_i n_i\,A_{r,i} \\
w_i &= \frac{n_i\,A_{r,i}}{M} \\
\%\_i &= 100\,w_i
\end{aligned}
\]
\(n_i\) is the subscript (number of atoms) of element \(i\) in the formula, \(A_{r,i}\) is its relative atomic mass, and \(M\) is the molar mass in \(\mathrm{g\cdot mol^{-1}}\).
\(w_i\) is the mass fraction (between 0 and 1) and \(\%\_i\) is the mass percent. For all elements in a valid formula, \(\sum_i w_i = 1\) (so total percent is 100%).
How to interpret the results
A larger \(\%\_i\) means that element contributes more of the compound’s total mass, often due to a larger atomic mass, a larger subscript, or both. Mass percent describes composition by mass, not by particle count; it is used in formula checking, purity/identity comparisons, and composition problems in stoichiometry.
If the calculator outputs grams of each element for a given sample, those values represent how much of the sample’s mass is attributable to each element and should add up (within rounding) to the sample mass.
Common pitfalls
- Forgetting parentheses or subscripts (e.g., \(\mathrm{Ca(OH)_2}\) contains two O and two H).
- Ignoring hydrate water or dot notation (e.g., \(\mathrm{\cdot 5H_2O}\) adds extra H and O).
- Confusing mass percent with atomic percent or mole fraction.
- Rounding \(M\) or \(\%\_i\) too early and losing the 100% total check.
Micro example
\[
\begin{aligned}
M(\mathrm{MgO}) &= 24.305 + 15.999 = 40.304 \\
\%\_{\mathrm{Mg}} &= 100\cdot \frac{24.305}{40.304} = 60.3\%
\end{aligned}
\]
Use this tool to convert a chemical formula into mass percent composition or to split a measured sample mass into grams of each element. It is not the right tool for finding an unknown formula from experimental mass data; a next step for that is empirical formula determination and molecular formula calculation using molar mass.