Serum osmolality calculator
This serum osmolality calculator estimates the concentration of dissolved particles in serum from three commonly reported laboratory values: sodium in mEq/L, glucose in mg/dL, and blood urea nitrogen, or BUN, in mg/dL.
Run — free
It applies the conventional calculated-osmolality equation and shows both the final result and the contribution from each input. The result is an estimate rather than a measured osmolality, so it should be interpreted alongside the laboratory method, the clinical setting, and any substances not represented by the equation.
Enter the three values in the required units
Use the sodium, glucose, and BUN values from the same laboratory sample whenever possible. Enter sodium in milliequivalents per liter (mEq/L), while glucose and BUN must both be entered in milligrams per deciliter (mg/dL). Unit consistency matters because the divisors in the equation convert glucose and BUN from conventional mass concentrations into their approximate osmotic contributions. Values reported in millimoles per liter cannot be pasted into the glucose or BUN fields without conversion. The calculator requires all three fields and accepts only finite numeric values. Sodium must be greater than zero, and glucose and BUN cannot be negative. These checks catch missing fields and structurally impossible entries, but they do not determine whether a laboratory result is physiologically plausible or whether a sample has been affected by collection, handling, or reporting issues. Confirm surprising values against the original report before using the result in documentation, teaching, or further calculation.
Understand the equation and the returned result
The calculation is 2 × sodium + glucose ÷ 18 + BUN ÷ 2.8. Doubling sodium approximates the osmotic contribution of sodium and its accompanying anions. Dividing glucose by 18 and BUN by 2.8 converts their conventional mg/dL concentrations into approximate mmol/L contributions. The result is reported in mOsm/kg and rounded to one decimal place for a stable, readable output. The response also separates the sodium, glucose, and BUN contributions, making it easier to audit the arithmetic or explain why one result differs from another. This is a calculated estimate, not a direct laboratory measurement: measured serum osmolality is obtained with an osmometer. Different references may use a slightly different equation, such as a coefficient near 1.86 for sodium or an added constant. When comparing results, identify the exact formula used rather than assuming that every calculated value is interchangeable.
Interpret calculated osmolality with appropriate context
Calculated serum osmolality is often compared with measured serum osmolality to derive an osmolal gap. This capability does not calculate that gap because measured osmolality is not one of its inputs; subtract the calculated value from a measured value only when both refer to compatible samples and units. A difference can reflect unmeasured osmoles, analytic variation, timing differences, or the particular equation selected, so it is not a diagnosis by itself. The formula also does not account explicitly for every solute that may be present. Use the output as a transparent arithmetic aid for education, chart review, data processing, or a clinician-directed workflow, not as a substitute for clinical judgment or laboratory confirmation. If the number will influence care, medication, fluid management, or an urgent toxicology assessment, a qualified healthcare professional should interpret it with symptoms, history, other laboratory findings, and the local laboratory's reference information. Recheck the source values and units whenever the result seems inconsistent with the wider clinical picture.
What you can do with it
Check laboratory arithmetic
Reproduce a calculated serum osmolality from sodium, glucose, and BUN while seeing each component of the equation.
Support an osmolal-gap workflow
Generate the calculated value that can later be compared with a separately measured serum osmolality.
Teach the conventional formula
Demonstrate how sodium dominates the estimate and how glucose and BUN contribute after unit conversion.
FAQ
Which formula does this calculator use?
It uses 2 × sodium + glucose / 18 + BUN / 2.8, with sodium in mEq/L and glucose and BUN in mg/dL.
Is calculated osmolality the same as measured osmolality?
No. Calculated osmolality is an estimate from selected solutes; measured osmolality is determined directly by a laboratory osmometer.
Can I enter glucose or BUN in mmol/L?
No. This equation expects both values in mg/dL. Convert mmol/L results before entering them.
Does this calculate the osmolal gap?
No. An osmolal gap also requires a measured serum osmolality, which is not an input to this capability.
Why might another calculator return a different value?
Some references use alternative equations, coefficients, or constants. Rounding and differences in sample timing can also change comparisons.
What does an API request cost?
Each API request costs $0.002. The calculation is also suitable for local browser execution because it uses pure JavaScript and no network services.
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/health/serum-osmolality \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"sodium":140,"glucose":90,"bun":14}'const res = await fetch("https://api.kit.forhosting.com/health/serum-osmolality", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"sodium": 140,
"glucose": 90,
"bun": 14
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/health/serum-osmolality",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"sodium": 140,
"glucose": 90,
"bun": 14
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/health/serum-osmolality", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"sodium":140,"glucose":90,"bun":14}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"sodium":140,"glucose":90,"bun":14}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/health/serum-osmolality", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"sodium": 140,
"glucose": 90,
"bun": 14
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "health.serum_osmolality",
"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. |