Absolute water vapor density calculator
A vapor pressure of 2339 Pa at 293.15 K, about 20 °C, means roughly 17.3 grams of water vapor in every cubic metre of air. Relative humidity alone cannot tell you that mass. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Vapor pressure
- 2,339
- Creativity
- 293.15
- Temperature c
- 20 kg/m³
- Molar mass
- 0.01801528
- Gas constant
- 8.314462618
- Specific gas constant
- 461.522808305
Meteorologists, HVAC engineers, greenhouse operators, and students of moist air thermodynamics often need the absolute mass of water vapor in a cubic meter of air when only the vapor pressure and the air temperature are known. Relative humidity alone does not give that mass; you still need the partial pressure of vapor and the absolute temperature that appear in the ideal-gas expression for density. This absolute water vapor density calculator accepts water-vapor partial pressure and absolute temperature in kelvin, applies ρ_v equals e times M_w over R times T with standard SI constants for water, and returns density in kilograms per cubic meter and grams per cubic meter.
What absolute water vapor density means and how ρ_v = e·M_w/(R·T) works
Absolute water vapor density—also called absolute humidity when expressed as mass of vapor per unit volume—is the mass of water vapor contained in one cubic meter of moist air. It is not the same as relative humidity, which is a dimensionless ratio of actual vapor pressure to saturation vapor pressure at the same temperature. It is also not the humidity ratio or mixing ratio, which compare mass of vapor to mass of dry air.
Absolute density answers a direct physical question: how many kilograms of H2O molecules occupy each cubic meter under the measured partial pressure of vapor. Here e is the water-vapor partial pressure in pascals, M_w is the molar mass of water vapor (default zero point zero one eight zero one five two eight kilograms per mole), R is the universal gas constant (default eight point three one four four six two six one eight joules per mole per kelvin), and T is absolute temperature in kelvin.
The result is SI mass density in kilograms per cubic meter; the response also multiplies by one thousand to give grams per cubic meter, the unit many humidity tables and instruments use. The formula assumes ideal-gas behavior of the vapor partial pressure only; it does not require dry-air pressure as an input, because absolute vapor density depends on e and T, not on total station pressure. When vapor pressure is zero, density is zero (dry air with no vapor mass).
The two values you enter and what comes back
Vapor pressure must be non-negative: negative partial pressure is not physical and is rejected. Temperature must be strictly positive. Absolute temperature of zero is rejected with a message that the ideal-gas water vapor density formula divides by T and is undefined at absolute zero; negative temperatures fail similarly as non-positive.
Example: vapor pressure two thousand three hundred thirty-nine pascals at two hundred ninety-three point one five kelvin (about twenty degrees Celsius) with defaults yields roughly seventeen point three grams of water vapor per cubic meter, consistent with saturation absolute humidity near room temperature. Values are rounded to twelve decimal places for stable goldens across runtimes. Failed validation is not billed.
Who needs absolute water vapor density
Weather and climate notebooks convert measured or model vapor pressure and air temperature into absolute humidity for moisture budgets, latent-heat estimates, and comparison against humidity-sensor mass density. Greenhouse and museum climate control systems track grams of water vapor per cubic meter to set dehumidification setpoints that stay stable when temperature swings. HVAC commissioning scripts need a deterministic oracle for absolute humidity from psychrometric partial pressure without embedding ad-hoc gas constants in every spreadsheet.
Atmospheric science courses use an absolute water vapor density calculator so learners can check textbook ideal-gas problems and see that relative humidity of one hundred percent at different temperatures implies different vapor mass per cubic meter. Invalid vapor pressure or absolute temperature zero does not consume balance.
What you can do with it
Moisture budgets and climate notebooks
Convert model or station vapor pressure and absolute temperature into kg/m³ or g/m³ absolute humidity for moisture-flux and latent-heat calculations.
Greenhouse and HVAC setpoints
Track grams of water vapor per cubic meter from measured e and T so dehumidification targets stay meaningful when air temperature changes.
FAQ
What happens if absolute temperature is zero?
The ideal-gas density formula divides by T and is undefined at absolute zero; non-positive temperatures are not billed.
Is this the same as relative humidity?
Absolute water vapor density is mass of vapor per cubic meter and depends only on e and T (plus M_w and R), not on saturation vapor pressure.
What units should I use for vapor pressure?
SI defaults expect pascals (Pa). Convert from hPa or mbar by multiplying by 100 (e.g. 23.39 hPa → 2339 Pa). Temperature must be kelvin, not Celsius.
Do I need the total air pressure?
No. Absolute vapor density depends only on the vapor’s own partial pressure and the absolute temperature, so station pressure is not part of the calculation. Enter the vapor pressure in pascals and the temperature in kelvin.
How do I convert my temperature from Celsius to kelvin?
Add 273.15 to the Celsius reading. For example, 20 °C becomes 293.15 K, which with a vapor pressure of 2339 Pa gives about 17.3 grams of water vapor per cubic metre.
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/earth/water-vapor-density \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"vapor_pressure":2339,"temperature":293.15}'const res = await fetch("https://api.kit.forhosting.com/earth/water-vapor-density", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"vapor_pressure": 2339,
"temperature": 293.15
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/earth/water-vapor-density",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"vapor_pressure": 2339,
"temperature": 293.15
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/earth/water-vapor-density", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"vapor_pressure":2339,"temperature":293.15}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"vapor_pressure":2339,"temperature":293.15}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/earth/water-vapor-density", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"vapor_pressure": 2339,
"temperature": 293.15
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "earth.water_vapor_density",
"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
Absolute temperature of zero is rejected with invalid_input because the ideal-gas formula divides by T.
What absolute water vapor density means and how ρ_v = e·M_w/(R·T) works
Treating water vapor as an ideal gas at ordinary atmospheric temperatures and partial pressures, the equation of state for that partial-pressure component is e V equals n R T, or e equals (rho_v over M_w) R T when written in mass density form. Solving for density yields the working formula of this capability: rho_v equals e times M_w divided by R times T. An equivalent form uses the specific gas constant for water vapor R_v equals R over M_w of about four hundred sixty-one point five joules per kilogram per kelvin, so rho_v equals e over R_v T. Both forms are algebraically identical; this endpoint reports both the universal-gas form and R_v for display. When absolute temperature approaches zero kelvin the denominator vanishes, which is why T equals zero is an explicit invalid_input error rather than an infinite or NaN success payload.
Input contract, response shape, and error behaviour
POST a JSON body with two required finite numbers: vapor_pressure (aliases e, vp, vapor_pressure_pa, partial_pressure, water_vapor_pressure), the water-vapor partial pressure in pascals; and temperature (aliases t, temp, temp_k, temperature_k, absolute_temperature), the absolute air temperature in kelvin. Each field may arrive as a JSON number or as a numeric string; missing fields, empty strings, and non-finite values fail with invalid_input naming the field. Optional molar_mass (aliases mw, m_w, molar_mass_water, water_molar_mass) overrides the default water molar mass zero point zero one eight zero one five two eight kilograms per mole and must be positive when provided. Optional gas_constant (aliases r, R, universal_gas_constant) overrides the default SI R and must be positive when provided. On success the body echoes vapor_pressure, temperature, temperature_c as T minus two hundred seventy-three point one five, molar_mass and whether it was defaulted, gas_constant and whether it was defaulted, specific_gas_constant R_v, density in kilograms per cubic meter, density_g_m3 in grams per cubic meter, unit labels, formula and equation strings, method ideal_gas_water_vapor_density, and a short steps array. Pair the response with your own saturation vapor-pressure model if you need relative humidity; this endpoint does not compute e_s or RH from dry-bulb temperature alone.
Where an absolute water vapor density API earns its keep
Keep requests small, pin the rounded density and density_g_m3 in tests, and you get reproducible absolute humidity densities for homework, dashboards, and production moisture calculations without standing up a full psychrometric library of your own.
Integration use cases
Classroom ideal-gas humidity checks
Let students verify ρ_v = e·M_w/(R·T) for textbook partial pressures and kelvin temperatures with a deterministic free widget and matching API.
Technical questions
How do I calculate absolute water vapor density from vapor pressure and temperature?
Send vapor_pressure e in pascals and absolute temperature T in kelvin. The API returns ρ_v = e·M_w/(R·T) in kg/m³ and g/m³ using default water molar mass and SI gas constant unless you override them.
What does the absolute water vapor density calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.