The mole fraction is the most fundamental way to express the composition of a chemical mixture. Unlike concentration (which depends on volume) or mass fraction (which depends on molecular weight), the mole fraction is a dimensionless ratio that depends only on how many particles of each species are present. It appears in Dalton’s Law, Raoult’s Law, Henry’s Law, the chemical potential in thermodynamics, and virtually every equation that describes how a mixture behaves.
The formula
For a mixture containing species 1, 2, … k, the mole fraction of component i is:
x_i = n_i / (n_1 + n_2 + … + n_k)
where n_i is the amount of substance of component i in moles. All mole fractions in the
mixture must satisfy the constraint x_1 + x_2 + … + x_k = 1.
Mole percent is x_i × 100 and carries identical information — the calculator shows both.
Partial pressures via Dalton’s Law
For an ideal gas mixture, Dalton’s Law links mole fraction to partial pressure:
P_i = x_i × P_total
Each component contributes a partial pressure proportional to its mole fraction. The sum of all partial pressures equals the total pressure of the system. This tool lets you enter the total pressure in kPa, atm, bar, Pa or mmHg and reports the partial pressure of every component in kPa alongside the mole fractions.
How it works
The calculator keeps an internal list of components. For each component you provide a name (optional but helpful) and an amount in moles. On every keystroke:
- It sums all entered mole amounts:
n_total = n_1 + n_2 + … + n_k. - It divides each n_i by n_total to get x_i.
- If total pressure is enabled, it multiplies each x_i by P_total (converted to kPa internally) to give the partial pressure.
- A self-check row at the bottom of the table confirms the fractions sum to 1.000000.
All arithmetic runs entirely in your browser — no data is sent to any server.
Worked example — dry air
Dry air at standard pressure (101.325 kPa) has the following approximate molar composition:
| Component | Moles (per 100 mol air) | Mole fraction | Partial pressure |
|---|---|---|---|
| N2 | 78 | 0.780000 | 79.03 kPa |
| O2 | 21 | 0.210000 | 21.28 kPa |
| Ar | 1 | 0.010000 | 1.01 kPa |
| Total | 100 | 1.000000 | 101.325 kPa |
Step-by-step:
- n_total = 78 + 21 + 1 = 100 mol
- x(N2) = 78 / 100 = 0.78 (78.0000 %)
- x(O2) = 21 / 100 = 0.21 (21.0000 %)
- x(Ar) = 1 / 100 = 0.01 (1.0000 %)
- P(N2) = 0.78 × 101.325 = 79.034 kPa
- P(O2) = 0.21 × 101.325 = 21.278 kPa
- P(Ar) = 0.01 × 101.325 = 1.013 kPa
This matches the pre-loaded defaults in the calculator — just enable partial pressures with total pressure = 101.325 kPa and you will see the same numbers.
Formula note
The Dalton’s Law form shown here (P_i = x_i * P_total) is exact for ideal gases and a very
good approximation for real gases at moderate pressures (below roughly 10 bar). At high
pressures or for strongly non-ideal mixtures (e.g. ammonia–water, CO2 in water), the fugacity
coefficient or activity coefficient must be introduced. For liquid mixtures below the boiling
point, use Raoult’s Law: P_i = x_i * P_i^sat where P_i^sat is the saturation vapour
pressure of pure component i at the mixture temperature.