Every number on this page is a model illustration — not a dose, and not medical advice.
You go to bed at a good number after pizza and wake up at 300. That's not random diabetes — that's fat and protein, raising glucose slowly, hours after the carbs are done. The Warsaw Method models a meal with two waves of insulin: one now for the carbs, one stretched out for the fat and protein. Drag the sliders and watch the tug-of-war between food pushing glucose up and insulin pulling it down.
Every number on this page is a model illustration — not a dose, and not medical advice.
Carbs hit fast — glucose starts climbing in about 15–20 minutes. But fat and protein turn into glucose too, through a slow digestion detour. A cheesy, greasy meal can keep pushing glucose up for 3 to 8 hours.
Doctors in Warsaw, Poland built a way to count that slow push: the fat-protein unit, or FPU. You add up the calories from fat (9 per gram) and protein (4 per gram), and every 100 calories = 1 FPU.
Each FPU behaves like about 10 grams of carbs — except those "carbs" trickle in over hours instead of minutes. Under 1 FPU? The method ignores it; that little fat and protein barely moves the needle.
More FPUs = a longer trickle. The lookup table stretches the second insulin wave from 3 hours (1 FPU) up to 8 hours (6+ FPUs), so insulin arrives on the same slow schedule as the food.
Wave 1 goes in now: carbs ÷ the carb ratio, plus a correction if glucose is high. Wave 2 is the Warsaw wave: the FPU carbs delivered as a slow drip — a pump's extended bolus, or split injections.
Why start at 50%? Because nobody knows their real number in advance — some bodies turn most of those FPU carbs into glucose, some much less. On this page that mystery is the "body's response" slider. When coverage and response match, the line stays flat; when they don't, you get the late climb (or the late dip). Timing matters too: insulin needs a head start because food is faster out of the gate — slide the pre-bolus to 0 and watch the spike.
These Diabetes Pro Tip episodes cover the ideas on this page — fat and protein, bolus shape, and the long tail of a high-fat meal.
Why blood sugar spikes 4–8 hours after a high-fat meal, bolusing for protein, and the Warsaw Method concept.
Splitting boluses, extended strategies, and staying fluid when a meal doesn't behave the way the math said it would.
Another way pump users cover the long tail of fat — temp basal increases for pizza, Chinese food, and hormones.
The next level past carb counting — how the same grams can hit at very different speeds.
This is a complete description of the model behind this simulator. It is a deterministic teaching simulation: every curve is computed from the slider values by the equations below, in your browser, with no accounts and nothing sent anywhere; the only things it keeps are your light-or-dark theme choice (saved in your own browser) and the slider state in the page’s own URL. It is not a bolus calculator, not a medical device, and not clinically validated — it exists to make the logic of the Warsaw Method visible.
The method implemented here is the fat–protein unit (FPU) dual-wave algorithm developed by Prof. Ewa Pańkowska and colleagues in Warsaw, Poland. The dose math is:
Wave 1 (now) = Carbs ÷ ICR + max(0, (BG − Target) ÷ ISF) FPU = (Fat × 9 kcal/g + Protein × 4 kcal/g) ÷ 100 if FPU < 1.0 → no second wave Carb equivalent = FPU × 10 g Wave 2 (extended) = (Carb equivalent × Adjustment% ) ÷ ICRThe correction is clamped at zero (a below-target glucose never reduces the carb dose here), and this tool takes no insulin-on-board input — it models a single meal starting from zero active insulin. The second wave's length comes from the standard FPU lookup table, or from the manual override slider (the override changes only how the insulin is delivered; the food still arrives on the table's schedule):
| FPU | 1.0–1.9 | 2.0–2.9 | 3.0–3.9 | 4.0–4.9 | 5.0–5.9 | 6.0+ |
|---|---|---|---|---|---|---|
| Wave 2 length | 3 h | 4 h | 5 h | 6 h | 7 h | 8 h |
The suggested pre-bolus is a smoothed ramp on current glucose: 0 min below 80 mg/dL, 8 + ((BG − 80) ÷ 120) × 12 min from 80–200, capped at 20 min above 200. (Glucose trend arrows are not modeled.)
Insulin action uses the two-parameter exponential activity model popularized by the open-source automated-insulin-delivery community (oref0/OpenAPS and Loop), with duration td set by the "insulin duration" slider (3–6 h) and peak time tp = min(75 min, 0.4 × td):
τ = tp · (1 − tp/td) ÷ (1 − 2·tp/td) a = 2τ/td S = 1 ÷ (1 − a + (1 + a)·e^(−td/τ)) activity(t) = (S/τ²) · t · (1 − t/td) · e^(−t/τ) for 0 ≤ t ≤ tdactivity(t) integrates to 1 over the duration, so each unit is fully "spent." The glucose-lowering rate of a dose is units × activity(t) × ISF in mg/dL per minute. Wave 1 is a single dose at t = 0. Wave 2 has two delivery modes: pump drip models a steady infusion (dose ÷ length, in 2-minute steps) with each micro-dose following the same activity curve — numerically, a convolution — mirroring a pump's extended/square-wave bolus. Pen shots models the same total as discrete injections using one common approximation: waves of 4 hours or less become a single injection of the full wave-2 amount 90 minutes after eating; longer waves split in half, at 60 minutes and at the wave's halfway point. This split rule is a teaching heuristic, not a published protocol — real pen strategies vary and pens dose in whole or half units.
Carbs begin absorbing at the first bite (t = pre-bolus) with a gamma-shaped curve, c(t) ∝ t · e^(−t/τ), normalized to deliver 100% of the grams. The glycemic-index control sets τ: fast = 28 min, medium = 40 min, slow = 58 min — so "fast" peaks sooner and higher and clears earlier, while "slow" spreads the same grams into a longer, flatter rise. The three settings are illustrative bands, not a lookup of any published GI table, and they change the shape only — never the total grams absorbed.
Fat and protein deliver their carb equivalent (FPU × 10 g) as a raised-cosine hump starting 60 minutes after the first bite and spread over the FPU table's duration, scaled by the "body's response" slider (0–100%, default 50%). That slider is the model's stand-in for individual variation in gluconeogenesis and delayed gastric emptying — it is a hypothesis knob, not a measured quantity. Each absorbed gram (fast or slow) raises glucose by ISF ÷ ICR mg/dL, the standard carb-sensitivity identity.
Forward-Euler integration on a 2-minute grid over a 10-hour window, seeded from the "example glucose" slider. No basal insulin, liver glucose output, dawn effect, exercise, stress, or counter-regulation is modeled — the trace shows only this meal against these doses, which is exactly what makes the two-wave logic legible.
The variability cone is the shaded band around the line. It widens with how much food has landed and how far into the meal you are — ± min(40, 0.15 × grams-of-glucose-delivered-so-far × √(elapsed fraction)) mg/dL. It is a deliberately simple way to draw "a prediction this far out is a guess," not a confidence interval, a standard deviation, or anything derived from real CGM data. Read it as "roughly this wide," never as a number.
The four live stats above the chart read straight off the simulated curve over the full ten hours: peak is its highest point, lowest after eating is its minimum from the first bite onward, and in range is the share of the ten-hour window spent between 70 and 180 mg/dL. They describe the model's curve, not a person's day.
The dashed "carbs-only ghost" is the identical simulation with wave 2 removed: same food, same wave 1 (carbs + correction), zero extended insulin. It answers "what would a standard single bolus have done to this exact meal?" and appears only when the meal earns a second wave.
Real absorption varies meal to meal and person to person (gastric emptying, activity, alcohol, illness, hormones, stress); insulin sensitivity drifts across the day; fat can also cause temporary insulin resistance beyond what a carb-equivalent captures; and combination meals interact in ways no fixed curve reproduces. Basal insulin, insulin on board from earlier doses, exercise, illness and hormones are all absent from this model. Treat every number on this page as an illustration of relationships — what gets bigger, what gets longer, what moves earlier — never as a dose.
FPU concept, 100-kcal unit, ×10 g carb equivalence, duration table, and the 50% starting factor: the pump-therapy research of Pańkowska et al. (Warsaw, Poland). Exponential insulin activity model: the open-source AID community (oref0/OpenAPS, Loop). Implementation, plain-language framing, and food-curve shapes: the Juicebox Podcast — simplifications are ours, not theirs. Hear the thinking behind this tool in Diabetes Pro Tip 1012: Fat and Protein and 1008: The Perfect Bolus.