Kp from partial pressures calculator
Work out Kp from one list of equilibrium pressures: for N2 + 3H2 ⇌ 2NH3 at 0.5, 1.5 and 0.1 atm, with reactants entered as negative coefficients, Kp is 0.0059259259 and the moles of gas change by −2. 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.5, 1.5, 0.1
- Coefficients
- -1, -3, 2
- Kp
- 0.0059259259
- Delta n
- -2
- Product factor
- 0.01
- Reactant factor
- 1.6875
This Kp from partial pressures calculator evaluates the pressure equilibrium constant for a gas-phase reaction when you already know the equilibrium partial pressures of every species that appears in the expression. Enter parallel lists of partial pressures and signed stoichiometric coefficients — positive for products, negative for reactants — and the engine returns Kp equals the product over i of P_i to the power ν_i, along with the gas-phase mole change Δn, the separate product and reactant factors, and a short formula reminder. The path is fully deterministic: finite arithmetic only, no network calls, no sampling, and no date-dependent shortcuts. Classic textbook checks include ammonia synthesis N2 plus 3 H2 yields 2 NH3 with partial pressures 0.5, 1.5, and 0.1 giving a small Kp, and the reverse check that a zero reactant pressure is rejected rather than silently producing infinity.
What Kp tells you and how to read each number
The pressure equilibrium constant Kp is the equilibrium constant written with partial pressures instead of molar concentrations. For a balanced gas-phase reaction, each species contributes a factor of its equilibrium partial pressure raised to its stoichiometric power: products raise the numerator and reactants raise the denominator. With signed stoichiometric numbers the same rule collapses to a single product Kp equals the product of P_i to the ν_i, where ν_i is positive for products and negative for reactants.
The value of Kp depends on the pressure unit you choose for every partial pressure, so keep atm, bar, or torr consistent across the list; this calculator does not convert units for you.
Where Kp evaluation fits in study, lab work, and software
Students meet Kp when a textbook moves from concentration-based Kc to gas equilibria, when a lab measures partial pressures of N2, H2, and NH3 and asks for the numerical constant, or when a contest problem supplies equilibrium pressures and demands Kp without a full ICE table re-derivation. Teachers can pre-generate answer keys for modest pressure sets without trusting opaque calculator apps that silently switch between atm and bar or drop signs on stoichiometric numbers.
Developers call the same contract from scripts to seed deterministic test vectors for equilibrium solvers, to normalize user-entered pressure lists before thermodynamics demos, or to satisfy programming-challenge statements that demand Kp rather than a hand-waved ratio. Process and education tools use the evaluation when a learner types pressures and coefficients and the UI must show Kp, Δn, and the separate product and reactant factors for step-by-step checking.
What you can do with it
Homework and equilibrium checks
Compute Kp from textbook equilibrium partial pressures and signed ν for ammonia synthesis, Haber, and SO2 oxidation drills.
Lab and tutoring software
Normalize measured partial pressures and stoichiometry into Kp for lab notebooks, plotters, and interactive lessons.
FAQ
What does the Kp from partial pressures calculator cost?
It is free in your browser on this page.
How is Kp defined here?
Kp = ∏ P_i^{ν_i} with products ν > 0 and reactants ν < 0. Equivalently Kp is the product of product pressures raised to their powers divided by the product of reactant pressures raised to theirs.
What happens if a reactant partial pressure is zero?
A zero reactant pressure makes Kp undefined (division by zero in the reactant factor).
Do all partial pressures need the same unit?
Yes. Supply every P_i in the same pressure unit (atm, bar, torr, …). The tool does not convert units; Kp carries (pressure)^{Δn} in that unit system.
Does this tool compute Kc or solve for an unknown pressure?
No. It only evaluates Kp from known equilibrium partial pressures and coefficients. Use concentration-based or solver tools if you need Kc or an unknown P.
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/kp-from-partial-pressures \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"partial_pressures":[0.5,1.5,0.1],"coefficients":[-1,-3,2]}'const res = await fetch("https://api.kit.forhosting.com/chem/kp-from-partial-pressures", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"partial_pressures": [
0.5,
1.5,
0.1
],
"coefficients": [
-1,
-3,
2
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/kp-from-partial-pressures",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"partial_pressures": [
0.5,
1.5,
0.1
],
"coefficients": [
-1,
-3,
2
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/kp-from-partial-pressures", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"partial_pressures":[0.5,1.5,0.1],"coefficients":[-1,-3,2]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"partial_pressures":[0.5,1.5,0.1],"coefficients":[-1,-3,2]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/kp-from-partial-pressures", 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.5,
1.5,
0.1
],
"coefficients": [
-1,
-3,
2
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.kp_from_partial_pressures",
"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_species | 50 |
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
What Kp means and what the response contains
The response echoes the normalized partial_pressures and coefficients arrays, reports the numeric kp, the gas-phase mole change delta_n equal to the sum of the ν_i that entered the expression, the intermediate product_factor and reactant_factor that make the fraction transparent, a species_count, the method tag kp_from_partial_pressures, the precision used, and a compact formula string. There is no approximate CAS path and no Monte Carlo sampling of pressures: the engine either builds a finite floating-point Kp inside the supported ranges or rejects the input with invalid_input. Rejected cases include missing arrays, length mismatch, negative pressures, empty lists, all-zero coefficients, missing product or reactant terms, and any reactant whose partial pressure is zero, because raising a zero pressure to a negative power is division by zero and Kp is undefined.
How partial pressures and coefficients are read and kept reproducible
Both arrays must be non-empty, the same length, and ordered so that index i pairs P_i with ν_i. Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong Kp. Zero coefficients are skipped as spectators that do not appear in the equilibrium expression, while zero product pressures yield Kp equal to zero, which is a valid finite result when products are absent at equilibrium. The preferred fields are partial_pressures for the list of equilibrium gas pressures and coefficients for the parallel list of signed stoichiometric numbers, but aliases pressures, p, partials, P, and gas_pressures for the first list, and nu, coeffs, stoich, stoichiometric_coefficients, and nu_i for the second, are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. A zero or numerically zero reactant pressure fails with invalid_input because the reactant factor would divide by zero. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for pressures, coefficients, Kp, Δn, and the factors, 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 the Kp product yourself.
Where Kp evaluation fits in study, lab work, 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 the equilibrium-constant-from-Gibbs tool when you need the thermodynamic K from ΔG°, with total-pressure mixture helpers when you build partial pressures from mole fractions, and with other chemistry endpoints when you are assembling a small lab of free, deterministic equilibrium helpers.
Integration use cases
Deterministic test fixtures
Generate reproducible Kp, Δn, and factor fields for unit tests, property checks, and CI assertions on gas equilibria.