Mole Fractions and Gas Mixtures

Air is roughly one-fifth oxygen and four-fifths nitrogen. But what does "one-fifth" actually mean at the molecular level? The answer is the mole fraction. It is the simplest and most useful way to describe composition in a gas mixture. It converts a vague idea like "mostly nitrogen" into a precise number. That number can be plugged into an equation. Mole fractions matter for almost every practical gas calculation. This includes scuba tank blending, industrial reactor feeds, and atmospheric chemistry. Each of these starts by asking how much of each gas is present. Partial pressures, reaction quotients, and vapor-liquid equilibria all trace back to one dimensionless ratio. This article defines mole fraction rigorously. It links mole fraction to Dalton's law of partial pressures. You will see the core equations derived from first principles. Then you will work two full numerical examples. Finally, you will see how this foundation sets up the study of real gas mixtures.

Key takeaways
  • Mole fraction xix_i is the fraction of all moles in a mixture that belong to gas ii; it is dimensionless and always between 0 and 1.
  • Mole fractions of every component in a mixture always sum to exactly 1.
  • For an ideal gas mixture, partial pressure equals mole fraction times total pressure: pi=xiPp_i = x_i P.
  • This relation follows directly from Dalton's law and the ideal gas equation applied to each component separately.
  • Mole fraction is composition-scale-independent — it does not care whether you have 1 mole or 1000 moles of gas, only the ratio.
  • Key idea: in an ideal gas mixture, each component contributes to the total pressure in exact proportion to its mole fraction.
The core insight

Because every ideal gas molecule occupies the same average volume regardless of its identity, the fraction of pressure that a gas contributes to a mixture equals the fraction of molecules (moles) that it contributes — this single proportionality, pi=xiPp_i = x_i P, is what makes mole fraction the natural currency of gas composition.

The physical picture

Picture a rigid, sealed container holding a mixture of nitrogen, oxygen, and argon — essentially dry air. Each gas molecule dashes around independently, colliding with the walls and with other molecules. In the ideal gas limit, molecules are treated as point particles that do not interact except through instantaneous elastic collisions. This means each gas behaves as though the others were not there, each exerting its own partial pressure exactly as it would if it alone filled the container at the same temperature. The total pressure the container walls feel is just the sum of these independent contributions — that is Dalton's law, a result you have already met. Mole fraction takes this one step further: it tells you what share of the total moles (and hence, for an ideal gas, what share of the total pressure) belongs to each component. If a container holds 4 mol of N₂ and 1 mol of O₂, then 4 out of every 5 moles are nitrogen. The mole fraction of nitrogen is 0.80, and nitrogen must therefore account for 80% of the total pressure. This proportionality is not an approximation layered on top of Dalton's law — it is a direct algebraic consequence of applying the ideal gas equation to each gas separately and then dividing by the total. The derivation below makes that explicit.

Figure
A gas mixture: moles present versus pressure contributed
Container: 4 mol N₂ + 1 mol O₂ + 0 mol Ar, total 5 mol, T = 298 K, V = 10.0 L Moles (composition) N₂: x = 0.80 O₂: x=0.20 Pressure (Dalton) p(N₂) = 0.80P p(O₂)=0.20P Same fraction: 80% / 20% Same fraction: 80% / 20%
Figure
Partial pressure versus mole fraction at fixed total pressure P = 1.00 atm
p_i = x_i P, straight line through origin, slope = P = 1.00 atm mole fraction x_i p_i / atm (0, 0) (0.5, 0.50 atm) (1.0, 1.00 atm) 0 1.0

The core relations

xi=nintotal=ni∑jnjx_i = \frac{n_i}{n_{\text{total}}} = \frac{n_i}{\sum_j n_j}

where nin_i is the moles of component ii and ntotaln_{\text{total}} is the sum of moles of every component present.

∑ixi=1\sum_i x_i = 1

where the sum runs over all components in the mixture — a consequence of the definition, not an extra assumption.

pi=xiPp_i = x_i P

where pip_i is the partial pressure of component ii and PP is the total pressure of the mixture.

P=∑ipiP = \sum_i p_i

where this is Dalton's law of partial pressures, restated for reference.

Derivation AFrom Dalton's law to p_i = x_i P

Goal. Show that the partial-pressure/mole-fraction relation follows directly from the ideal gas law applied component by component, with no extra assumptions beyond ideality.

Step 1. Write the ideal gas law for each component separately. Because ideal gas molecules do not interact, each component behaves as if it alone occupied the full container volume VV at the mixture temperature TT. So for component ii,

piV=niRTp_i V = n_i RT

where pip_i is the pressure component ii would exert alone in volume VV at temperature TT, and RR is the gas constant.

Step 2. Solve for the partial pressure of each component.

pi=niRTVp_i = \frac{n_i RT}{V}

This says the partial pressure is directly proportional to the moles of that one component, with RT/VRT/V common to every gas in the mixture.

Step 3. Sum over all components to recover Dalton's law.

P=∑ipi=RTV∑ini=ntotalRTVP = \sum_i p_i = \frac{RT}{V}\sum_i n_i = \frac{n_{\text{total}} RT}{V}

This is just the ideal gas law applied to the mixture as a whole, confirming that the total pressure depends only on total moles, not on identity.

Step 4. Divide the single-component result by the total.

piP=niRT/VntotalRT/V=nintotal\frac{p_i}{P} = \frac{n_i RT / V}{n_{\text{total}} RT / V} = \frac{n_i}{n_{\text{total}}}

The RT/VRT/V factor cancels exactly, leaving a pure ratio of moles.

Step 5. Recognize the mole fraction and rearrange. By definition xi=ni/ntotalx_i = n_i / n_{\text{total}}, so

pi=xiP\boxed{p_i = x_i P}

This is exact for ideal gases at any temperature and total pressure, since no approximation was made beyond ideality itself.

Worked examples

Example 1 — Foundational: composition of a lab gas cylinder A rigid 20.0 L cylinder at 298 K contains 3.00 mol of nitrogen, 1.00 mol of oxygen, and 0.50 mol of carbon dioxide. Find each mole fraction, the total pressure, and each partial pressure. Step 1 — total moles.

ntotal=3.00+1.00+0.50=4.50 moln_{\text{total}} = 3.00 + 1.00 + 0.50 = 4.50\ \text{mol}

Step 2 — mole fractions.

xN2=3.004.50=0.667x_{\text{N}_2} = \frac{3.00}{4.50} = 0.667
xO2=1.004.50=0.222x_{\text{O}_2} = \frac{1.00}{4.50} = 0.222
xCO2=0.504.50=0.111x_{\text{CO}_2} = \frac{0.50}{4.50} = 0.111

Check: 0.667+0.222+0.111=1.0000.667 + 0.222 + 0.111 = 1.000 ✓ (sums to 1, as it must). Step 3 — total pressure from the ideal gas law.

P=ntotalRTV=(4.50 mol)(0.08206 L atm mol−1K−1)(298 K)20.0 LP = \frac{n_{\text{total}} RT}{V} = \frac{(4.50\ \text{mol})(0.08206\ \text{L atm mol}^{-1}\text{K}^{-1})(298\ \text{K})}{20.0\ \text{L}}
P=110.05 L atm20.0 L=5.50 atmP = \frac{110.05\ \text{L atm}}{20.0\ \text{L}} = 5.50\ \text{atm}

Step 4 — partial pressures using pi=xiPp_i = x_i P.

pN2=0.667×5.50 atm=3.67 atmp_{\text{N}_2} = 0.667 \times 5.50\ \text{atm} = 3.67\ \text{atm}
pO2=0.222×5.50 atm=1.22 atmp_{\text{O}_2} = 0.222 \times 5.50\ \text{atm} = 1.22\ \text{atm}
pCO2=0.111×5.50 atm=0.611 atmp_{\text{CO}_2} = 0.111 \times 5.50\ \text{atm} = 0.611\ \text{atm}

Sanity check: 3.67+1.22+0.611=5.50 atm3.67 + 1.22 + 0.611 = 5.50\ \text{atm}, matching the total pressure computed independently. The largest mole fraction (N₂) correctly carries the largest partial pressure.

Example 2 — Applied: blending a nitrox diving gas from partial pressures A dive shop fills a tank to a final total pressure of 200.0 atm with a "nitrox 32" mixture (32.0% O₂ by mole, balance N₂). The tank volume is 12.0 L and the fill temperature is 293 K. Find the partial pressure of each gas, the moles of each gas needed, and how much pure oxygen (in moles, then in liters at 1.00 atm and 293 K) must be added on top of ordinary air (which is 21.0% O₂) to reach this blend, assuming the tank is first filled with air to some pressure and topped off with pure O₂. Step 1 — mole fractions and partial pressures at final fill.

xO2=0.320,xN2=0.680x_{\text{O}_2} = 0.320, \qquad x_{\text{N}_2} = 0.680
pO2=xO2P=0.320×200.0 atm=64.0 atmp_{\text{O}_2} = x_{\text{O}_2} P = 0.320 \times 200.0\ \text{atm} = 64.0\ \text{atm}
pN2=0.680×200.0 atm=136.0 atmp_{\text{N}_2} = 0.680 \times 200.0\ \text{atm} = 136.0\ \text{atm}

Step 2 — total moles of gas in the finished tank.

ntotal=PVRT=(200.0 atm)(12.0 L)(0.08206 L atm mol−1K−1)(293 K)n_{\text{total}} = \frac{PV}{RT} = \frac{(200.0\ \text{atm})(12.0\ \text{L})}{(0.08206\ \text{L atm mol}^{-1}\text{K}^{-1})(293\ \text{K})}
ntotal=2400.024.04=99.83 moln_{\text{total}} = \frac{2400.0}{24.04} = 99.83\ \text{mol}

Step 3 — moles of each gas in the final mixture.

nO2=0.320×99.83=31.9 mol,nN2=0.680×99.83=67.9 moln_{\text{O}_2} = 0.320 \times 99.83 = 31.9\ \text{mol}, \qquad n_{\text{N}_2} = 0.680 \times 99.83 = 67.9\ \text{mol}

Step 4 — the "partial pressure blending" trick used by divers. The shop first partial-fills with air until the nitrogen partial pressure alone reaches 136.0 atm (since topping off with pure O₂ adds no more N₂). Air is 21.0% O₂ and 79.0% N₂, so the air-fill pressure PairP_{\text{air}} satisfies

0.790×Pair=136.0 atm  ⟹  Pair=172.2 atm0.790 \times P_{\text{air}} = 136.0\ \text{atm} \implies P_{\text{air}} = 172.2\ \text{atm}

At this partial fill, the oxygen already present contributes

pO2,air=0.210×172.2 atm=36.2 atmp_{\text{O}_2,\text{air}} = 0.210 \times 172.2\ \text{atm} = 36.2\ \text{atm}

Step 5 — pure oxygen top-off needed.

ΔpO2=64.0 atm−36.2 atm=27.8 atm\Delta p_{\text{O}_2} = 64.0\ \text{atm} - 36.2\ \text{atm} = 27.8\ \text{atm}
nO2,added=ΔpO2 VRT=(27.8 atm)(12.0 L)(0.08206)(293)=333.624.04=13.9 moln_{\text{O}_2,\text{added}} = \frac{\Delta p_{\text{O}_2}\, V}{RT} = \frac{(27.8\ \text{atm})(12.0\ \text{L})}{(0.08206)(293)} = \frac{333.6}{24.04} = 13.9\ \text{mol}

Converting to a volume at 1.00 atm and 293 K (the size of a standard O₂ cylinder delivering this gas):

VO2=nRTp=(13.9 mol)(0.08206)(293)1.00 atm=334 LV_{\text{O}_2} = \frac{n RT}{p} = \frac{(13.9\ \text{mol})(0.08206)(293)}{1.00\ \text{atm}} = 334\ \text{L}

Sanity check: total pressure after topping off is 172.2+27.8=200.0172.2 + 27.8 = 200.0 atm ✓, and final xO2=64.0/200.0=0.320x_{\text{O}_2} = 64.0/200.0 = 0.320 ✓, exactly the target nitrox blend.

Limiting cases & common traps

SituationCorrect behaviorCommon mistake
Pure gasxi=1x_i = 1 for the only component, pi=Pp_i = PForgetting a single-component mixture is a valid (trivial) case
Trace componentxi→0x_i \to 0 still gives pi=xiP→0p_i = x_i P \to 0 smoothlyAssuming trace gases need a separate formula
Adding an inert gas at constant V,TV,TTotal PP rises; each original xix_i and pip_i for the other gases drops even though their moles are unchangedThinking partial pressures of untouched gases stay fixed
Mole fraction vs. mass fractionxix_i uses moles; mass fraction uses mass and requires molar masses to convertSilently swapping mole % for mass % (common with humid air, isotopes)
Mixing at constant total pressureMole fractions still sum to 1; use pi=xiPp_i = x_iP with the fixed PPForgetting PP itself may change if volume or moles change too

The chemist behind it

John Dalton, working in Manchester in the early 1800s, was primarily interested in atomic theory and meteorology — he kept detailed weather diaries and puzzled over why water vapor did not simply "dissolve" into air-like a solute. His 1801 law of partial pressures grew directly out of trying to explain how several gases could occupy the same space at once, each behaving as though the others were absent. Mole fraction as a formal quantity came later, once Avogadro's hypothesis and the mole concept matured, but it slots perfectly into Dalton's framework: it is simply the bookkeeping tool that tells you how much of the total pressure "belongs" to each gas Dalton had already shown behaves independently.

Origins · 1 minJohn Dalton and how this was discovered
JD
John Dalton
1766–1844 · English chemist and meteorologist who formulated the law of partial pressures and laid groundwork for modern atomic theory

Ask the tutor: How does the mole-fraction/partial-pressure relation change once we account for intermolecular forces in real gas mixtures?

Is mole fraction the same as percent composition by volume?

For ideal gases at the same temperature and pressure, yes — equal moles occupy equal volumes (Avogadro's principle), so volume fraction and mole fraction coincide numerically. This is why "21% oxygen by volume" and "mole fraction of oxygen is 0.21" describe the same air. This equivalence assumes ideal behavior; for real gases at high pressure it can break down slightly, foreshadowing the deviations from ideality covered next.

Does p_i = x_i P require the total pressure to be low?

No — it is an exact identity for ideal gases at any pressure, since it derives purely from applying pV=nRTpV=nRT to each component and to the mixture, with the RT/VRT/V factor canceling algebraically. The approximation lives entirely in the ideal gas law itself, not in the mole-fraction relation. At very high pressures, real gases deviate from pV=nRTpV=nRT, and then pi=xiPp_i = x_i P becomes only approximate too.

Can mole fraction be negative or greater than 1?

No. Since nin_i and ntotaln_{\text{total}} are both non-negative quantities of matter, and ni≤ntotaln_i \le n_{\text{total}} always, mole fraction is confined to the range 0 to 1 inclusive. A value of 0 means the component is absent; a value of 1 means it is the only component present (a pure substance).

How is mole fraction used beyond gas mixtures?

The same definition, xi=ni/ntotalx_i = n_i/n_{\text{total}}, applies to liquid solutions and solid solutions, not just gases. It underlies Raoult's law for vapor pressures of solutions and appears throughout phase-equilibrium calculations. The gas-phase relation pi=xiPp_i = x_i P is a special case that works specifically because ideal gas particles do not interact, a simplification not available in condensed phases.

Why doesn't mole fraction have units?

It is a ratio of two quantities with the same units (moles divided by moles), so all units cancel, leaving a pure number between 0 and 1. This is precisely what makes it so convenient: it can be multiplied directly by a total pressure, a total volume, or a total number of moles to extract the corresponding partial quantity, without any unit-conversion factors.

Before this

Where this leads