Humidity ratio converter
0.01 kg/kg of moisture is 70 grains per pound: switch a mixing ratio between six units when an HVAC grains table, an SI model and a weather report disagree, with every substitution step written out. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Numeric humidity ratio
- 0.01
- From
- kg/kg
- To
- grains/lb
- Result
- 70
- Converted
- 70
- Value si
- 0.01
- Factor
- 7,000
A humidity ratio converter turns one psychrometric mixing-ratio magnitude into another common HVAC, meteorology, or laboratory unit without spreadsheet constants or hand-written conversion tables. Enter a finite value plus a source unit and a target unit among kilograms of water vapor per kilogram of dry air, grams per kilogram, grains of moisture per pound of dry air, pounds per pound, grams per gram, and milligrams per kilogram; the tool returns the converted humidity ratio, the SI intermediate in kg/kg dry air, the exact unit factor applied, and step-by-step substitution lines you can paste into a psychrometric chart note, load calculation, or lab report. HVAC designers comparing grains per pound tables to SI models, meteorologists reporting g/kg mixing ratios, students converting textbook examples, and firmware authors validating unit strings all need the same deterministic path.
Which humidity ratio units are supported and how conversion works
This capability converts among six everyday humidity-ratio units that dominate psychrometrics, HVAC load calculations, and mixed SI–imperial datasheets. Humidity ratio—also called mixing ratio when defined as mass of water vapor per mass of dry air—is a pure mass ratio, so unit conversion is exact arithmetic on fixed definitions rather than temperature-dependent psychrometric formulas.
The kilogram of vapor per kilogram of dry air, written kg/kg, is the SI hub: every conversion multiplies the input by how many kg/kg equal one source unit, then divides by how many kg/kg equal one target unit. Grams per kilogram scale by exactly one thousandth because one gram is one thousandth of a kilogram.
Grains of moisture per pound of dry air use the exact avoirdupois identity that one pound equals seven thousand grains, so one grain per pound is exactly one over seven thousand on the mass-ratio scale—the same factor whether you think in lb/lb or kg/kg. Pounds per pound and grams per gram equal one on the hub because mass ratios are dimensionless in that sense and cancel unit-for-unit. Milligrams per kilogram scale by one millionth and numerically match parts per million by mass.
Same-unit requests succeed and return the input magnitude with a short message that no change of unit was required.
Practical tips, limits, and when to use this landing
Round-trip checks are straightforward: convert A to B and B back to A and confirm you recover the original within the published twelve-decimal rounding. When teaching psychrometrics, pair classic examples such as zero point zero one kg/kg to ten g/kg, zero point zero one kg/kg to seventy grains per pound, and one grain per pound to one over seven thousand kg/kg. Conversions that touch mg/kg produce large numeric magnitudes by design; stay inside the published result magnitude cap so extreme inputs do not overflow.
Outdoor design humidity ratios are often a few grams per kilogram or tens of grains per pound—well inside limits—while process-air or error-injection scripts may probe the edges deliberately. This landing targets people searching for a humidity ratio converter, kg/kg to grains per pound, g/kg to gr/lb, mixing ratio unit conversion, or psychrometric humidity ratio online; it is not a relative humidity calculator from dry-bulb and wet-bulb, not a dew-point solver, not a specific-humidity-from-moist-air-mass tool, and not a general multi-quantity unit converter.
What you can do with it
HVAC load calculations and charts
Designers convert grains/lb chart readings into SI kg/kg or g/kg with deterministic steps for load sheets and equipment schedules.
Meteorology and climate reports
Analysts map g/kg mixing ratios and kg/kg model fields onto a common mass-ratio unit for intercomparison and documentation.
FAQ
What is humidity ratio?
Humidity ratio (mixing ratio) is the mass of water vapor per mass of dry air. Common units include kg/kg, g/kg, and grains of moisture per pound of dry air.
How are grains per pound converted exactly?
By definition one avoirdupois pound equals 7000 grains, so 1 grain/lb equals exactly 1/7000 on the mass-ratio scale (kg/kg or lb/lb).
Is this the same as relative humidity?
No. Relative humidity is a percentage of saturation vapor pressure. This tool only converts humidity-ratio mass units; it does not solve RH from temperatures.
Is the humidity ratio converter free?
The browser tool is free and runs locally.
Are milligrams per kilogram the same as parts per million?
Yes, on a mass basis they match number for number. A humidity ratio in mg/kg reads directly as parts per million by mass, which is why the figures in that unit look large.
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/conv/humidity-ratio \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":0.01,"from":"kg/kg","to":"grains/lb"}'const res = await fetch("https://api.kit.forhosting.com/conv/humidity-ratio", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": 0.01,
"from": "kg/kg",
"to": "grains/lb"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/conv/humidity-ratio",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": 0.01,
"from": "kg/kg",
"to": "grains/lb"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/conv/humidity-ratio", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":0.01,"from":"kg/kg","to":"grains/lb"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":0.01,"from":"kg/kg","to":"grains/lb"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/conv/humidity-ratio", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": 0.01,
"from": "kg/kg",
"to": "grains/lb"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "conv.humidity_ratio",
"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
Unknown unit names fail with a clear invalid_input error instead of silent wrong factors.
Which humidity ratio units are supported and how conversion works
Common aliases are accepted case-insensitively: kg/kg dry air, kilograms per kilogram dry air, g/kg, grams per kilogram, gr/lb, grains per pound, grains of moisture per pound, lb/lb, g/g, mg/kg, ppm by mass, and related slash or word forms. If the name is not on that list the solver rejects the request with invalid_input naming the bad field and listing supported units, so clients never guess whether a typo produced a wrong number. Negative values are allowed for signed bookkeeping or delta-ratio contexts; absolute input magnitude must stay within the published one-trillion limit so intermediate products remain finite in IEEE double precision on the Worker and in the browser. This tool deliberately stays on the humidity-ratio axis: it does not compute relative humidity from temperatures, dew point from partial pressures, specific humidity from moist-air mass, or absolute humidity in grams per cubic metre.
How to call the API and read the response
Value must be a finite number or a strict numeric string within absolute limits of one trillion. Wire this into dashboards, mobile clients, or batch jobs that already hold a humidity-ratio reading and only need a second unit for display, homework checking, or SI versus imperial comparison without shipping floating conversion tables in every app binary. Prefer bare numbers for value when you control the client; string numbers are accepted only when they match a strict finite numeric pattern without currency symbols or thousand separators. Send a JSON body with three required fields: value (aliases ratio, amount, humidity_ratio, w, and mixing_ratio), from (aliases from_unit, unit_from, and source), and to (aliases to_unit, unit_to, and target). From and to must resolve to supported unit names after alias normalization. On success the response echoes the rounded input value, canonical from and to labels, result and converted set to the same rounded target magnitude, value_si as the SI intermediate in kilograms water per kilogram dry air, unit as the target label, factor as the from-to multiplier, formula as the short equation string, message as an English summary, steps as ordered substitution lines, and supported_units as the six canonical identifiers. Failed validation—missing fields, non-finite numbers, values outside absolute limits, or an unknown unit name—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 when to use this landing
Normalize display labels on your side if you need locale-specific spellings—this API always returns the short canonical tokens kg/kg, g/kg, grains/lb, lb/lb, g/g, and mg/kg so automated tests stay stable. Prefer this capability when both endpoints are among the six supported humidity-ratio units and you need deterministic factors and step strings; if you need relative humidity from vapor pressures, use a dedicated psychrometric capability instead. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when clients deliberately probe unknown unit names before wiring production clients.
Integration use cases
Homework and unit-test fixtures
Students and developers generate known-good SI ↔ metric ↔ grains/lb cases plus deliberate unknown-unit rejections for coding kata expected values.
Technical questions
What happens with an unknown unit name?
The API returns invalid_input listing supported units (kg/kg, g/kg, grains/lb, lb/lb, g/g, mg/kg). Failed tasks are never charged.