FIB-4 liver fibrosis calculator
Combines age, AST, ALT and platelets into the FIB-4 liver fibrosis index: a 52-year-old with AST 40, ALT 35 and platelets of 180 lands between 1.3 and 2.67, the indeterminate band. The formula and units are shown for review. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Age
- 52
- Ast
- 40
- Alt
- 35
- Platelet count
- 180
- Fib4
- 1.953245
- Category
- indeterminate
The FIB-4 liver fibrosis calculator combines four routinely available values—age, aspartate aminotransferase, alanine aminotransferase, and platelet count—to produce a reproducible fibrosis risk index. Enter age in years, AST and ALT in units per litre, and platelets in billions per litre. The result includes the calculated score, the conventional low, indeterminate, or high band, the exact formula, and all units needed for an auditable workflow. The calculation is deterministic and runs without a network, model, random value, or clock. It is useful for education and structured screening workflows, but it does not establish a diagnosis or replace interpretation by a qualified clinician.
What FIB-4 calculates and how to prepare the four inputs
FIB-4 is a non-invasive index originally developed to estimate the likelihood of advanced liver fibrosis from information that is commonly available in a clinical record. This calculator uses the standard equation: age multiplied by AST, divided by platelet count multiplied by the square root of ALT. Supply age in years, AST and ALT in units per litre, and platelet count in 10^9/L, which is also commonly displayed as billions per litre.
Unit discipline matters: entering platelets per microlitre as a full number such as 180000 instead of 180 changes the score by a factor of one thousand. Use laboratory results drawn from the same clinical encounter whenever possible, and verify copied values before relying on the output. Every field is required because the formula cannot be evaluated honestly when one component is absent.
The calculator accepts finite positive numbers and numeric strings, including decimal values. No demographic assumption beyond the supplied numerical age is introduced, and the engine never looks up patient data, reference ranges, diagnoses, or medications.
How to read the score and understand the reported category
The response reports fib4 rounded to six decimal places and a category based on commonly used general cut points. A score below 1.3 is labelled low, a score from 1.3 through 2.67 is labelled indeterminate, and a score above 2.67 is labelled high. These labels describe a screening band, not a confirmed fibrosis stage.
Predictive performance and preferred thresholds vary with age, underlying liver disease, population, clinical setting, and professional guideline. For example, some pathways use an age-adjusted lower threshold for older adults, while other pathways were designed around particular causes of liver disease. A low label cannot rule out disease in every person, and an indeterminate or high label does not prove advanced fibrosis.
Acute illness, transient aminotransferase changes, hematologic conditions, laboratory variation, and other clinical factors can alter the components. Results should therefore be considered alongside history, examination, repeat testing, and any confirmatory method chosen by a qualified healthcare professional.
Using the calculator safely in practice
Use the free browser calculator for a quick educational calculation or to check a spreadsheet formula without sending the values through a custom integration. Store the four source values and their collection context beside the returned score so later reviewers can see which laboratory panel produced it. In user interfaces, label platelet units prominently and avoid presenting the category as a diagnosis.
If your application serves older adults or a population governed by a disease-specific pathway, apply the appropriate validated interpretation rules in your clinical layer and document them; do not assume the general labels returned here supersede local guidance. People making decisions about their own health should discuss unexpected or concerning results with a qualified professional, especially when liver disease is known or suspected.
What you can do with it
Clinical education and formula checks
Students and educators can compare hand calculations with a deterministic result that exposes the equation, units, inputs, and conventional bands.
Structured screening software
Authorized health applications can compute a consistent index from already available age and laboratory fields while keeping interpretation rules explicit.
FAQ
What is the FIB-4 formula?
FIB-4 equals age in years multiplied by AST in U/L, divided by platelet count in 10^9/L multiplied by the square root of ALT in U/L.
How are the categories assigned?
Scores below 1.3 are labelled low, scores from 1.3 through 2.67 are indeterminate, and scores above 2.67 are high. These are general screening bands, not diagnoses.
What platelet unit should I enter?
Enter platelet count in 10^9/L, commonly shown as billions per litre. A displayed value of 180 should be entered as 180, not 180000.
Does a FIB-4 result diagnose liver fibrosis?
No. FIB-4 is a screening index. Thresholds and performance depend on age, population, condition, and guideline, so clinical interpretation and follow-up belong with a qualified professional.
What can make a FIB-4 score misleading?
Acute illness, short-lived changes in liver enzymes, blood disorders and laboratory variation can all shift the four values. Using results drawn at the same visit helps, and a low band cannot rule out liver disease in every person.
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/health/fib4 \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"age":52,"ast":40,"alt":35,"platelet_count":180}'const res = await fetch("https://api.kit.forhosting.com/health/fib4", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"age": 52,
"ast": 40,
"alt": 35,
"platelet_count": 180
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/health/fib4",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"age": 52,
"ast": 40,
"alt": 35,
"platelet_count": 180
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/health/fib4", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"age":52,"ast":40,"alt":35,"platelet_count":180}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"age":52,"ast":40,"alt":35,"platelet_count":180}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/health/fib4", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"age": 52,
"ast": 40,
"alt": 35,
"platelet_count": 180
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "health.fib4",
"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
The browser version is free; API automation costs $0.002 per successful item.
What FIB-4 calculates and how to prepare the four inputs
It rejects missing, blank, non-finite, zero, negative, or implausibly out-of-range entries with an invalid_input error. The alias platelets is accepted for platelet_count so common client payloads remain convenient.
How to read the score and understand the reported category
This capability deliberately returns the conventional general bands and exposes their thresholds in the JSON response instead of silently adapting them. That makes downstream behavior visible and testable. The response also echoes age, AST, ALT, and platelet_count, attaches a units object, provides the formula text, and identifies the method as fib4. Those fields help a reviewer detect a unit mismatch and reconstruct the calculation.
Using the browser calculator and API safely in real workflows
Use the API when a permitted health application, research data pipeline, quality-improvement tool, or teaching platform needs the same deterministic calculation across many workflows. A successful API item costs $0.002; validation failures return invalid_input rather than a fabricated result. The endpoint performs one calculation per request and has no network dependency, secret, model inference, random seed, or time-sensitive behavior. That simplicity makes it easy to pin outputs in automated tests and compare implementations across JavaScript, spreadsheets, or statistical packages. It also means the endpoint cannot retrieve laboratory results, verify patient identity, assess symptoms, account for medications, select follow-up tests, or contact a clinician.
Integration use cases
Research and quality workflows
Analysts can create reproducible FIB-4 fields for permitted datasets and pin known results in automated validation fixtures.
Technical questions
Which fields are required?
Age, AST, ALT, and platelet_count are all required. Missing, blank, non-numeric, zero, negative, or out-of-range values return invalid_input.
What does the calculator cost?
The browser calculator is free. Each successful API item costs $0.002; requests rejected during validation are not charged.