Total pressure of gas mixture calculator
The partial pressures of oxygen, nitrogen and argon in dry air add up to a total of 1 atm: that is Dalton's law. List the partial pressure of each gas in one unit and get the mixture's total pressure and the number of gases counted. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Partial pressures
- 0.21, 0.78, 0.01
- Total pressure
- 1
- Quantity
- 3
- Precision
- 10
Enter each gas partial pressure in the same unit—atmospheres, kilopascals, bars, torr, or any consistent scale—and the engine returns the total mixture pressure as a plain numeric sum. Zero is allowed for a negligible or absent component; any negative partial pressure is rejected because pressure cannot be negative in this model. The arithmetic is fully deterministic, with no network calls, sampling, or date-dependent shortcuts.
What Dalton's law of partial pressures says
In a mixture of ideal gases that do not react, each gas pushes on the walls as if it occupied the whole container by itself at the same temperature. That push is its partial pressure, and Dalton's law says the total pressure of the mixture is simply the sum of all of them. Dry air is the classic case: the partial pressures of oxygen, nitrogen and argon add up to one atmosphere. The calculator takes your list of partial pressures, adds them, and tells you the total along with how many components it counted.
Where it is used and the mistakes to avoid
Students use the sum when a problem moves from a single gas to a mixture, and labs use it after reading a manometer for each gas. Process and environmental loggers that record component pressures also need the line total. The most common mistake is mixing units: every value must be in the same scale, whether atmospheres, kilopascals, bars or torr, because the tool does not convert anything. A zero is fine for a gas that is absent or negligible, but a negative pressure is rejected, and so is an empty list.
Where mixture total pressure fits in study, lab, and software
Students meet Dalton’s law when a textbook moves from single-gas ideal behavior to multi-component atmospheres, when a lab reports manometer readings for each gas after absorption steps, or when a contest problem gives partial pressures and asks for the absolute pressure of the mixture. Teachers can pre-generate answer keys for modest lists without trusting opaque calculator apps that silently switch units or drop a trailing zero.
Developers call the same contract from scripts to seed deterministic test vectors for process simulators, to normalize user-entered partial-pressure tables before mole-fraction demos, or to satisfy programming-challenge statements that demand a plain total rather than a hand-waved atmosphere. Process and environmental tools use the sum when a logger records component partial pressures and the UI must show the current total line pressure.
What you can do with it
Homework and Dalton checks
Sum textbook partial pressures into P_total and verify dry-air or two-gas mixture answers before lab reports.
Lab and process dashboards
Normalize logged partial-pressure columns into a single mixture total for teaching demos and lightweight process UIs.
FAQ
What does the total pressure of gas mixture calculator cost?
It is free in your browser on this page.
What happens if a partial pressure is negative?
Partial pressures must be finite and non-negative; the message names the array index of the bad value.
Do I need to specify pressure units?
No. Use any single consistent unit for every entry (atm, kPa, bar, torr, etc.). The calculator returns a pure numeric sum in that same unit.
Why are results rounded to a precision?
Default precision is 10 decimal places; you can set precision from 0 to 15.
Does Dalton's law apply to gases that react with each other?
No. The law holds for ideal gases that do not react chemically, each behaving as if it filled the whole volume alone at the same temperature. If the gases react, the partial pressures change and a simple sum no longer describes the mixture.
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/chem/total-pressure-gas-mixture \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"partial_pressures":[0.21,0.78,0.01]}'const res = await fetch("https://api.kit.forhosting.com/chem/total-pressure-gas-mixture", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"partial_pressures": [
0.21,
0.78,
0.01
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/total-pressure-gas-mixture",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"partial_pressures": [
0.21,
0.78,
0.01
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/total-pressure-gas-mixture", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"partial_pressures":[0.21,0.78,0.01]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"partial_pressures":[0.21,0.78,0.01]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/total-pressure-gas-mixture", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"partial_pressures": [
0.21,
0.78,
0.01
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.total_pressure_gas_mixture",
"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.
Limits
max_abs_value | 1000000000000000 |
max_components | 100 |
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 total pressure of gas mixture calculator applies Dalton’s law of partial pressures: the total pressure of an ideal gas mixture equals the sum of the partial pressures of its components. Use it free in the browser for homework, lab write-ups, and process checks, or call the API at $0.002 per successful request when you need reproducible Dalton totals in CI, tutoring software, or teaching demos.
What Dalton’s law means and what the response contains
Dalton’s law of partial pressures states that for a mixture of ideal gases that do not react chemically, the total pressure of the mixture is the arithmetic sum of the pressures each gas would exert if it alone occupied the entire volume at the same temperature. In symbols, P total equals P one plus P two plus through P n, where each P i is the partial pressure of component i. That identity is the core of many introductory chemistry problems: given partial pressures for oxygen, nitrogen, and argon in a dry-air style mixture, the sum is the absolute pressure of the gas as a whole; given two process streams that meet in a header, the sum of their partial contributions is the line total when volumes and temperatures match the ideal model. This calculator returns the normalized list of partial_pressures rounded to the requested precision, the total_pressure sum, a count of how many components were supplied, the method tag dalton_partial_pressures, the precision used, and a short formula reminder string. There is no unit conversion path and no ideal-gas law solve for moles or volume: the engine either builds an exact floating-point sum inside the supported range or rejects the input with invalid_input. Rejected cases include a missing or empty partial_pressures array, non-finite entries, magnitudes above the documented ceiling, more components than the list limit, and any negative partial pressure, because a negative pressure is not a physical partial pressure in this Dalton model.
How partial pressures are read and how the sum stays reproducible
Each array element may be a number or a decimal string with optional leading plus signs and scientific notation when it parses as a finite value; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong total. Zero for a component is valid and simply contributes nothing to the sum, which is useful when a spreadsheet column includes an absent gas. The preferred field is partial_pressures, an array of finite numbers in any single consistent pressure unit, but aliases pressures, p, partials, P, and gas_pressures are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. Negative values fail with invalid_input and a message that names the array index, because partial pressure cannot be negative under Dalton’s law as implemented here. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for each partial pressure and for total_pressure, defaulting to ten and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing Dalton’s law yourself.
Where mixture total pressure fits in study, lab, and software
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split—free interactive exploration and a priced, identical API—matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with gas-law and concentration tools when you need related chemistry steps, and with other math endpoints when you are building a small lab of free, deterministic physical-chemistry helpers.
Integration use cases
Deterministic test fixtures
Generate reproducible total_pressure values for unit tests, property checks, and CI assertions on gas-mixture helpers.
Technical questions
What formula does this tool use?
Dalton’s law of partial pressures: P_total = P1 + P2 + … + Pn for ideal, non-reacting gases in the same volume and temperature context.