Relative humidity calculator
An actual vapour pressure of 1.5 kPa against a saturation pressure of 2.5 kPa means 60 % relative humidity. Enter both pressures in the same unit and get the percentage, the plain ratio and each substitution step. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Actual
- 1.5
- Saturation
- 2.5
- Actual vapor pressure
- 1.5 %
- E
- 1.5
- Saturation vapor pressure
- 2.5
- Es
- 2.5
A relative humidity calculator turns two vapor-pressure numbers into the percentage humidity reading used in weather reports, HVAC design, and lab notebooks. Enter the actual partial pressure of water vapor in the air and the saturation vapor pressure at the same temperature; the tool returns RH equals one hundred times actual over saturation, a ratio field, a human-readable equation string, step-by-step substitution, and a supersaturation flag when the actual pressure exceeds saturation. Negative actual vapor pressure is also rejected because a partial pressure below zero is not physical in this model. Homework checks, psychrometric worksheets, sensor validation, and coding-kata expected values all need that same deterministic percentage without opening a full climate-model stack.
What relative humidity means from vapor pressures
Relative humidity is the ratio of the amount of water vapor actually present in the air to the maximum amount the air can hold at that temperature, expressed as a percentage. In pressure form the definition is simple and unit-flexible: RH percent equals one hundred times the actual vapor pressure e divided by the saturation vapor pressure es, provided both pressures use the same unit—kilopascals, pascals, millibars, or torr all work as long as you do not mix them.
Saturation vapor pressure depends strongly on temperature: warmer air has a higher es, so the same actual vapor pressure yields a lower RH on a hot day than on a cold one. This tool does not compute es from temperature; it assumes you already have both pressures from a table, a Magnus formula, or an instrument that reports vapor pressure directly. Zero actual pressure is valid and yields zero percent RH: perfectly dry air relative to whatever saturation value you supplied.
Teachers and automated graders care about the zero-es rejection as much as the success path: a student who forgets to look up es should see an explicit error, not a nonsense infinite humidity. The check path recomputes one hundred times e over es with the same fixed rounding used for published fields, so a successful response always ships with steps you can assert in tests or worksheets.
Practical tips, limits, and related searches
Keep both pressures in the same unit and inside the published absolute range so the percentage cannot overflow into a non-finite result 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. If you only know temperature and dew point, convert those to vapor pressures first—this landing is intentionally the pure ratio step, not a full psychrometric chart.
This page targets people searching for a relative humidity calculator, vapor pressure RH percent, or saturation humidity online; it is not a dew-point solver, not a wet-bulb calculator, and not a saturation-pressure-from-temperature table by itself. Prefer this capability when you already have e and es and only need the percentage; if your source is a weather station reading in degrees, obtain vapor pressures or use a dedicated psychrometric tool.
What you can do with it
Sensor and HVAC validation
Quickly convert instrument vapor-pressure pairs into relative humidity for HVAC setpoints, chamber control, or data-logger post-processing when es is already known.
FAQ
How is relative humidity calculated from vapor pressure?
RH (%) = 100 × (actual vapor pressure e) / (saturation vapor pressure es), using the same pressure unit for both. This tool returns that percentage with fixed rounding and substitution steps.
Can relative humidity be above 100%?
Yes. When actual vapor pressure exceeds saturation, the response reports RH above 100% and sets supersaturated to true. The value is not clipped.
Does this compute saturation pressure from temperature?
No. You must supply both actual and saturation vapor pressures. Use a Magnus or Clausius–Clapeyron calculator if you only have temperature.
Is the relative humidity calculator free?
The browser tool is free and runs locally.
Do both pressures need to be in the same unit?
Yes. Kilopascals, pascals, millibars or torr all work, as long as the actual and the saturation vapour pressure use the same one. Mixing units would give a wrong percentage.
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/thermo/relative-humidity \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"actual":1.5,"saturation":2.5}'const res = await fetch("https://api.kit.forhosting.com/thermo/relative-humidity", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"actual": 1.5,
"saturation": 2.5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/thermo/relative-humidity",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"actual": 1.5,
"saturation": 2.5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/thermo/relative-humidity", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"actual":1.5,"saturation":2.5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"actual":1.5,"saturation":2.5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/thermo/relative-humidity", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"actual": 1.5,
"saturation": 2.5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "thermo.relative_humidity",
"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
When saturation vapor pressure is zero the ratio is undefined, so the API returns a clear invalid_input error instead of Infinity or a silent NaN.
What relative humidity means from vapor pressures
Zero saturation pressure would make the ratio undefined—there is no maximum capacity to compare against—so the solver rejects non-positive es with invalid_input rather than inventing a percentage. Values above one hundred percent are allowed and marked supersaturated; they appear in cloud chambers, fog nucleation studies, and some laboratory supersaturation experiments, so the API reports them instead of clipping at one hundred.
How to call the API and what comes back
The actual vapor pressure must be non-negative; the saturation vapor pressure must be strictly positive—values whose absolute magnitude is at or below one times ten to the minus fifteen are treated as zero for the saturation check and rejected. Send a JSON body with two required finite numbers: actual (aliases actual_vapor_pressure, e, pa, vapor_pressure, and partial_pressure) and saturation (aliases saturation_vapor_pressure, es, ps, and saturated_vapor_pressure). Absolute values must stay within the published limit of one trillion so intermediate quotients remain finite in IEEE double precision on the Worker and in the browser. On success the response echoes rounded actual and saturation under several mirror keys (actual_vapor_pressure, e, saturation_vapor_pressure, es), sets relative_humidity, rh, and percent to the same rounded percentage, ratio to e divided by es without the hundred factor, formula to the string RH equals one hundred times e over es, equation to a filled numeric line ending in percent, supersaturated to a boolean that is true when e is greater than es, unit to the percent sign, message to a short English summary, and steps to an ordered array of substitution lines. Failed validation—missing fields, non-finite numbers, values outside absolute limits, negative actual pressure, non-positive saturation pressure, or a non-finite computed RH—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: actual one point five and saturation two point five yield sixty percent RH; equal actual and saturation yield one hundred percent; actual zero and any positive saturation yield zero percent; actual greater than saturation yields supersaturated true and RH above one hundred; and saturation equal to zero demonstrates the hard invalid_input path. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately send zero saturation. Round-trip checks are easy: recompute one hundred times actual divided by saturation by hand and confirm it equals the published relative_humidity within the same twelve-decimal rounding, and confirm that flipping only the saturation value scales the percentage as expected.
Integration use cases
Homework checks for RH = 100·e/es
Students enter actual and saturation vapor pressures from textbook psychrometrics problems and compare hand-written RH percent against a deterministic result before submitting.
Unit tests for humidity helpers
Generate known-good percentages, zero-actual dry-air cases, supersaturation cases, and deliberate zero-saturation rejections for coding kata expected values.
Technical questions
What happens when saturation vapor pressure is zero?
Relative humidity is undefined (division by zero). The API returns invalid_input instead of Infinity or NaN.