Search topics and sections

Chemical composition is the identity and relative number of the chemical elements that make up a substance. Water, for example, contains two hydrogen atoms for every oxygen atom, which the formula H₂O records.

Chemists state composition in a few standard ways. These are a chemical formula, the percentage by mass of each element, or, for a mixture, the fraction of each component. A compound's elemental makeup defines its chemical identity, and measuring that makeup is often the first step in working out what an unknown substance is.[1]

What composition describes

Composition answers two questions about a substance. These are which elements it contains and how much of each there is, compared with the others.

It can be stated by numbers of atoms or by mass. The two give different figures for the same substance because atoms of different elements have different masses. In water, hydrogen atoms outnumber oxygen atoms two to one, but oxygen makes up about 89% of the mass.

Composition of water by number of atoms and by mass By number of atoms By mass O H H H H O 2 H : 1 O H 11.19% O 88.81% H = 1.008 g/mol, O = 16.00 g/mol
Water (H2O\mathrm{H_2O}) has two hydrogen atoms for each oxygen atom, but hydrogen makes up only 11.19% of its mass. Oxygen makes up 88.81% because its molar mass is much larger (MH=1.008M_\mathrm{H} = 1.008 g/mol, MO=16.00M_\mathrm{O} = 16.00 g/mol).

Composition is the basis of a substance's identity. Every sample of a compound has the same makeup, which is why a formula can name it.[1][2]

Pure substances and mixtures

A pure substance has a constant composition, but a mixture does not. Any sample of sucrose has the same makeup, whatever its source. A mixture contains two or more types of matter that can be present in varying amounts.[2]

Mixtures come in two kinds.[2]

  • A heterogeneous mixture has a composition that varies from point to point, as in oil-and-vinegar salad dressing.
  • A homogeneous mixture, or solution, has a uniform composition throughout. A given batch can still be made with more or less of each component.

Air is a homogeneous mixture whose composition changes with humidity. Water vapor can make up as much as about 4% of its volume, which lowers the share of every other gas.[3]

Gas Dry air Air with 4% water vapor
Nitrogen (N₂) 78.084% 74.96%
Oxygen (O₂) 20.947% 20.11%
Argon (Ar) 0.934% 0.89%

Ways to state composition

Chemical formulas

A chemical formula lists the element symbols in a substance, with subscripts giving the number of atoms of each. Two kinds of formula describe composition.[4]

  • An empirical formula gives the simplest whole-number ratio of atoms (or ions). Titanium dioxide, TiO₂, has twice as many oxygen atoms as titanium atoms.
  • A molecular formula gives the actual number of atoms of each element in one molecule. It is always a whole-number multiple of the empirical formula.

Different compounds can share an empirical formula. Glucose (C₆H₁₂O₆) and acetic acid (C₂H₄O₂) both reduce to CH₂O. Benzene (C₆H₆) reduces to CH.[4]

Molecular formulas reduced to empirical formulas Molecular formula (actual atoms per molecule) Empirical formula (simplest ratio) Glucose C6H12O6 Acetic acid C2H4O2 Benzene C6H6 CH2O CH divide by 6 divide by 2 divide by 6
Glucose (C6H12O6C_6H_{12}O_6) divided by 6 and acetic acid (C2H4O2C_2H_4O_2) divided by 2 both reduce to the same empirical formula CH2OCH_2O. Benzene (C6H6C_6H_6) divided by 6 reduces to CHCH.

Percent composition by mass

Percent composition is the percentage by mass of each element in a compound.[1] It is found from the formula and the molar masses of the elements:

% E=a×MEMcompound×100%\%\,\mathrm{E} = \frac{a \times M_{\mathrm{E}}}{M_{\mathrm{compound}}} \times 100\%

Here aa is the number of atoms of element E in the formula, MEM_{\mathrm{E}} is the molar mass of E, and McompoundM_{\mathrm{compound}} is the molar mass of the whole compound. The percentages of all the elements add up to 100%, apart from small rounding differences.

For water, take H as 1.008 g/mol and O as 16.00 g/mol.[1] The molar mass is 2(1.008) + 16.00 = 18.016 g/mol. Hydrogen is then 2.016/18.016 = 11.19% of the mass, and oxygen is 88.81%.

Compound Formula Percent by mass
Ammonia NH₃ 82.27% N, 17.76% H[1]
Aspirin C₉H₈O₄ 60.00% C, 4.476% H, 35.52% O[1]
Sucrose (table sugar) C₁₂H₂₂O₁₁ 42.1% C, 6.5% H, 51.4% O[2]

The ammonia figures come from its molar mass of 17.03 g/mol, of which nitrogen is 14.01 g/mol and hydrogen 3.024 g/mol.[1] The share of nitrogen matters to buyers choosing among nitrogen fertilizers such as ammonia and urea, since nitrogen is the active ingredient.[1]

Fractions in mixtures

The composition of a mixture is stated as the share of each component, not each element. The International Union of Pure and Applied Chemistry (IUPAC) defines two common measures.[5][6]

wi=mi∑jmjxi=ni∑jnjw_i = \frac{m_i}{\sum_j m_j} \qquad x_i = \frac{n_i}{\sum_j n_j}
  • The mass fraction wiw_i is the mass mim_i of component ii divided by the total mass of all components.
  • The amount fraction, also called mole fraction, xix_i is the amount nin_i (in moles) of component ii divided by the total amount. It equals the number of particles of that component divided by the total number of particles.

Each set of fractions adds up to 1. Multiplying a fraction by 100 gives a percentage.

Laws of chemical combination

Definite proportions

The law of definite proportions states that every sample of a pure compound contains the same elements in the same proportion by mass.[7] It is also called the law of constant composition. For example, every sample of isooctane, a component of gasoline, has a carbon-to-hydrogen mass ratio of 5.33 to 1.[7]

The French chemist Joseph-Louis Proust gathered the first conclusive evidence for the law. He studied the composition of many substances, especially the oxides of iron (1797).[8] Claude Berthollet argued for indefinite proportions and contested Proust's findings.[8]

The Scottish chemist Thomas Thomson confirmed some of Proust's results and wrote in 1801 that Proust had proved the point.[8]

Multiple proportions

The law of multiple proportions covers two elements that form more than one compound. The masses of one element that combine with a fixed mass of the other are in a ratio of small whole numbers.[9] John Dalton announced the law in 1803.[9]

Nitrogen and oxygen form five distinct oxides. With 14 grams of nitrogen, they hold 8, 16, 24, 32, and 40 grams of oxygen, a ratio of 1 to 2 to 3 to 4 to 5.[9] Working from the molar masses (N = 14, O = 16), these amounts match the formulas N₂O, NO, N₂O₃, NO₂, and N₂O₅.

Oxygen combining with a fixed mass of nitrogen in five oxidesGrams of oxygen per 14 g of nitrogen0816243240Ratio816243240N₂ONON₂O₃NO₂N₂O₅12345
For a fixed 14 g of nitrogen, the masses of oxygen in N2ON_2O, NONO, N2O3N_2O_3, NO2NO_2 and N2O5N_2O_5 are 8, 16, 24, 32 and 40 g. These masses stand in the small whole-number ratio 1 : 2 : 3 : 4 : 5, as the law of multiple proportions states.

Copper and chlorine give another example. A green solid has 0.558 g of chlorine per gram of copper, and a brown solid has 1.116 g. The ratio of these two numbers is 2 to 1, which fits one chlorine atom per copper atom in the green compound and two in the brown one.[7]

Explanation by atoms

Both laws follow from atoms combining in small whole-number ratios. Dalton's atomic theory, first published in 1807, held that a compound has atoms of two or more elements in a fixed, small whole-number ratio.[7] Confirming the law of multiple proportions for many compounds was the strongest argument for Dalton's view that matter consists of atoms.[9]

From measured masses to a formula

Chemists usually measure the mass of each element first and then work out the formula. Since a formula counts atoms, not masses, each mass must be converted to an amount in moles.[1]

From element masses to molecular formula Mass of each element (g) Moles of each element Mole ratio Empirical formula Molecular formula divide by molar mass divide by smallest round to whole numbers multiply subscripts by n n = molar mass / empirical formula mass 1.71 g C 0.287 g H 0.142 mol C 0.285 mol H 1 : 2.00 CH2
To find a formula from mass data, convert each element's mass to moles, divide by the smallest mole value, and round to get the empirical formula. Multiplying its subscripts by nn (molar mass divided by empirical formula mass) gives the molecular formula. In the example, 1.71 g C and 0.287 g H give CH2\mathrm{CH_2}.
  1. Measure the mass of each element in a sample.
  2. Divide each mass by the element's molar mass to get moles.
  3. Divide each mole amount by the smallest one to get a ratio.
  4. Round to whole numbers, or multiply all values by a small integer until they are whole. This gives the empirical formula.
  5. To find the molecular formula, divide the measured molar mass by the empirical formula mass. Multiply every subscript by the result, nn.

The last step uses this relation:[1]

n=MmolecularMempiricaln = \frac{M_{\mathrm{molecular}}}{M_{\mathrm{empirical}}}

Here MmolecularM_{\mathrm{molecular}} is the molar (or molecular) mass of the compound, and MempiricalM_{\mathrm{empirical}} is the sum of the atomic masses in the empirical formula.

As an example, take a sample with 1.71 g of carbon and 0.287 g of hydrogen.[1] That is 1.71/12.01 = 0.142 mol C and 0.287/1.008 = 0.285 mol H. The ratio is 1 to 2.00, so the empirical formula is CH₂.

The molecular formula needs one more measurement. Nicotine has the empirical formula C₅H₇N, with a mass of 81.13 g/mol. Its molar mass is twice that, so n=2n = 2 and the molecular formula is C₁₀H₁₄N₂.[1]

Measuring composition

Measuring which elements a sample contains, and in what ratios, is called elemental analysis. The term covers several techniques that identify the atomic composition of matter.[10] It is part of analytical chemistry.

Combustion analysis

Combustion analysis finds the carbon and hydrogen content of compounds such as hydrocarbons. It is one of the most widely used elemental analysis methods.[10] A weighed sample burns completely at high temperature in a stream of oxygen gas, and its carbon and hydrogen leave as carbon dioxide and water.[11]

The gases pass through preweighed tubes that each absorb one product. Magnesium perchlorate can absorb the water and sodium hydroxide the carbon dioxide.[11] The mass gained by each tube equals the mass of CO₂ or H₂O it trapped. From these masses the carbon and hydrogen in the sample are calculated.[11]

Combustion analysis train O₂ in Furnace Sample CO₂, H₂O, O₂, other gases O₂ and other gases out H₂O absorber(e.g. Mg(ClO₄)₂) CO₂ absorber(e.g. NaOH) weighed beforeand after weighed beforeand after
A combustion analysis train. The sample burns in a stream of oxygen. The water absorber, then the CO2\mathrm{CO_2} absorber, each gains mass equal to the H2O\mathrm{H_2O} or CO2\mathrm{CO_2} it traps.

Other methods

Method What it measures How it works Sample afterward
ICP-MS Trace elements, down to parts per trillion[12] A liquid sample is sprayed as a mist into an argon plasma, a very hot, electrically charged gas, and the ions formed are sorted by mass-to-charge ratio[12] Usually destroyed, since it is first dissolved in strong acid[12]
X-ray fluorescence (XRF) Many elements at once[12] X-rays excite the sample, which then gives off X-rays unique to each element; their strength tracks each element's amount[12] Unchanged[12]

Mass spectrometry gives a different kind of information. The mass spectrum of a compound often supplies its molecular mass, the value of MmolecularM_{\mathrm{molecular}} used to get a molecular formula.[1]

Limits of composition

Same composition, different substance

Composition does not always identify a compound. Isomers are compounds with the same chemical formula but different molecular structures.[4]

Acetic acid, the acid in vinegar, and methyl formate are both C₂H₄O₂. In methyl formate, one oxygen atom sits between the two carbon atoms, and this small change gives very different chemical properties.[4]

Isomers fall into types by how they differ. Those that differ in how the atoms connect are structural isomers, as acetic acid and methyl formate are. Those that differ only in how the atoms are oriented in space are spatial isomers, or stereoisomers.[4]

Acetic acid and methyl formate, structural isomersHHHCCOOHHCOOCHHHAcetic acidMethyl formateC₂H₄O₂C₂H₄O₂
Acetic acid (CH3COOHCH_3COOH) and methyl formate (HCOOCH3HCOOCH_3) are structural isomers. Both have the molecular formula C2H4O2C_2H_4O_2, but their atoms are bonded in a different order. The shaded oxygen in methyl formate sits between its two carbon atoms.

Compounds without fixed ratios

Some solid compounds break the law of definite proportions. In a non-stoichiometric compound, the numbers of atoms cannot be written as a ratio of small whole numbers.[13] These are sometimes called berthollides, in contrast to daltonides, whose atom ratios are small whole numbers.

Most have compositions close to a simple ratio. They are written with formulas such as WO₃₋ₓ, Co₁₋ₓO, or Zn₁₊ₓO, where xx is positive and much smaller than 1.[13]

Non-stoichiometric compounds are best known among the transition metals. Several are used in electronic parts.[13]

Wüstite, an iron oxide written Fe₁₋zO, is a well-studied case. Around 1400 °C its iron deficit zz ranges from about 0.04 to 0.18, and near 600 °C it is about 0.065.[14]

Some apparent cases turn out to be a series of separate compounds with simple ratios. Molybdenum forms oxides MoₙO₃ₙ₋₁ for nn = 8, 9, 10, 11, 12, and 14. A true non-stoichiometric compound would instead vary smoothly in composition over a range, with no separate compounds to detect.[13]

References

  1. 3.2 Determining Empirical and Molecular Formulas, Chemistry 2e, OpenStax, 2019.
  2. 1.2 Phases and Classification of Matter, Chemistry 2e, OpenStax, 2019.
  3. The Atmosphere, National Oceanic and Atmospheric Administration, JetStream.
  4. 2.4 Chemical Formulas, Chemistry 2e, OpenStax, 2019.
  5. Mass fraction, IUPAC Compendium of Chemical Terminology (Gold Book), 2025.
  6. Amount fraction, IUPAC Compendium of Chemical Terminology (Gold Book), 2025.
  7. 2.1 Early Ideas in Atomic Theory, Chemistry 2e, OpenStax, 2019.
  8. Law of definite proportions, Encyclopaedia Britannica.
  9. Law of multiple proportions, Encyclopaedia Britannica.
  10. Searching for the Truth: Elemental Analysis, A Powerful but Often Poorly Executed Technique, ACS Central Science, 2022.
  11. 4.5 Quantitative Chemical Analysis, Chemistry 2e, OpenStax, 2019.
  12. From ICP-MS to XRF: Ways to Measure Metals, CDC Stacks, 2025.
  13. Nonstoichiometric compound, Encyclopaedia Britannica.
  14. The complex nonstoichiometry of wüstite Fe1-zO: Review and comments, HAL open archive, 2018.

Figure