Partial pressure calculator
Oxygen at a mole fraction of 0.21 in air at 1 atm has a partial pressure of 0.21 atm. Enter one fraction or the whole mixture plus the total pressure, and each partial pressure comes back in the same unit. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Mole fraction
- 0.21
- Total pressure
- 1
- Calculation mode
- single
- Partial pressure
- 0.21
Dalton’s law of partial pressures states that in an ideal gas mixture each component contributes a partial pressure equal to its mole fraction times the total absolute pressure of the mixture: Pi equals yi times P. Students checking multi-gas homework, chemistry teachers building answer keys, process engineers sketching flue-gas or air-composition splits, and lab technicians relating analyzer mole fractions to sensor partial pressures all need the same contract—valid mole fractions, a positive total pressure, and structured partial-pressure results without re-deriving the multiply by hand.
What Dalton’s law returns and which inputs you must send
In introductory chemistry and thermodynamics, Dalton’s law describes how an ideal gas mixture partitions total pressure among components: each partial pressure is the mole fraction of that gas multiplied by the mixture total pressure, and the partial pressures sum to the total pressure when the mole fractions form a complete composition. Search intent clusters around partial pressure calculator, Dalton law mole fraction, gas mixture Pi equals yi P, component pressure from mole fraction, and air oxygen nitrogen partial pressure.
People want a numeric answer they can check against a worksheet, embed in a lab report, or feed into a larger pipeline—not only a reminder that the formula exists. Keep units consistent: the engine multiplies only; it does not convert atmospheres to pascals or gauge readings to absolute pressure. Optional residual composition is allowed when the reported fractions sum to less than one—for example when you only know the oxygen fraction of air—while a sum above one is always rejected as physically inconsistent for a mole-fraction basis.
Classroom use and practical limits
Call the free in-browser partial pressure calculator for homework checks, lecture demos, and quick air-composition mental math without installing a thermodynamics package. Choose absolute pressure units consistently on both sides of the product so the solved partial pressures stay in the same unit family your sensors or textbook expect. Authors shipping SDKs can map the components array directly into UI tables that show mole fraction and partial pressure columns—the same shape students write when they apply Dalton’s law by hand on multi-gas problems.
What you can do with it
Homework and multi-gas drills
Students and graders compute oxygen, nitrogen, or custom-mixture partial pressures from mole fractions and total pressure, with clear rejection when fractions exceed one.
Process and lab composition sketches
Quick structured estimates of component pressures from analyzer mole fractions without standing up a full process simulator or spreadsheet.
FAQ
What happens if mole fractions sum to more than one?
Mixture mole fractions must not exceed a total of 1; fractions outside [0, 1] are also rejected and not charged.
Is the partial pressure calculator free?
The browser tool runs free on your device.
Does the calculator convert pressure units?
No. Keep total pressure and partial pressures in the same absolute unit family (atm, Pa, bar, or torr). The engine multiplies only and does not convert units.
How do I find the partial pressure of oxygen in air?
Enter 0.21 as the mole fraction and the total pressure, for example 1 atm. The partial pressure is 0.21 atm, because Dalton's law simply multiplies the fraction by the total pressure.
Can I calculate every gas in a mixture at once?
Yes. Enter the list of mole fractions instead of a single one and you get one partial pressure per gas. The list may add up to less than one when part of the composition is unknown, but never more.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/thermo/dalton-partial-pressure \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"total_pressure":1,"mole_fraction":0.21}'const res = await fetch("https://api.kit.forhosting.com/thermo/dalton-partial-pressure", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"total_pressure": 1,
"mole_fraction": 0.21
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/thermo/dalton-partial-pressure",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"total_pressure": 1,
"mole_fraction": 0.21
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/thermo/dalton-partial-pressure", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"total_pressure":1,"mole_fraction":0.21}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"total_pressure":1,"mole_fraction":0.21}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/thermo/dalton-partial-pressure", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"total_pressure": 1,
"mole_fraction": 0.21
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "thermo.dalton_partial_pressure",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This capability computes that product deterministically for a single component or for a full fraction list, rejects fractions outside the unit interval and mixtures whose fractions sum above one with a clear invalid_input error, and returns JSON that homework checkers, tutoring apps, and lightweight process helpers can pin in tests.
What Dalton’s law returns and which inputs you must send
Send a positive total_pressure in any coherent absolute unit you already use for the problem (atmospheres, pascals, bar, or torr), and either a single mole_fraction for one component or a mole_fractions array for the whole mixture. Aliases y, fraction, fractions, y_i, P, P_total, and pressure are accepted so forms and scripts can match textbook variable names.
How this calculator validates fractions and applies Pi = yi · P
Numeric strings that parse to finite numbers are accepted so web forms and CSV-style pipelines can pass values without an extra cast. There is no Raoult vapor-liquid branch, no real-gas fugacity correction, and no unit conversion service—this is pure Dalton for ideal mixtures. Send a JSON body with required total_pressure and exactly one of mole_fraction or mole_fractions. Every numeric field must be finite: missing required values, empty strings, non-numeric text, NaN, and Infinity all fail immediately with invalid_input before any result is returned, and failed validation is not charged. Each mole fraction must lie in the closed unit interval from zero to one inclusive; a value below zero or above one is invalid_input because mole fractions are not percentages and are not partial-pressure ratios in this product. For a mixture array, every entry is checked, the sum is computed, and if the sum exceeds one (with a tiny floating-point epsilon) the request fails with a message that names the excess. After validation the engine multiplies each fraction by total pressure, rounds to a stable decimal precision so the same input always yields the same JSON across JavaScript engines, and labels the response mode as single or mixture. Single mode returns partial_pressure together with the echoed mole_fraction and total_pressure; mixture mode returns partial_pressures, fraction_sum, and a components array with index, mole_fraction, and partial_pressure for each gas. The formula field is always Pi=yi*P and method is always dalton_partial_pressure so downstream code can branch without sniffing shapes.
API usage, pricing, classroom workflows, and practical limits
Use the prepaid API when a tutoring platform, coding-assessment sandbox, curriculum generator, process sketch tool, or gas-analysis pipeline needs a stable contract under KIT balance at $0.002 per successful item; validation failures never consume balance after the engine rejects the request. Pair this endpoint with ideal-gas or gas-law tools when the next step is converting partial pressure to concentration or relating temperature and volume, and keep the mole-fraction list within the published component cap for isolate safety.
Integration use cases
Deterministic fixtures for chemistry tests
Pipelines that seed unit tests or interactive science demos can call a pure Pi=yi·P oracle instead of reimplementing Dalton arithmetic in every language.
Technical questions
How do I calculate partial pressure with this tool?
Send JSON with total_pressure and either mole_fraction (one gas) or mole_fractions (list). The response returns partial_pressure or partial_pressures using Pi = yi · P.
Can I send only one component of air?
Yes. Use mole_fraction for a single yi (for example 0.21 for oxygen) and total_pressure; residual unlisted gases are allowed when you do not send a full composition array.