Henry's law constant calculator
A dissolved gas concentration of 0.0012 mol/L under a partial pressure of 1 atm gives a Henry's law constant of 0.0012 mol/(L·atm). Enter the concentration and the pressure to get kH with the substitution shown. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- C
- 0.0012
- Power (W)
- 1
- Concentration
- 0.0012
- Dissolved concentration
- 0.0012
- Pressure
- 1
- Partial pressure
- 1
A Henry's law constant calculator turns a measured dissolved gas concentration and the matching gas partial pressure into the single proportionality constant that links them at equilibrium. Homework checks, lab write-ups, environmental dissolved-oxygen models, and coding kata expected values all need that same deterministic division without opening a CAS or a unit-converter stack.
What Henry's law constant means for dissolved gases
Henry's law states that at a fixed temperature the amount of a gas that dissolves in a liquid is proportional to the partial pressure of that gas above the solution, provided the gas does not react chemically with the solvent and the solution remains dilute. In the solubility form used here, dissolved concentration c equals k_H times partial pressure p, so the Henry law constant is obtained by rearranging to k_H equals c over p.
That single real number completely characterizes the linear equilibrium relationship for the pair of units you chose: if c is in moles per litre and p is in atmospheres, then k_H has units of moles per litre per atmosphere; if you prefer moles per cubic metre and pascals, the numerical value changes but the ratio structure stays the same.
Teachers and automated graders care about the zero-pressure rejection as much as the arithmetic: a student who reports a finite constant when p equals zero has left the domain of the formula, and a silent absolute-value or default-pressure fallback would hide that mistake. The check path recomputes the quotient with the same fixed rounding used for published fields, so a successful response always ships with steps you can assert in tests or worksheets.
Remember that tabulated literature constants often use the inverse volatility form or a different temperature; this tool only evaluates the ratio you supply and does not convert tables or adjust for non-ideal activity.
Practical tips, limits, and related searches
Keep concentration and pressure inside the published absolute range so their ratio cannot overflow into a non-finite constant that the solver must reject. Prefer sending numbers rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern. Convert millimoles, kilopascals, or bar to the same system before you call if you want k_H already in textbook units without mental rescaling afterward.
Prefer this capability when you already have scalar c and p and only need the ratio; if your source is a word problem, extract concentration and partial pressure first and keep units consistent. Round-trip checks are easy: recompute c divided by p by hand and confirm it equals the published k_H within the same twelve-decimal rounding.
What you can do with it
Homework checks for gas solubility
Students enter dissolved concentration and partial pressure from lab or textbook problems and compare hand-written k_H against a deterministic result before submitting.
Quick constant from field measurements
Field kits report dissolved gas and headspace partial pressure; pipelines compute k_H once and store it for later equilibrium calculations at the same temperature assumption.
FAQ
What is Henry's law constant?
In the solubility form used here, k_H = c / p: dissolved gas concentration divided by gas partial pressure at equilibrium for a fixed temperature and consistent units.
Which units should I use for c and p?
Any consistent pair (e.g. mol/L with atm, or mol/m³ with Pa). The numerical value of k_H depends on those units; the tool does not convert units for you.
Does this apply temperature corrections?
No. It evaluates k_H = c/p for the values you supply. Temperature-dependent solubility requires a separate model or tabulated adjustment.
Is the Henry's law constant calculator free?
The browser tool is free and runs locally.
Why doesn't my constant match the value in a data table?
Many tables use the inverse, volatility form of the constant, or a different temperature. This calculator only divides the concentration by the pressure you enter, so check which form and temperature your table uses.
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/henrys-law-constant \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"c":0.0012,"p":1}'const res = await fetch("https://api.kit.forhosting.com/chem/henrys-law-constant", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"c": 0.0012,
"p": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/henrys-law-constant",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"c": 0.0012,
"p": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/henrys-law-constant", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"c":0.0012,"p":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"c":0.0012,"p":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/henrys-law-constant", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"c": 0.0012,
"p": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.henrys_law_constant",
"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 | 1000000000000 |
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
Enter concentration c and partial pressure p in any consistent unit pair; the tool returns k_H equals c over p, a readable substitution equation, step-by-step arithmetic, and mirrored field names so scripts can read k_H, henry_constant, or henrys_law_constant without renaming. When partial pressure is zero the ratio is undefined, so the API returns a clear invalid_input error instead of Infinity or a silent NaN.
How to call the API and what comes back
Partial pressure must be non-zero; values whose absolute magnitude is at or below one times ten to the minus fifteen are treated as zero and rejected. Send a JSON body with two required finite numbers: c (aliases concentration, dissolved, dissolved_concentration, C, and solubility) for dissolved gas concentration, and p (aliases pressure, partial_pressure, P, pp, and p_gas) for gas partial pressure. Absolute values must stay within the published limit of one trillion so the quotient remains finite in IEEE double precision on the Worker and in the browser. On success the response echoes rounded c, concentration, and dissolved_concentration, sets p, pressure, and partial_pressure to the same rounded pressure, sets k_H, henry_constant, and henrys_law_constant to the same rounded quotient, formula to the string k_H equals c over p, equation to a human-readable substitution line, message to a short English summary, and steps to an ordered array of given values, formula, substitution, and summary. Failed validation—missing fields, non-finite numbers, values outside absolute limits, a non-finite quotient, or zero pressure—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, limits, and related searches
When teaching, pair examples: c equals zero point zero zero one two with p equals one yields k_H equals zero point zero zero one two; doubling concentration at fixed pressure doubles k_H; setting p to zero demonstrates the hard invalid_input path; and a large pressure with a modest dissolved amount yields a small constant as expected from the definition. This landing targets people searching for a Henry's law constant calculator, kH equals c over p, or dissolved gas solubility constant online; it is not a full temperature-dependent solubility model, not a Raoult-law vapor-pressure tool, not an ideal-gas partial-pressure decomposer, and not a gas-exchange kinetics simulator. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately set pressure to zero.
Integration use cases
Unit tests for environmental models
Generate known-good c/p ratios plus deliberate zero-pressure rejections for coding kata and dissolved-oxygen model expected values.
Technical questions
What happens when partial pressure is zero?
The ratio is undefined. This tool returns invalid_input instead of Infinity or NaN.