Mole Fraction Calculator

Find mole fractions, mole percentages and partial pressures for any gas or liquid mixture.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

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:

  1. It sums all entered mole amounts: n_total = n_1 + n_2 + … + n_k.
  2. It divides each n_i by n_total to get x_i.
  3. If total pressure is enabled, it multiplies each x_i by P_total (converted to kPa internally) to give the partial pressure.
  4. 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:

ComponentMoles (per 100 mol air)Mole fractionPartial pressure
N2780.78000079.03 kPa
O2210.21000021.28 kPa
Ar10.0100001.01 kPa
Total1001.000000101.325 kPa

Step-by-step:

  1. n_total = 78 + 21 + 1 = 100 mol
  2. x(N2) = 78 / 100 = 0.78 (78.0000 %)
  3. x(O2) = 21 / 100 = 0.21 (21.0000 %)
  4. x(Ar) = 1 / 100 = 0.01 (1.0000 %)
  5. P(N2) = 0.78 × 101.325 = 79.034 kPa
  6. P(O2) = 0.21 × 101.325 = 21.278 kPa
  7. 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.

Ad placeholder (rectangle)