Absolute humidity calculator
At 30 °C and 60 % relative humidity the air holds roughly 18 g of water vapour per cubic metre; at 5 °C the same 60 % is barely 4 g. Enter temperature and relative humidity to get the real amount of moisture. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Creativity
- 25
- Relative humidity
- 60
- Temperature c
- 25 g/m³
- T
- 25
- Rh
- 60
- Rh fraction
- 0.6
An absolute humidity calculator turns a thermometer reading and a relative humidity percentage into the number that drying, storage, and comfort questions actually need: grams of water vapor per cubic meter of air. Enter the air temperature in degrees Celsius and the relative humidity as a percentage between zero and one hundred; the tool evaluates the Magnus saturation vapor pressure formula, applies the ideal-gas conversion, and returns the absolute humidity in grams per cubic meter together with the saturation vapor pressure in hectopascals, the relative humidity as a fraction, a human-readable equation string, and ordered substitution steps you can check by hand. Greenhouse managers, HVAC technicians, museum conservators, home-brew enthusiasts, and physics students all use this exact conversion when relative readings are not enough.
What absolute humidity is and why it differs from relative humidity
Relative humidity tells you how full the air is compared with what it could hold at the current temperature; absolute humidity tells you the actual mass of water vapor present in each cubic meter. The distinction matters because warm air holds far more water than cold air: sixty percent relative humidity at thirty degrees Celsius corresponds to roughly eighteen grams per cubic meter, while the same sixty percent at five degrees Celsius is barely four grams per cubic meter.
If you are sizing a dehumidifier, predicting condensation on cold surfaces, estimating drying times for lumber or grain, or controlling a greenhouse climate, you need the absolute figure because the physical processes—evaporation rates, mold growth, corrosion—respond to the true vapor density, not the percentage. This tool computes absolute humidity in two textbook steps. Then it scales that pressure by the relative humidity fraction and converts pressure and temperature into mass per volume with the ideal-gas constant for water vapor, the two hundred sixteen point six seven nine coefficient.
Because the calculation is deterministic and documented line by line in the response, you can reproduce every published number by hand or in a spreadsheet, which is exactly what homework checkers, graders, and automated test suites need from a reference implementation they can trust.
Practical tips, limits, and common pitfalls
Always pair the temperature and the relative humidity from the same moment and location: mixing a morning humidity with an afternoon temperature produces a plausible-looking but wrong absolute value. Remember that the tool expects Celsius—if your sensor reports Fahrenheit, convert before calling, because no unit guessing happens inside the solver. Extreme cold compresses absolute humidity dramatically because the saturation pressure falls exponentially, so winter air that feels humid at ninety percent may carry under four grams per cubic meter—useful intuition for humidifier sizing in heated buildings.
The Magnus formula used here is valid over water for typical terrestrial conditions; it is not a wet-bulb solver, a dew-point calculator, or a psychrometric chart, so reach for dedicated tools when you need those quantities. Prefer sending raw numbers rather than pre-formatted strings; string numbers are accepted only when they match a strict finite numeric pattern.
What you can do with it
HVAC and dehumidifier sizing
Convert room temperature and relative humidity readings into grams per cubic meter to estimate moisture loads, compare indoor and outdoor air, and size dehumidification equipment.
Homework and lab checks
Students verify Magnus-formula exercises and psychrometrics worksheets against a deterministic reference that shows every substitution step and rejects out-of-window humidity.
Storage and conservation monitoring
Museums, archives, greenhouses, and breweries translate sensor pairs into absolute humidity to catch condensation and mold-risk conditions that relative readings alone can hide.
FAQ
What happens if relative humidity is outside 0-100?
The 0-100 window is part of the contract, and failed tasks are never charged.
Is the absolute humidity calculator free?
The browser tool is free and runs locally.
What is the difference between relative and absolute humidity?
Relative humidity says how full the air is compared with what it could hold at its temperature. Absolute humidity is the actual mass of water vapour in each cubic metre, the figure that evaporation, mould and condensation respond to.
Why does the same relative humidity mean less water in cold air?
Because cold air can hold far less water vapour than warm air. At 60 % relative humidity, air at 30 °C carries roughly 18 g per cubic metre, while air at 5 °C carries barely 4 g.
Can I enter the temperature in Fahrenheit?
No, the calculator expects degrees Celsius and does not guess units. If your sensor reports Fahrenheit, convert the reading first, then enter it together with the relative humidity measured at the same moment.
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/phys/absolute-humidity \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"temperature":25,"relative_humidity":60}'const res = await fetch("https://api.kit.forhosting.com/phys/absolute-humidity", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"temperature": 25,
"relative_humidity": 60
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/phys/absolute-humidity",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"temperature": 25,
"relative_humidity": 60
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/phys/absolute-humidity", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"temperature":25,"relative_humidity":60}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"temperature":25,"relative_humidity":60}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/phys/absolute-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
{
"temperature": 25,
"relative_humidity": 60
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "phys.absolute_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
Relative humidity outside the zero-to-one-hundred window is rejected with a clear invalid_input error, and temperatures at or below absolute zero are refused as non-physical.
What absolute humidity is and why it differs from relative humidity
First it evaluates the Magnus formula to obtain the saturation vapor pressure at your temperature: six point one one two hectopascals times the exponential of seventeen point six two times the temperature divided by two hundred forty-three point one two plus the temperature.
How to call the API and read the response
You also get formula with the full symbolic expression, equation with your numbers substituted and the result in grams per cubic meter, unit set to g per cubic meter, message as a short English summary, and steps as an ordered array of substitution lines suitable for worksheets and assertion logs. Send a JSON body with two required finite numbers: temperature in degrees Celsius (aliases temperature_c, temp, t, temp_c, air_temperature) and relative_humidity as a percentage (aliases rh, humidity, relative_humidity_percent, rh_percent). The relative humidity must sit inside the zero-to-one-hundred window inclusive—values outside are rejected with invalid_input, as the contract demands—and the temperature must stay above absolute zero at minus two hundred seventy-three point one five degrees Celsius. On success the response echoes the rounded inputs under several mirror keys, sets rh_fraction to the percentage divided by one hundred, reports saturation_vapor_pressure and es in hectopascals from the Magnus step, and publishes the result as absolute_humidity, ah, and grams_per_cubic_meter, all the same rounded value in grams per cubic meter. Failed validation—missing fields, non-finite numbers, a relative humidity outside the window, or a non-physical temperature—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 common pitfalls
Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap while learners deliberately probe the zero-to-one-hundred boundary. Round-trip checks are easy: recompute the Magnus pressure and the two hundred sixteen point six seven nine conversion by hand and confirm it matches the published absolute_humidity within the same twelve-decimal rounding the API uses everywhere.
Technical questions
How is absolute humidity calculated from temperature and relative humidity?
First the Magnus formula gives saturation vapor pressure es = 6.112·exp(17.62·T/(243.12+T)) hPa. Then AH = 216.679·(RH/100)·es/(273.15+T) yields grams of water vapor per cubic meter.
What unit does the result use?
Grams of water vapor per cubic meter of air (g/m³), published as absolute_humidity, ah, and grams_per_cubic_meter with unit set to g/m³.
Which temperature unit does the API expect?
Degrees Celsius. Convert Fahrenheit or kelvin before calling; temperatures at or below absolute zero (-273.15 °C) are rejected as non-physical.