Dalton’s law of partial pressures is the rule that splits the pressure of a gas mixture between the gases in it.
Dalton's law of partial pressures says the total pressure of a mixture of ideal gases is the sum of the partial pressures of the gases in it: P_total = P_A + P_B. Each partial pressure is its mole fraction times the total pressure: P_A = x_A x P_total and P_B = x_B x P_total, where x_A = n_A / n_total and x_B = n_B / n_total, with n_total = n_A + n_B. The law assumes ideal gases that do not react with each other.
Please check the inputs: enter P_total as a number above 0 atm, and n_A and n_B as 0 or more, with at least some gas present.
| Total Pressure P_total (atm) | Moles of Gas A n_A (mol) | Moles of Gas B n_B (mol) | Total Moles n_total (mol) | Mole Fraction x_A | Mole Fraction x_B | Partial Pressure P_A (atm) | Partial Pressure P_B (atm) |
|---|
Eight partial-pressure cases, from 0.1000 atm to 1.750 atm. The highlighted row matches your inputs: P_total 1.000 atm, n_A 2 mol, n_B 3 mol, giving P_A = 0.4000 atm and P_B = 0.6000 atm.
Founder & CEO, Techraxy
Faiq Ur Rahman is a web designer, digital product developer, and Founder of Techraxy, a growing platform of online calculators and utility tools. He specializes in building structured, user-friendly tools focused on finance, health, conversions, productivity, and everyday problem-solving. He is passionate about developing practical digital solutions that make complex tasks simpler for users worldwide.
User Ratings:
ADVERTISEMENT
ADVERTISEMENT
Dalton’s law of partial pressures is the rule that splits the pressure of a gas mixture between the gases in it. This free partial pressure calculator takes the total pressure P_total in atm and the moles of two gases, n_A and n_B, and returns the mole fractions x_A and x_B, the partial pressures P_A and P_B in atm, and the total moles n_total. Run it at the defaults, P_total 1 atm, n_A 2 mol and n_B 3 mol, and the answer is x_A 0.4000, x_B 0.6000, P_A 0.4000 atm and P_B 0.6000 atm, with n_total 5 mol.
The calculator takes three inputs: the total pressure P_total in atm, the moles of gas A, and the moles of gas B. It returns the two mole fractions, the two partial pressures in atm, the total moles, and the formula used. The diagram shows a gas container with red dots for gas A and blue dots for gas B, ten dots in all, whose split follows the mole fractions, with a total-pressure gauge bar below the container.
A partial pressure calculator is a tool that finds the pressure each gas in a mixture contributes to the total pressure. The pressure one gas exerts on its own, as if it were the only gas in the container at the same temperature and volume, is its partial pressure. Dalton’s law of partial pressures says the total pressure of a mixture of ideal gases is the sum of the partial pressures of the gases in it, so for a two-gas mixture P_total = P_A + P_B. The Mole Fraction Calculator covers the other half of the same idea, the share of the mixture each gas makes up, which is what sets its partial pressure.
The link between the share and the pressure is the mole fraction. The mole fraction of gas A is x_A = n_A / n_total, where n_total = n_A + n_B, and the mole fraction of gas B is x_B = n_B / n_total. The partial pressure is then the mole fraction times the total pressure: P_A = x_A x P_total and P_B = x_B x P_total. Because the mole fractions add to 1, the partial pressures always add back to P_total, which is a useful check on any answer: if P_A and P_B do not add to P_total, something was mistyped.
At the defaults the split is easy to follow. With n_A 2 mol and n_B 3 mol, n_total is 5 mol, so x_A is 2 divided by 5, which is 0.4000, and x_B is 3 divided by 5, which is 0.6000. At P_total 1 atm, P_A is 0.4000 times 1, which is 0.4000 atm, and P_B is 0.6000 times 1, which is 0.6000 atm. Gas A is 40.0% of the mixture and gas B is 60.0%, and the diagram shows that as 4 red dots and 6 blue dots out of 10.
Enter the total pressure P_total in atm, the moles of gas A, and the moles of gas B. The calculator updates as soon as you change an input, and the Calculate button runs it again at any time. At the defaults the inputs are P_total 1 atm, n_A 2 mol and n_B 3 mol, and the partial pressures are P_A 0.4000 atm and P_B 0.6000 atm.
Read the results in order. The headline numbers are the mole fractions x_A and x_B, then the partial pressures P_A and P_B in atm, then the total moles n_total in mol, and the formula used. The highlight sentence repeats the answer in plain words, with the inputs it used and the percentage each gas makes up, so you can check that nothing was mistyped.
If you only know the mass of each gas, convert grams to moles before entering anything: divide the mass by the molar mass of that gas. The Molar Mass Calculator finds the molar mass from a formula, so a mass in grams becomes a mole count the calculator can use. A mole amount of 0 for one gas is allowed, because that is just a pure gas, but both amounts at 0 leaves no gas at all, so the calculator refuses that input instead of guessing.
The diagram shows the gas container. Ten dots fill a 5 by 2 grid, and the number of red dots is round(10 x x_A), so every input change that moves the mole fraction moves dots between red and blue: at the defaults 4 dots are red and 6 are blue, and at x_A 0.8000, 8 dots are red and 2 are blue. The gauge bar below the container fills in proportion to P_total on a 0 to 3 atm scale, so its width is P_total divided by 3 times 280 px: 93.33 px at 1 atm and 233.33 px at 2.5 atm, capped at the full 280 px above 3 atm.
The Compare Cases tab puts eight partial-pressure cases side by side, from 0.1000 atm to 1.750 atm, with the total pressure, the moles of each gas, the total moles, the mole fractions, and the two partial pressures. The row matching your inputs is highlighted. The range is worth noting: the smallest partial pressure in the table is 0.1000 atm, for gas B in the P_total 0.5 atm case, and the largest is 1.750 atm, for gas B in the P_total 2.5 atm case.
The formula is P_i = x_i x P_total, where P_i is the partial pressure of gas i in atm, x_i is its mole fraction, and P_total is the total pressure in atm. The mole fraction is x_i = n_i / n_total, where n_i is the moles of gas i and n_total is the total moles of all gases in the mixture, so for a two-gas mixture n_total = n_A + n_B, x_A = n_A / n_total and x_B = n_B / n_total. Written out for the defaults, P_total 1 atm, n_A 2 mol and n_B 3 mol: n_total is 2 plus 3, which is 5 mol, x_A is 2 divided by 5, which is 0.4000, x_B is 3 divided by 5, which is 0.6000, P_A is 0.4000 times 1, which is 0.4000 atm, and P_B is 0.6000 times 1, which is 0.6000 atm. The check is that 0.4000 plus 0.6000 is 1.0000 for the mole fractions, and 0.4000 plus 0.6000 is 1.000 atm for the partial pressures, which is P_total.
The same formula comes from the ideal gas law, because P_A = n_A x RT / V and P_total = n_total x RT / V at the same temperature and volume, so dividing the two gives P_A / P_total = n_A / n_total = x_A. The Mole Calculator covers the mole counts themselves, which are the only composition inputs this formula needs: once n_A and n_B are known, no volume or temperature is needed, because they cancel in the ratio.
Dalton’s law assumes ideal gases that do not react with each other. At very high pressure or very low temperature, real gases attract and repel each other enough to depart from the law, and where the gases react, for example ammonia and hydrogen chloride forming solid ammonium chloride, the mixture is no longer the gases that were put in. This calculator states that assumption openly and does not correct for it, so do not use it for a reacting mixture or for a gas at extreme conditions without a real-gas treatment.
Take a mixture at P_total 2 atm with n_A 1 mol and n_B 3 mol. First, n_total is 1 plus 3, which is 4 mol. Next, x_A is 1 divided by 4, which is 0.2500, and x_B is 3 divided by 4, which is 0.7500. Then P_A is 0.2500 times 2, which is 0.5000 atm, and P_B is 0.7500 times 2, which is 1.500 atm. The check is that 0.5000 plus 1.500 is 2.000 atm, which is P_total. Gas A is 25.0% of the mixture and gas B is 75.0%, so the diagram shows 3 red dots out of 10, because round(10 x 0.2500) is 3, and the gauge bar is 186.67 px wide, because 2 divided by 3 times 280 is 186.67.
The same steps check a low-pressure case, with P_total 0.5 atm, n_A 4 mol and n_B 1 mol. First, n_total is 4 plus 1, which is 5 mol. Next, x_A is 4 divided by 5, which is 0.8000, and x_B is 1 divided by 5, which is 0.2000. Then P_A is 0.8000 times 0.5, which is 0.4000 atm, and P_B is 0.2000 times 0.5, which is 0.1000 atm. The check is that 0.4000 plus 0.1000 is 0.5000 atm, which is P_total. Gas A dominates here, so the diagram shows 8 red dots and 2 blue dots, and the gauge bar is 46.67 px wide.
A third check uses dry air, which is about 78% nitrogen and 21% oxygen, with the remaining 1% mostly argon. At P_total 1 atm, P_N2 is 0.78 times 1, which is 0.7800 atm, and P_O2 is 0.21 times 1, which is 0.2100 atm, with the other gases making up the last 0.0100 atm. The same arithmetic explains why oxygen feels thinner at altitude: at a total pressure of 0.8 atm the oxygen partial pressure falls to 0.21 times 0.8, which is 0.1680 atm, even though air is still 21% oxygen.
The first benefit is splitting a pressure gauge reading between the gases that made it. A single gauge only shows P_total, but most questions about a mixture are about one gas: how much oxygen is in a scuba tank, how much carbon dioxide is in a flue gas, or how much nitrogen is in air. The calculator turns the gauge reading and the mole counts into each gas’s own pressure in one step, with the mole fractions shown alongside so the split can be checked.
The second benefit is the built-in check that the parts add to the whole. The mole fractions always add to 1 and the partial pressures always add to P_total, so a mistyped mole count shows up at once as a sum that does not match. The compare table makes the same check visible across eight cases, from 0.1000 atm to 1.750 atm, with every row’s two partial pressures adding to its total pressure.
The third benefit is seeing composition as a share, not just a count. Two moles against three moles is 40.0% against 60.0%, and the diagram turns that share into dots: 4 red and 6 blue out of 10 at the defaults, 8 red and 2 blue when gas A is 80.0% of the mixture. That picture is what makes the mole fraction concrete, and it changes with every input, so a wrong entry is visible in the container as well as in the numbers.
The fourth benefit is the air example, which is the most common real use. Air is about 78% nitrogen and 21% oxygen, so at 1 atm the partial pressures are 0.7800 atm and 0.2100 atm, and at any other total pressure they scale in the same ratio. Divers, pilots and mountaineers all work from that scaling, because it is the partial pressure of oxygen, not the percentage, that decides how much oxygen reaches the lungs.
They are P_A 0.4000 atm and P_B 0.6000 atm. First, n_total is 2 plus 3, which is 5 mol. Next, x_A is 2 divided by 5, which is 0.4000, and x_B is 3 divided by 5, which is 0.6000. Then P_A is 0.4000 times 1, which is 0.4000 atm, and P_B is 0.6000 times 1, which is 0.6000 atm. Gas A is 40.0% of the mixture and gas B is 60.0%.
A mole fraction is the moles of one gas divided by the total moles in the mixture, so x_A = n_A / n_total and x_B = n_B / n_total. The two fractions add to 1 because n_A plus n_B is n_total by definition, so x_A plus x_B is (n_A plus n_B) divided by n_total, which is 1. A mole fraction has no unit, it is always between 0 and 1, and it is 1 for a pure gas and 0 for a gas that is not present at all.
No. A partial pressure is the mole fraction times the total pressure, P_i = x_i x P_total, and a mole fraction is never above 1, so a partial pressure is never above P_total. It equals P_total only for a pure gas, where the mole fraction is 1, and it is 0 only for a gas that is not present. If a calculation gives a partial pressure above the total pressure, a mole count or the total pressure was entered wrong.
The mixture is a pure gas. With n_A 2 mol and n_B 0 mol at P_total 1 atm, x_A is 1.000, x_B is 0.000, P_A is 1.000 atm and P_B is 0.000 atm, so the whole pressure belongs to gas A and the diagram shows 10 red dots. The calculator allows a zero amount for one gas, but it refuses the case where both amounts are 0, because with no gas at all the mole fractions are undefined.
No. Dalton’s law assumes ideal gases that do not react with each other, so each gas contributes its pressure independently. Where the gases react, the mixture changes into something else, and the law no longer describes it. It also breaks down at very high pressure or very low temperature, where real gases attract and repel each other enough to depart from ideal behaviour. For a reacting mixture or a gas at extreme conditions, use a real-gas treatment instead of this calculator.
This calculator finds partial pressures from Dalton’s law, P_i = x_i x P_total with x_i = n_i / n_total, for a two-gas mixture at a given total pressure in atm, and it is for study, homework and general reference only. It assumes ideal gases that do not react with each other, which is the usual textbook treatment, and it refuses a total pressure at or below 0 atm, negative mole amounts, and a mixture with no gas at all instead of guessing, so do not use a result from this calculator to set a dose, a dive plan, or a process parameter without checking the procedure it specifies. If your course uses different units or a different total pressure for the mixture, convert them before entering the values instead of using this calculator’s numbers directly.
Last updated: 3 December 2026
ADVERTISEMENT
ADVERTISEMENT