ForHosting KIT · Health & fitness

Warsaw method calculator

A meal with 60 g of carbohydrate, 20 g of fat and 30 g of protein, at 10 g per unit, gives 6 units now and 3 units spread over 5 hours, 9 in all. A teaching worksheet, not a prescription. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Carbohydrate g
60
Fat g
20
Protein g
30
Icr
10
You get
Fat kcal
180 U
Protein kcal
120
Fat protein kcal
300
Carbohydrate units
6

The Warsaw method, also called the Pańkowska or Warsaw School insulin-pump protocol, estimates a mealtime insulin dose from carbohydrate grams together with the delayed glucose effect of fat and protein. One carbohydrate unit is ten grams of carbohydrate. One fat-protein unit (FPU) is one hundred kilocalories from fat plus protein, using nine kilocalories per gram of fat and four per gram of protein. Immediate insulin covers carbohydrate with your insulin-to-carb ratio. Extended insulin covers each FPU as if it equalled ten grams of carbohydrate, typically as a square or dual-wave bolus. This calculator is a deterministic educational worksheet: it does not diagnose, prescribe, or replace a clinician. Negative nutrient amounts are rejected.

Carbohydrate units, fat-protein units, and the dual-wave idea

The Warsaw method was developed at the Medical University of Warsaw as a way to cover mixed meals, not only the carbohydrate line on a nutrition label. Carbohydrate counting remains the first half of the dose: ten grams of digestible carbohydrate equal one carbohydrate unit, and the immediate or normal bolus is carbohydrate grams divided by the insulin-to-carb ratio, which is the number of grams of carbohydrate covered by one unit of insulin. The second half acknowledges that fat and protein raise glucose later and for longer.

Nine kilocalories per gram of fat and four kilocalories per gram of protein are added, then divided by one hundred to obtain fat-protein units. Each fat-protein unit is treated as having the glucose-raising effect of ten grams of carbohydrate, so the extended insulin equals fat-protein units times ten divided by the same insulin-to-carb ratio. Pump users typically deliver the carbohydrate portion as a normal bolus and the fat-protein portion as a square or extended wave; people using injections discuss split or delayed doses with their care team.

Use it to check a worksheet, to teach dual-wave logic, or to automate a documented protocol you already follow with a clinician.

Pump dual-wave worksheet for a mixed meal

Enter meal carbohydrate, fat, and protein grams plus your insulin-to-carb ratio to split immediate carbohydrate insulin from the extended fat-protein bolus and its duration band.

Education and onboarding for fat-protein units

Clinics and courses demonstrate why pizza or a high-protein plate needs more than carb counting, with reproducible FPU, carb-equivalent grams, and suggested square-wave hours.

How does the Warsaw method calculate mealtime insulin?

Extended units equal FPU × 10 / icr. Total units are the sum. Negative nutrient grams are rejected.

What is a fat-protein unit (FPU)?

One FPU is 100 kcal from fat and protein. Fat contributes 9 kcal per gram and protein 4 kcal per gram. Each FPU is treated as having the glucose-raising effect of 10 g of carbohydrate.

How long should the extended bolus run?

The Warsaw School table used here is: 0 FPU → 0 h; up to 1 FPU → 3 h; up to 2 FPU → 4 h; up to 3 FPU → 5 h; more than 3 FPU → 8 h. Your pump or clinician may adjust the band.

What is the insulin-to-carb ratio?

It is how many grams of carbohydrate one unit of insulin covers, as agreed with your care team. With a ratio of 10, a meal with 60 g of carbohydrate needs 6 units for the immediate part.

Does the calculator include correction doses or active insulin?

No. It only splits the meal dose into an immediate and an extended part. It does not know your correction factor, active insulin or glucose target, so those decisions stay with you and your clinician.

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.

POSThttps://api.kit.forhosting.com/health/warsaw-method

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.

curl -X POST https://api.kit.forhosting.com/health/warsaw-method \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"carbohydrate_g":60,"fat_g":20,"protein_g":30,"icr":10}'
{
  "carbohydrate_g": 60,
  "fat_g": 20,
  "protein_g": 30,
  "icr": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "health.warsaw_method",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Carbohydrate units, fat-protein units, and the dual-wave idea

This endpoint performs that arithmetic only. It does not know your correction factor, active insulin, or glucose target, and it is not a prescription. Identical inputs always yield identical JSON because the algorithm never touches the network, a language model, a wall clock, or a random generator.

Inputs, validation, duration table, and response fields

Example: sixty grams carbohydrate, twenty grams fat, thirty grams protein, and an insulin-to-carb ratio of ten yields six carbohydrate units, three fat-protein units, six immediate units, three extended units, nine total units, and a five-hour square wave. POST a JSON object with four required finite numbers. carbohydrate_g, fat_g, and protein_g are nutrient masses in grams and must be non-negative; a negative gram amount fails with invalid_input and is not billed, because mass cannot be negative. Aliases include carbs, carb_g, carbs_g, and carbohydrate for carbohydrate_g; fat and lipid_g for fat_g; protein and protein_grams for protein_g. icr is the insulin-to-carb ratio in grams of carbohydrate per unit of insulin and must be a finite number greater than zero; aliases insulin_to_carb_ratio, carb_ratio, icr_g, and grams_per_unit are accepted. Values may arrive as JSON numbers or numeric strings; booleans, objects, empty strings, NaN, and Infinity are rejected with the field named in the message. On success the response echoes the cleaned inputs and returns fat_kcal, protein_kcal, fat_protein_kcal, carbohydrate_units, fat_protein_units, carb_equivalent_g (fat-protein kilocalories divided by ten), immediate_units, extended_units, total_units, and extended_hours. The duration table follows the Warsaw School: zero fat-protein units means zero extended hours; up to one fat-protein unit is three hours; up to two is four hours; up to three is five hours; more than three is eight hours. method is always warsaw_pankowska and unit is U for insulin figures.

Where this calculator is used, pricing, and what it does not do

Diabetes education sites, pump onboarding worksheets, and nutrition apps that already store meal macros can call one shared definition instead of re-coding fat-protein unit math in every client. Classroom demos of dual-wave boluses can show immediate versus extended units side by side with the duration band. People with type 1 diabetes, type 2 diabetes on insulin, or other conditions that use mealtime insulin should follow their prescribing clinician and a registered dietitian or diabetes educator. Keep requests small, document your insulin-to-carb ratio source, and treat the numbers as a transparent worksheet of the Warsaw protocol rather than an automated prescription. Research coordinators who log mixed-meal challenges can pin expected JSON because the algorithm is pure arithmetic with no clock, no random seed, and no network. Successful API items bill at $0.002 against KIT balance; invalid_input is not charged. This is not a medical device: it does not adjust for glycemic index, fibre subtraction, alcohol, residual bolus insulin, illness, exercise, or menstrual variation, and it does not choose a basal rate. Extremely large gram values above the isolate safety ceiling are rejected so a Worker stays bounded. Pair the free on-device check with API automation when you need the same units in a backend log, LMS plugin, or coaching dashboard.

App and research automation of the Warsaw protocol

Wellness or study software that already stores macros calls a stable prepaid endpoint instead of reimplementing Pańkowska arithmetic in every client language.

Why was my request rejected?

carbohydrate_g, fat_g, and protein_g must be finite non-negative numbers. icr must be a finite number greater than zero. Missing, non-numeric, infinite, or negative nutrient values return invalid_input and are not billed.

What does the Warsaw method calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed. This worksheet is educational and is not a medical prescription.

Read the full KIT documentation →