Partial pressures from mole amounts
Share out a mixture's total pressure from how many moles of each gas it holds: 2, 1 and 1 mol at a total of 1 atm give partial pressures of 0.5, 0.25 and 0.25 atm. Each gas also gets its mole fraction. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Moles
- 2, 1, 1
- Total pressure
- 1
- Total moles
- 4
- Mole fractions
- 0.5, 0.25, 0.25
- Partial pressures
- 0.5, 0.25, 0.25
When a gas mixture is specified by how many moles of each component are present, Dalton’s law still partitions total pressure among the gases, but you first form mole fractions from the amounts: each partial pressure equals that component’s mole amount divided by the total moles, then multiplied by the mixture total pressure. Students checking multi-gas homework from n1, n2, n3 and P, chemistry teachers building answer keys, lab technicians turning weighed or measured amounts into component pressures, and lightweight process sketches all need the same contract—non-negative mole lists, a positive total pressure, a clear error when total moles is zero, and structured partial-pressure results without re-deriving the composition by hand.
What partial pressures from mole amounts means and which inputs you send
In introductory chemistry and gas-law practice, many problems give you the number of moles of each gas in a closed mixture plus the total absolute pressure, then ask for each component’s partial pressure. The underlying identity is Dalton’s law: partial pressures sum to total pressure for an ideal mixture, and each share is proportional to the amount of substance of that gas. Algebraically you write yi equals ni over n total and Pi equals yi times P, which collapses to Pi equals ni over n total times P.
Search intent clusters around partial pressures from moles, partial pressure from mole amounts calculator, Dalton law with n1 n2 n3, gas mixture component pressure from moles, and convert moles to partial pressure at fixed total P. People want a numeric table they can check against a worksheet or feed into a larger pipeline—not only a reminder that the formula exists. Keep units consistent: the engine only ratios moles and multiplies by P; it does not convert atmospheres to pascals or gauge readings to absolute pressure.
Individual components may be zero moles when other components carry positive amount, but the sum of all moles must be strictly positive so composition is defined.
Classroom uses and how it differs from fraction tools
Call the free in-browser partial pressures from mole amounts calculator for homework checks, lecture demos, and quick multi-gas mental math without installing a thermodynamics package. If you already have mole fractions instead of moles, use a fraction-based Dalton partial-pressure tool; if you have partial pressures and need mole fractions, use the inverse Dalton mole-fraction calculator—those landings match different search intents even though all rest on Dalton’s law. Choose absolute pressure units consistently 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 moles, mole fraction, and partial pressure columns—the same shape students write when they apply Dalton’s law from mole amounts by hand.
What you can do with it
Homework from mole tables
Students and graders compute each gas’s partial pressure from a list of mole amounts and total P, with a clear error when total moles is zero.
Lab and process composition sketches
Quick structured estimates of component pressures from measured or recipe mole amounts without a full process simulator or spreadsheet.
FAQ
How is this different from a mole-fraction Dalton calculator?
Fraction-based tools expect yi already known and only multiply by total pressure.
Is the partial pressures from mole amounts calculator free?
The browser tool runs free on your device.
Which pressure units should I use?
Any coherent absolute unit (atm, Pa, bar, torr) is fine if total pressure and partial pressures share the same unit. The engine multiplies only; it does not convert units.
Can one of the gases have zero moles?
Yes. A component can be zero as long as the others add up to a positive amount, and its partial pressure is then zero. If every amount is zero, the mixture has no composition and the input is rejected.
Does it correct for real-gas behaviour?
No. It applies Dalton's law for ideal mixtures only, sharing the pressure in proportion to the moles. There is no correction for non-ideal gases and no liquid-vapour equilibrium.
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/dalton-from-moles \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"moles":[2,1,1],"total_pressure":1}'const res = await fetch("https://api.kit.forhosting.com/chem/dalton-from-moles", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"moles": [
2,
1,
1
],
"total_pressure": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/dalton-from-moles",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"moles": [
2,
1,
1
],
"total_pressure": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/dalton-from-moles", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"moles":[2,1,1],"total_pressure":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"moles":[2,1,1],"total_pressure":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/dalton-from-moles", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"moles": [
2,
1,
1
],
"total_pressure": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.dalton_from_moles",
"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 ratio-and-product path deterministically for any coherent pressure unit you already use, rejects empty lists, negative moles, non-positive pressure, and zero total moles with invalid_input, and returns JSON that homework checkers, tutoring apps, and pipelines can pin in tests.
What partial pressures from mole amounts means and which inputs you send
Send a moles array of non-negative finite amounts for every component you care about, and a positive total_pressure in any coherent absolute unit already used in the problem (atmospheres, pascals, bar, or torr). Aliases n, n_i, mole_amounts, P, P_total, and pressure are accepted so forms and scripts can match textbook variable names.
How this calculator validates moles, rejects zero total, and applies Pi = (ni/n)·P
Numeric strings that parse to finite numbers are accepted so web forms and CSV-style pipelines can pass values without an extra cast. After the list is accepted the engine sums n total. There is no Raoult vapor-liquid branch, no real-gas fugacity correction, and no unit conversion service—this is pure Dalton from mole amounts for ideal mixtures. Send a JSON body with required moles and total_pressure. 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. The moles field must be a non-empty array with at most the published component cap; each entry must be a non-negative finite number, and negative mole amounts are invalid_input because amount of substance cannot be negative in this product. If that sum is zero—all components zero or an empty effective composition—the request fails with a message that total moles is zero and partial pressures cannot be computed. That failure is the product’s hard guard against division by zero and against inventing mole fractions when no gas is present. When n total is positive each mole fraction is ni divided by n total, each partial pressure is that fraction times total pressure, values are rounded to a stable decimal precision so the same input always yields the same JSON across JavaScript engines, and the response echoes moles, total_moles, mole_fractions, total_pressure, partial_pressures, and a components array with index, moles, mole_fraction, and partial_pressure for each gas. The formula field is always Pi=(ni/n_total)*P and method is always dalton_from_moles so downstream code can branch without sniffing shapes.
API usage, pricing, classroom workflows, and how this differs from fraction-based tools
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 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=(ni/n)·P oracle instead of reimplementing Dalton composition math in every language.
Technical questions
How do I get partial pressures from mole amounts?
Send JSON with moles as an array of non-negative ni values and total_pressure as a positive P. The response includes mole_fractions, partial_pressures, and a components breakdown.
What happens when total moles is zero?
The request fails with invalid_input. Composition is undefined when n_total equals zero, so partial pressures cannot be computed and the request is not charged.