Gas Mixture & Partial Pressure Calculator

Work out the partial pressure, mole fraction and mass fraction of each gas in a mixture with Dalton’s law, plus its average molar mass and density. Includes diving gas (oxygen partial pressure at depth and maximum operating depth) and Graham’s law of effusion.

Calculator Science & Engineering Updated Oct 4, 2026
How to Use
  1. Choose a mode: Dalton’s law for any mixture, Diving gas for oxygen at depth, or Graham’s law to compare how fast two gases effuse.
  2. For a mixture, type each gas formula (N2, O2, Ar, CO2, He) and its amount, and say whether the amounts are volume %, moles, grams or partial pressures.
  3. Enter the total pressure and the temperature (for the density). Percentages that don’t quite add to 100 are scaled for you.
  4. For diving, enter the depth, the oxygen percentage and your pO₂ limit (1.4 bar is the common working limit) to get the pressure at depth and the maximum operating depth.
  5. Or press a preset: dry air, air at 30 m, nitrox 32, hydrogen against oxygen, the ammonia and hydrogen chloride ring, or uranium enrichment.
Input
formula, then amount
optional
optional
with partial pressures: their unit; the total is their sum
for the density
% O₂ (air 20.95, nitrox 32)
1.4 working, 1.6 limit
sea level 1.01325 bar
formula; molar mass optional
optional: where the gases meet
Presets
The Mixture
Average molar mass
—
Mixture density
—
Oxygen partial pressure
—
Total pressure
—

Worked Example

Dry air at sea level. By volume dry air is 78.08 % N₂, 20.95 % O₂, 0.93 % Ar and about 0.042 % CO₂. At 1 atm the partial pressures are 0.7808, 0.2095, 0.0093 and 0.00042 atm; the oxygen alone is 0.2095 × 101.325 = 21.23 kPa. The mole-weighted molar mass is 28.97 g/mol, so at 20 °C the density is 101,325 × 0.028966 ÷ (8.314 × 293.15) = 1.204 kg/m³.

Nitrox 32 for diving. At 30 m in sea water the pressure is 1.013 + 3 = 4.013 bar, so pO₂ = 0.32 × 4.013 = 1.284 bar. The depth where it reaches the 1.4 bar working limit is (1.4 ÷ 0.32 − 1.013) × 10 = 33.6 m, the gas’s maximum operating depth. Its nitrogen load at 30 m equals that of air at only 24.4 m (the equivalent air depth).

The common mistake: leaving out the atmosphere above the water. Taking 30 m as 3 bar gives air a pO₂ of 0.2095 × 3 = 0.63 bar, but the real pressure is 4.013 bar and the real pO₂ is 0.841 bar, a third higher. The mirror image in Graham’s law is turning the square root upside down: hydrogen effuses √(31.998 ÷ 2.016) = 3.984 times as fast as oxygen, not 0.251 times.

Show Work

Enter the gases to see the step-by-step working.

Formulas

Dalton’s law
pi = xi × P · P = Σ pi
0.2095 × 101.325 kPa = 21.23 kPa of O₂
Mole fraction
xi = ni ÷ Σn = volume % ÷ 100
From grams: ni = mi ÷ Mi first
Average molar mass and density
M̄ = Σ xiMi · ρ = P M̄ ÷ (R T)
Air: 28.97 g/mol, 1.204 kg/m³ at 20 °C, 1 atm
Pressure at depth
P = Psurface + depth × 0.1 bar/m
Sea-water convention; fresh water 0.0981 bar/m
Maximum operating depth
MOD = (pO₂max ÷ FO₂ − Psurface) ÷ 0.1 bar/m
Nitrox 32 at 1.4 bar: 33.6 m
Graham’s law
r₁ ÷ r₂ = √(M₂ ÷ M₁) · t₁ ÷ t₂ = √(M₁ ÷ M₂)
Same temperature and pressure

Dalton, Graham and the Divers

John Dalton, working on the water vapour in the Manchester air, read his law of partial pressures to the Manchester Literary and Philosophical Society in 1801: each gas in a mixture behaves as if it were alone in the container, and the total pressure is the sum of the parts. The same thinking about independent particles led him to his atomic theory a few years later.

The Scottish chemist Thomas Graham measured how fast gases escaped through tiny holes and porous plugs, and in 1848 stated that the rate of effusion is inversely proportional to the square root of the density, or of the molar mass. Its most famous use came a century later: the K-25 gaseous diffusion plant at Oak Ridge separated uranium-235 from uranium-238 as UF₆, where the rate difference is only 0.43 % per stage.

Partial pressure is what matters to a diver’s body. Paul Bert showed in 1878 that oxygen at high pressure is poisonous to the nervous system, and the usual limits today are 1.4 bar of oxygen for the working part of a dive and 1.6 bar as the absolute maximum. NOAA’s Nitrox I mixture, 32 % oxygen, made enriched air a standard recreational gas. Air composition here is the standard dry-air make-up by volume; carbon dioxide (about 0.042 %, or 420 ppm) is the one figure that keeps rising.

About This Calculator

This calculator applies Dalton’s law to any mixture of up to five gases. Give the amounts as volume percent, moles, grams or partial pressures, and it returns each gas’s mole fraction, partial pressure and mass percent, the mixture’s average molar mass, and its density from the ideal gas law. Molar masses come from the formulas you type.

The diving mode turns depth into pressure and gives the oxygen partial pressure, the maximum operating depth for your pO₂ limit and the equivalent air depth, with warnings above 1.4 and 1.6 bar; it is a teaching aid, not a dive planner. The Graham’s law mode compares two gases’ effusion rates and shows where they meet in a tube. Everything runs in your browser.

It is aimed at chemistry and physics students, divers learning gas theory, and anyone working with gas cylinders or leaks.

Related tools: Ideal Gas Law Calculator, Molar Mass Calculator, and Boiling & Freezing Point Calculator.

Frequently Asked Questions

How do you calculate partial pressure?

By Dalton’s law, each gas’s partial pressure is its mole fraction times the total pressure: p = x × P. Dry air is 20.95 % oxygen by volume, so at 1 atm (101.325 kPa) the oxygen partial pressure is 0.2095 × 101.325 = 21.23 kPa. The partial pressures of all the gases add up to the total.

What is the average molar mass of air?

Weight each gas’s molar mass by its mole fraction: 0.7808 × 28.014 + 0.2095 × 31.998 + 0.0093 × 39.95 + 0.00042 × 44.009 = 28.97 g/mol for dry air. The ideal gas law then gives its density: ρ = PM ÷ RT = 101,325 × 0.028966 ÷ (8.314 × 293.15) = 1.204 kg/m³ at 20 °C.

What is the oxygen partial pressure at 30 m?

In sea water every 10 m adds about 1 bar, so at 30 m the pressure is 1.013 + 3 = 4.013 bar. Breathing air (20.95 % O₂) the oxygen partial pressure is 0.2095 × 4.013 = 0.841 bar. With nitrox 32 it is 0.32 × 4.013 = 1.284 bar, close to the 1.4 bar working limit.

How is the maximum operating depth (MOD) worked out?

Find the pressure at which the oxygen reaches its limit, then turn it into depth: MOD = (pO₂max ÷ FO₂ − surface pressure) × 10 m/bar. For nitrox 32 at 1.4 bar: (1.4 ÷ 0.32 − 1.013) × 10 = 33.6 m. Tables that take the surface as exactly 1 bar give 33.75 m. This calculator is an illustration, not a dive planner.

What does Graham’s law say?

At the same temperature and pressure, a gas effuses at a rate inversely proportional to the square root of its molar mass: r₁ ÷ r₂ = √(M₂ ÷ M₁). Hydrogen (2.016 g/mol) escapes through a pinhole √(31.998 ÷ 2.016) = 3.984 times as fast as oxygen. Ammonia (17.031) against hydrogen chloride (36.458) gives 1.463, so in a 100 cm tube the white ammonium chloride ring forms 59.4 cm from the ammonia end.

How do I use the Gas Mixture & Partial Pressure Calculator?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Chemistry class

Dry air at 1 atm: N₂ 0.7808 atm, O₂ 0.2095 atm, Ar 0.0093 atm; average molar mass 28.97 g/mol.

Scuba and nitrox

Nitrox 32 reaches pO₂ 1.4 bar at 33.6 m; on air, 0.841 bar at 30 m.

Gas mixing by mass

1 g of H₂ with 8 g of O₂ is 66.5 % hydrogen by moles; the mixture averages 12.06 g/mol.

Leak and effusion questions

Helium (4.0026 g/mol) leaks through the same hole √(31.998 ÷ 4.0026) = 2.83 times as fast as oxygen.

Isotope separation

²³⁵UF₆ and ²³⁸UF₆ differ in effusion rate by only 1.0043, which is why gaseous diffusion plants needed long cascades of stages.

Last updated: