Van der Waals pressure calculator
One mole in 22.4 L at 273.15 K, with a of 3.592 and b of 0.04267, comes out just under 1 atm once attraction and molecular size are counted. Enter moles, volume, temperature, a and b to get the pressure with each correction shown. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- N
- 1
- V
- 22.4
- Absolute temperature
- 273.15
- A
- 3.592
- B
- 0.04267
- R
- 0.08205746
- Pressure
- 0.9953757234
- Free volume
- 22.35733
- Ideal term
- 1.0025345244
This van der Waals pressure calculator finds the real-gas pressure of a pure substance from the classic two-parameter equation of state. You supply the amount of gas in moles, the container volume, the absolute temperature, and the substance-specific constants a and b; an optional gas constant R defaults to the common litre-atmosphere value so textbook tables work without conversion. The deterministic formula is pressure equals n R T over free volume V minus n b, minus the attraction correction a n squared over V squared. The engine uses only finite arithmetic with no network calls, no sampling, and no date-dependent shortcuts.
What van der Waals pressure tells you
The ideal-gas law treats molecules as point particles with no attraction, so pressure is simply n R T over V. Real gases deviate when they are compressed or cooled enough for molecular size and intermolecular forces to matter. Johannes van der Waals introduced two positive constants: a scales the pressure reduction from attractive forces, and b scales the volume excluded by the finite size of molecules.
Rearranged for pressure, the equation reads P equals n R T divided by V minus n b, then subtract a n squared over V squared. That free-volume denominator is the reason the model cannot be evaluated when the container volume equals n times b: the repulsive hard-core limit has been reached and the algebraic expression diverges. Zero moles is allowed and yields a pressure of zero when a is finite because both terms scale with n or n squared.
There is no iterative volume root finder, no multi-component mixture mixing rules, and no automatic unit conversion between bar, pascal, and atmosphere.
Where real-gas pressure fits in study, lab work, and software
Students meet the van der Waals equation when a textbook moves from ideal-gas problems to compressibility and critical phenomena, when a homework set asks for the pressure of one mole of carbon dioxide in a fixed litre volume at a given kelvin temperature, or when a contest problem supplies a and b and expects a numeric P rather than a qualitative sketch. Teachers can pre-generate answer keys for modest mole and volume values without trusting opaque calculator apps that silently switch gas-constant units or drop the attraction term.
Lab instructors use the same closed form when a protocol compares measured cylinder pressure to a two-parameter real-gas prediction after students look up a and b for their gas. Developers call the same contract from scripts to seed deterministic test vectors for thermodynamics tutors, to normalize user-entered state variables before a notebook export, or to satisfy programming-challenge statements that demand van der Waals pressure rather than an ideal-gas shortcut.
What you can do with it
Homework and equation-of-state drills
Compute real-gas pressure from n, V, T, a, and b for textbook problems and compare against ideal-gas estimates.
Lab and teaching software
Normalize student-entered state variables into free-volume and attraction terms for demos, lab notebooks, and interactive lessons.
FAQ
What does the van der Waals pressure calculator cost?
It is free in your browser on this page.
What formula does this tool use?
P = n R T / (V − n b) − a n² / V². Default R is 0.08205746 L·atm/(mol·K) unless you supply another consistent gas constant.
What happens when volume equals n times b?
Free volume V − n b is zero, so the van der Waals pressure is undefined (division by zero).
Which units should I use for a, b, and R?
Any consistent system. With the default R in L·atm/(mol·K), typical tables use a in L²·atm/mol², b in L/mol, V in L, and pressure in atm.
Does this solve for volume or temperature?
No. It only evaluates pressure from n, V, T, a, b, and optional R. Use another tool if you need a root for volume at fixed pressure.
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/van-der-waals-pressure \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"n":1,"V":22.4,"T":273.15,"a":3.592,"b":0.04267}'const res = await fetch("https://api.kit.forhosting.com/chem/van-der-waals-pressure", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"n": 1,
"V": 22.4,
"T": 273.15,
"a": 3.592,
"b": 0.04267
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/van-der-waals-pressure",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"n": 1,
"V": 22.4,
"T": 273.15,
"a": 3.592,
"b": 0.04267
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/van-der-waals-pressure", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"n":1,"V":22.4,"T":273.15,"a":3.592,"b":0.04267}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"n":1,"V":22.4,"T":273.15,"a":3.592,"b":0.04267}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/van-der-waals-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
{
"n": 1,
"V": 22.4,
"T": 273.15,
"a": 3.592,
"b": 0.04267
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.van_der_waals_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.
Limits
max_abs_value | 1000000000000000 |
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
When volume equals n times b the free-volume term is zero and the request is rejected rather than returning infinity.
What van der Waals pressure means and what the response contains
This calculator returns the validated inputs n, V, T, a, b, and R, the computed pressure, the free volume V minus n b, the ideal-like term n R T over free volume, the attraction term a n squared over V squared, a method tag van_der_waals_pressure, the precision used, and a short formula string. The engine either evaluates the closed form inside the supported numeric range or rejects the input with invalid_input. Rejected cases include missing required fields, non-finite values, magnitudes above the documented ceiling, negative moles or constants, non-positive volume or temperature or R, and any state where volume equals n b within a tiny epsilon so a bad worksheet cell does not become a silent infinite pressure.
How inputs are read and how results stay reproducible
Moles must be finite and non-negative; volume, temperature, and R must be strictly positive; a and b must be non-negative. 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. When R is omitted the engine uses zero point zero eight two zero five seven four six litre atmospheres per mole per kelvin, matching common tables that list a in litre squared atmospheres per mole squared and b in litres per mole. The preferred fields are n for moles, V for volume, T for absolute temperature, a and b for the van der Waals constants, and optional R for the gas constant. Aliases include moles, mol, amount, and amount_mol for n; volume, v, and vol for V; temperature, temp, and kelvin for T; A, attraction, and a_const for a; B, covolume, and b_const for b; and gas_constant, r, and R_gas for R, so spreadsheets, query strings, and typed forms can reuse the same contract. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for every numeric output field, 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 free-volume and attraction terms yourself.
Where real-gas pressure fits in study, lab work, and software
Product and education tools use the endpoint when a learner types n, V, T, a, and b and the UI must show pressure with free-volume and attraction breakdowns. 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 combined gas law or STP volume helpers when you need related ideal-gas checks, and with other science endpoints when you are building a small lab of free, deterministic chemistry calculators.
Integration use cases
Deterministic test fixtures
Generate reproducible van der Waals pressures for unit tests, chemistry tutors, and CI assertions on P = nRT/(V−nb) − an²/V².