Warfarin dosing calculator
A 65-year-old weighing 80 kg with VKORC1 GG and CYP2C9 *1/*1 gets an estimated starting dose of 41.07 mg per week, about 5.87 mg a day. It is a teaching estimate to discuss with a clinician, not a prescription. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Age
- 65
- Weight
- 80
- Vkorc1
- GG
- Cyp2c9
- *1/*1
- Weekly dose mg
- 41.07
- Daily dose mg
- 5.87
- Age decades
- 6.5
- Vkorc1 coeff
- 0
Warfarin is a vitamin K antagonist whose stable weekly milligram amount varies several-fold between patients, because age, body size, and two well-studied genes — VKORC1 and CYP2C9 — change both the drug target and the clearance of S-warfarin. This warfarin dosing calculator takes age in years, body weight in kilograms, a VKORC1 -1639G>A genotype, and a CYP2C9 star-allele pair, then returns an educational initial weekly dose in milligrams using a fixed International Warfarin Pharmacogenetics Consortium identity.
How the weekly milligram dose is computed from age, weight, and genotype
The identity behind this warfarin dosing calculator is the International Warfarin Pharmacogenetics Consortium pharmacogenetic square-root model, evaluated on four inputs only: age in whole years, body weight in kilograms, a VKORC1 minus 1639 G to A genotype, and a CYP2C9 star-allele pair. The published regression predicts the square root of the weekly milligram amount, then squares that predictor so the returned figure is milligrams per week rather than milligrams per day.
Age enters as decades, which is age divided by ten, with a coefficient of minus 0.2614, so each extra decade of life lowers the square-root predictor and therefore the weekly dose. Weight enters in kilograms with a coefficient of plus 0.0128, so a heavier patient receives a larger weekly milligram amount when genotype is held fixed.
VKORC1 GG is the reference with coefficient zero; AG subtracts 0.8677 from the predictor and AA subtracts 1.6974, matching the well-known finding that the A allele reduces hepatic vitamin K epoxide reductase and therefore the milligrams needed to reach a typical international normalized ratio. CYP2C9 star one over star one is the reference; star two and star three alleles subtract 0.5211, 0.9357, 1.0616, 1.9206, or 2.3312 according to the six closed pairs the consortium modelled.
Height, ancestry, enzyme inducers, and amiodarone are not collected: a reference stature of one hundred seventy centimetres is folded into the intercept, and the other optional dummies stay at the European-ancestry, no-inducer, no-amiodarone origin of the original fit. A sixty-five-year-old of eighty kilograms with VKORC1 GG and CYP2C9 star one over star one therefore lands near fifty milligrams per week after squaring, while the same age and weight with AA and star three over star three lands far lower.
Rounding is stable to two decimal places on the weekly milligram figure so goldens compare byte for byte across JavaScript runtimes. Optional output keys are omitted rather than set to null.
Where a warfarin dosing calculator earns its keep
Anticoagulation clinics and pharmacogenetics consult services use a warfarin dosing calculator so an age already on the chart, a weight from the last exam, and two discrete genotypes from a laboratory report become one weekly milligram number a pharmacist can write next to a tablet strength before the first INR check.
Pharmacy and medical teaching labs assign the same identity so students see why two sixty-five-year-old patients at the same weight must not share a five-milligram-a-day rule of thumb when one is VKORC1 GG with CYP2C9 star one over star one and the other is AA with star three over star three. Failed validation does not consume balance.
The calculator does not replace a licensed clinician, does not choose a target INR, does not load a first-day or two-day bolus, does not adjust for amiodarone, rifampin, dietary vitamin K, or liver disease, and does not convert a weekly milligram total into a Monday-through-Sunday tablet calendar. Send the genotypes your laboratory already reports in minus 1639 G to A and CYP2C9 star notation and treat the weekly result as a starting worksheet figure to check against the label and the monitoring plan in your jurisdiction.
What you can do with it
Clinic initiation worksheets
Turn chart age, last body weight, and two laboratory genotypes into one weekly milligram figure a pharmacist can write beside a tablet strength before the first INR.
Form prefill and spreadsheet checks
Pin the same IWPC identity in continuous integration so an intake form never silently treats an unknown genotype as a population-average dose.
FAQ
How is the weekly warfarin dose calculated?
Evaluate the IWPC square-root identity: 5.6044 plus 0.0087 times 170 cm, minus 0.2614 times age in decades, plus 0.0128 times weight in kilograms, minus the VKORC1 and CYP2C9 coefficients, then square the result.
Which VKORC1 and CYP2C9 genotypes are accepted?
VKORC1 must be GG, AG, or AA (slash forms such as G/G are normalized). CYP2C9 must be one of *1/*1, *1/*2, *1/*3, *2/*2, *2/*3, or *3/*3. Allele order is sorted.
What happens if a genotype is unknown?
A missing or unrecognized VKORC1 or CYP2C9 result is rejected and is not billed.
Is this calculator a prescription or a substitute for a clinician?
No. It returns an educational initial weekly estimate. It does not read INR, choose a target range, load a bolus, or adjust for amiodarone, diet, or interacting drugs. Confirm the figure against a licensed clinician and the product label in your jurisdiction.
Why doesn't the calculator ask for height or other medicines?
It uses only age, weight and the two genotypes. A reference height of 170 cm is built into the starting value, and ancestry, enzyme inducers and amiodarone stay at the original model's baseline.
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/warfarin-dosing \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"age":65,"weight":80,"vkorc1":"GG","cyp2c9":"*1/*1"}'const res = await fetch("https://api.kit.forhosting.com/health/warfarin-dosing", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"age": 65,
"weight": 80,
"vkorc1": "GG",
"cyp2c9": "*1/*1"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/health/warfarin-dosing",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"age": 65,
"weight": 80,
"vkorc1": "GG",
"cyp2c9": "*1/*1"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/health/warfarin-dosing", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"age":65,"weight":80,"vkorc1":"GG","cyp2c9":"*1/*1"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"age":65,"weight":80,"vkorc1":"GG","cyp2c9":"*1/*1"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/health/warfarin-dosing", 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": 65,
"weight": 80,
"vkorc1": "GG",
"cyp2c9": "*1/*1"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "health.warfarin_dosing",
"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
Unknown or unrecognized genotypes fail with invalid_input instead of substituting a population average. The same pure arithmetic runs free in the browser and over the API at $0.002 per successful call. This is an educational starting estimate, not a prescription.
How the weekly milligram dose is computed from age, weight, and genotype
The value unknown is not a genotype in this contract; it fails with invalid_input rather than applying the consortium's unknown dummy, because inventing a population-average dose from a missing lab report is worse than an honest error.
Input contract, genotype enums, response shape, and errors
Weight that is zero, negative, missing, NaN, or Infinity, an age outside one to one hundred twenty, a non-whole age, or a value outside the genotype enums fails the same way. Failed validation is not billed. POST a JSON body with four required fields. age is the patient age in whole years from one through one hundred twenty; aliases include age_years, years, and patient_age. weight is the patient body mass in kilograms and must be a strictly positive finite number at most four hundred; aliases include weight_kg, body_weight, kg, mass, and patient_weight. vkorc1 is the VKORC1 minus 1639 G to A genotype and must be one of the closed set GG, AG, or AA; slash forms such as G/G, A/G, and G/A are accepted and normalized; aliases for the field name include vkorc1_genotype, vk, and rs9923231. cyp2c9 is the CYP2C9 star-allele pair and must be one of star one over star one, star one over star two, star one over star three, star two over star two, star two over star three, or star three over star three; allele order is sorted so star two over star one becomes star one over star two; aliases include cyp2c9_genotype, cyp, and cyp2c9_star. Each numeric field may arrive as a JSON number or as a numeric string. On success the body includes the cleaned age, weight, vkorc1, and cyp2c9 values, weekly_dose_mg as the primary milligrams-per-week figure, daily_dose_mg as that weekly amount divided by seven, age_decades, the two genotype coefficients that were applied, the reference_height_cm constant of one hundred seventy, the formula string, the method name iwpc_pgx_age_weight_vkorc1_cyp2c9, and a note that this is an educational initial weekly estimate rather than a prescription. The strings unknown, unk, missing, and a question mark are not genotypes: they fail with invalid_input naming the field and stating that the genotype is unknown, because a hollow milligram figure from an unreported lab is worse than an honest error. Compare weekly_dose_mg with tablet strengths on the product you actually have; this engine does not convert milligrams into a day-of-week tablet calendar, does not read INR, and does not adjust for interacting drugs.
Where a warfarin dosing calculator earns its keep
Keep requests small, pin weekly_dose_mg in continuous integration, and you get reproducible educational numbers for LMS plugins, edge workers, and form prefill without standing up a clinical decision-support system.
Integration use cases
Pharmacogenetics teaching labs
Give students the same age and weight with GG plus star one versus AA plus star three so they can see why weekly milligrams change, then verify weekly_dose_mg by hand.
Technical questions
What does the warfarin dosing calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.