Partial pressure from mole fraction calculator
Air treated as 0.21 oxygen by mole at 1 atm gives an oxygen partial pressure of 0.21 atm. Enter the mole fraction and the total pressure in any unit to get each component's share in air, flue gas or breathing mixtures. 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
- Partial pressure
- 0.21
Partial pressure is the pressure a single gas component would exert if it alone occupied the entire volume of a mixture at the same temperature. Students first drill binary cases such as dry air treated as twenty-one percent oxygen by mole at one atmosphere, then move to multi-component process streams and high-pressure cylinders. This calculator accepts a dimensionless mole fraction and a total pressure in any consistent unit, returns the component partial pressure with the formula string for audit, and rejects mole fractions outside zero to one so a non-physical composition never silently multiplies through.
Where partial pressure from mole fraction shows up in real work
Secondary-school and university chemistry courses assign Dalton-law drills that convert composition and total pressure into component partial pressures for air, flue gas, and cylinder mixtures; a single trusted oracle speeds grading and demo setup without hand-waving floating-point noise. Environmental and atmospheric notebooks turn mixing ratios and station pressure into partial pressures for ideal-gas density and pollutant load calculations. Respiratory therapists, anesthesiologists, and scuba planners reason about inspired oxygen partial pressure from fraction of inspired oxygen and ambient or chamber total pressure.
If you later need Raoult solvent vapor pressure from pure P°, mole fraction from component moles, osmotic pressure from molarity, or automatic pressure-unit conversion, treat those as separate search intents and landings rather than overloading this partial-pressure calculator page.
What you can do with it
Process gas composition to pressure
Convert GC mole fractions and stream total pressure into component partial pressures for equilibrium, absorption, and reactor inputs.
Air and breathing-gas partial pressures
Find oxygen or nitrogen partial pressure from mole fraction (or ideal volume fraction) and ambient or cylinder total pressure.
FAQ
What is partial pressure from mole fraction?
The result uses the same pressure unit as P_total.
What happens if mole fraction is outside 0 to 1?
A true mole fraction must lie in the closed interval [0, 1]; values outside that range are rejected instead of producing a non-physical partial pressure.
Which pressure unit should I use?
Any consistent unit: atm, kPa, bar, torr, Pa, or another pressure unit.
Is volume percent the same as mole fraction?
For ideal gases at the same temperature and pressure, volume fraction equals mole fraction.
What does it cost?
The browser tool is free and runs locally.
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/partial-pressure-from-mole-fraction \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"mole_fraction":0.21,"total_pressure":1}'const res = await fetch("https://api.kit.forhosting.com/chem/partial-pressure-from-mole-fraction", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"mole_fraction": 0.21,
"total_pressure": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/partial-pressure-from-mole-fraction",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"mole_fraction": 0.21,
"total_pressure": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/partial-pressure-from-mole-fraction", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"mole_fraction":0.21,"total_pressure":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"mole_fraction":0.21,"total_pressure":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/partial-pressure-from-mole-fraction", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"mole_fraction": 0.21,
"total_pressure": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.partial_pressure_from_mole_fraction",
"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
For ideal gas mixtures Dalton's law states that the partial pressure of component i equals its mole fraction times the total pressure of the mixture: p_i equals x_i times P_total. That product is the workhorse of atmospheric chemistry, combustion air calculations, respiratory gas analysis, scuba gas blending, and every general-chemistry problem that asks for oxygen or nitrogen partial pressure in air.
How Dalton partial pressure is defined and why mole fraction bounds matter
Total pressure must be finite and non-negative: zero total pressure yields zero partial pressure for every species, while a negative total is rejected as non-physical. Callers who only know volume percent in ideal gas may use that number divided by one hundred as the mole fraction because volume fraction equals mole fraction for ideal gases at the same T and P. Unlike Raoult's law, which multiplies solvent mole fraction by pure-solvent vapor pressure P°, this landing multiplies gas mole fraction by mixture total pressure and does not require pure-component vapor-pressure data. Start from the formal statement of Dalton's law of partial pressures for an ideal gas mixture: the partial pressure p_i of component i is the product of that component mole fraction x_i and the total pressure of the mixture P_total. Write p_i equals x_i multiplied by P_total and keep the same pressure unit for total and partial values, whether you work in atmospheres, kilopascals, bars, torr, or pascals. The mole fraction is dimensionless and must lie in the closed interval from zero to one inclusive when the input is a true mole fraction of a physical mixture; values below zero or above one are non-physical and this capability fails with a clear invalid_input message rather than inventing a pressure. The capability evaluates the closed form in deterministic floating-point arithmetic: no random seeds, no wall-clock timestamps, no network calls, and no model drift, so identical inputs always produce identical JSON. It does not convert pressure units, compute mole fraction from component moles, or apply non-ideal fugacity corrections; those are separate search intents with their own landings when product coverage grows.
What you send and what you get back
Classic textbook checks include mole fraction zero point two one with total pressure one atmosphere giving partial pressure zero point two one atmospheres for oxygen in dry air, mole fraction one with any total pressure recovering that total as the pure-component partial pressure, and mole fraction zero giving partial pressure zero regardless of total pressure. Keep the pressure unit consistent across multi-step pipelines so atm or kPa never mix without an explicit conversion step. Send two required fields: mole_fraction, a finite number in the closed range from zero through one giving the gas-phase mole fraction of the component of interest, and total_pressure, a finite non-negative number giving the mixture total pressure in whatever unit you want the answer expressed. mole_fraction outside zero to one fails with invalid_input and is not charged; the same applies to missing fields, non-numeric strings, NaN, Infinity, and negative total pressure. On success the response echoes cleaned mole_fraction and total_pressure, returns partial_pressure as the primary result in the same pressure unit as total_pressure, attaches a units hint object describing dimensionless mole fraction and shared pressure units, sets method to dalton_partial_pressure, and formula to p_i equals x_i times P_total so homework write-ups can cite the same expression. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where partial pressure from mole fraction shows up in real work
Process engineers and plant chemists convert laboratory gas-chromatography mole fractions into partial pressures before feeding reaction equilibrium, absorption, and membrane models that expect p_i rather than x_i alone. Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Integration use cases
Homework and lab answer keys
Compute p_i = x_i × P_total from mole fraction and total pressure so students and auto-graders share one closed-form Dalton-law ground truth.