Personalizing an intermittent-fasting eating window from circadian rhythm, glucose/ketone metabolism, and chronotype data
Before recommending any fasting protocol, the optimizer establishes the user's own circadian phase. The central clock in the suprachiasmatic nucleus (SCN) synchronizes peripheral clocks in the liver, pancreas, and adipose tissue, driving daily rhythms in cortisol, melatonin, and insulin sensitivity. A protocol chosen without this context risks fighting the body's own timing rather than working with it.
The molecular clock (CLOCK, BMAL1, PER, CRY genes) runs in nearly every tissue, not just the brain. In the pancreas and liver, this local clock modulates insulin secretion and glucose handling across the day — insulin sensitivity and beta-cell responsiveness are measurably higher in the morning than the evening in most people, independent of what or how much was eaten.
Cortisol follows a robust diurnal rhythm: it rises sharply around waking (the cortisol awakening response, peaking ~30–45 minutes after waking, roughly 8 AM for a typical sleeper) and declines through the day, reaching its nadir around midnight. Melatonin runs in near-antiphase, rising after dusk and peaking in the early hours (~2–3 AM), then suppressing sharply with morning light exposure.
Because melatonin partially suppresses insulin secretion, eating late at night — when melatonin is elevated — tends to produce a larger glucose excursion than the identical meal eaten earlier in the day.
• Wearable proxies: skin temperature, heart-rate variability, and actigraphy-derived sleep/wake timing approximate circadian phase without needing blood cortisol or salivary melatonin assays • Food-log timestamps: first bite, last bite, and meal frequency over 7 days establish the user's current habitual eating window, which is frequently 12–15 hours in modern populations • Chronotype questionnaire: short instruments such as the Morningness-Eveningness Questionnaire (MEQ) or Munich ChronoType Questionnaire (MCTQ) classify the user along an early-to-late chronotype spectrum, used later to personalize the recommended window
This baseline is descriptive, not prescriptive — it simply defines the starting point the optimization in later stages will shift away from.
Fasting is not a single metabolic state — it is a sequence of transitions. The body moves from burning readily available glucose, to mobilizing stored glycogen, to increasingly relying on fat oxidation and liver-derived ketone bodies as the fast extends. The timing of these transitions varies substantially between individuals.
For the first several hours after a meal, blood glucose is used directly and insulin remains elevated, suppressing fat mobilization. As glucose falls, the liver begins glycogenolysis, breaking down its ~80–100g glycogen store to maintain blood glucose. This buffer is typically exhausted somewhere between 12 and 18 hours into a fast, though the exact timing depends heavily on prior carbohydrate intake, glycogen stores, muscle mass, and recent exercise.
Once glycogen is limited, falling insulin permits lipolysis: adipose tissue releases free fatty acids, which travel to the liver for beta-oxidation. Acetyl-CoA produced in excess of what the liver's own citric acid cycle can absorb is converted into ketone bodies — acetoacetate, β-hydroxybutyrate, and acetone — which are exported to fuel the brain, heart, and skeletal muscle.
The metabolic switch — the point at which fat/ketone oxidation overtakes glucose oxidation as the dominant fuel source — typically begins somewhere in the 12–16 hour range, but can occur considerably earlier or later depending on the individual.
Autophagy is the cell's process for degrading and recycling damaged organelles and misfolded proteins, regulated by the nutrient-sensing mTOR and AMPK pathways. Nutrient deprivation robustly activates autophagy in yeast, worms, and rodents — work recognized by the 2016 Nobel Prize in Physiology or Medicine (Yoshinori Ohsumi).
In humans, direct measurement of autophagic flux is difficult and invasive, so most human "autophagy" claims around fasting rest on indirect markers (e.g., circulating LC3, small biopsy studies) rather than the direct flux assays used in animal work. The evidence that a specific fasting duration reliably triggers meaningful autophagy in human tissue is real but considerably thinner than popular claims suggest.
Rising ketone levels themselves may carry signaling effects independent of their role as fuel — β-hydroxybutyrate acts as an endogenous histone deacetylase (HDAC) inhibitor and has documented anti-inflammatory signaling roles. This means fasting benefits may not scale linearly with fast length once meaningful ketosis is reached.
Using the fasting-window slider, the optimizer simulates a representative glucose and ketone trajectory for the selected protocol, tracing the crossover point at which fat/ketone oxidation becomes the dominant fuel source and comparing it against the evidence base for popular named protocols.
In a healthy faster, blood glucose does not collapse during an overnight-to-24h fast — counter-regulatory hormones (glucagon, epinephrine, cortisol, growth hormone) drive hepatic gluconeogenesis and glycogenolysis to hold glucose within a fairly narrow band, with only a mild downward drift over the fasting window. Ketone bodies behave very differently: they stay low and flat during the fed and early-fasted state, then rise in a roughly sigmoidal curve once glycogen reserves run low and lipolysis accelerates.
The simulated curve in this tool marks that crossover as the "metabolic switch point" — not a fixed clock time, but a physiological transition whose timing shifts with the fasting-window slider and would, in reality, also shift with the individual's diet history and activity level.
• 16:8 (Leangains-style): 16h fast / 8h eating window. The most widely studied time-restricted eating protocol, with the largest base of human randomized trials on weight and metabolic markers. • 18:6: a stricter 18h fast / 6h window. Popular but with comparatively less protocol-specific human RCT data than 16:8. • 5:2: two non-consecutive days per week of ~500–600 kcal, normal eating the other five days. Multiple RCTs have compared it directly against continuous daily calorie restriction. • OMAD / eat-stop-eat: one meal a day, or full 24h fasts once or twice weekly. Evidence comes mostly from smaller, shorter trials with higher dropout than 16:8 studies.
| Product | Indication | Trial Design | Key Result |
|---|---|---|---|
| 16:8 (Leangains) | 16h fast / 8h eat | Metabolic switch ~14–16h into fast; single skipped meal, usually breakfast | Largest human RCT evidence base |
| 18:6 | 18h fast / 6h eat | Switch ~13–15h; narrower eating window, two meals typical | Deeper ketosis exposure; less protocol-specific data |
| 5:2 (two fasting days) | ~500–600 kcal on 2 non-consecutive days | Switch point varies within low-calorie days, roughly 12–16h post last full meal | Several RCTs vs. continuous restriction, similar outcomes |
| OMAD / Eat-Stop-Eat | One meal/day or 24h fast 1–2×/week | Switch ~16–20h; longest daily/periodic fast duration | Deepest metabolic shift; lowest adherence in trials |
Rather than optimizing only for fast length, the algorithm also asks when the eating window should sit within the 24-hour day. A growing line of research on early time-restricted eating (eTRE) suggests that aligning meals with the morning-to-midday period of peak insulin sensitivity can improve metabolic markers even when total calories and fast duration are held constant.
Courtney Peterson's lab (Sutton et al., Cell Metabolism, 2018) ran a landmark crossover trial comparing early time-restricted eating — a 6-hour window ending by mid-afternoon (last meal before 3 PM) — against a control 12-hour eating window, with calories and body weight matched between conditions.
Despite no difference in weight, the early window produced significantly improved insulin sensitivity, lower blood pressure, and reduced oxidative stress markers relative to the later, wider window — over just 4–5 weeks. This is one of the clearer human demonstrations that when you eat can matter separately from how much or how long you fast.
Peripheral circadian clocks in the pancreas and skeletal muscle drive time-of-day differences in insulin secretion and glucose disposal — beta-cell responsiveness and peripheral insulin sensitivity both tend to be higher earlier in the day. Diet-induced thermogenesis (the energy cost of digesting a meal) is also somewhat higher in the morning than the evening in several controlled feeding studies.
Conversely, multiple crossover studies show that an identical meal eaten in the evening produces a larger and more prolonged glucose excursion than the same meal eaten in the morning — independent of total daily calories. This is the physiological basis for shifting a fasting window's eating period earlier rather than simply lengthening the fast.
In the Sutton et al. eTRE trial, shifting the same clock hours earlier improved metabolic markers with no measurable weight-loss difference from the control condition — evidence that circadian timing of the eating window carries a signal independent of caloric restriction or fast length alone.
The final stage produces one recommended window by weighing the metabolic upside of a longer, earlier-shifted fast against the practical reality that a protocol only works if it is actually followed. The theoretically "best" window is worthless if it is abandoned after two weeks.
A caution belongs at the center of any fasting recommendation: several well-controlled randomized trials — including a 12-week trial by Lowe et al. (JAMA Internal Medicine, 2020) and the TREAT trial (Liu et al., NEJM, 2022) — found no statistically significant difference in weight loss between time-restricted eating and simple continuous caloric restriction when total calories were matched between groups. Popular claims that IF is inherently metabolically superior to matched-calorie dieting are not well supported by the strongest available trial evidence.
What does appear to persist across several studies, independent of weight change, is the circadian-alignment signal described in Stage 4 — earlier eating windows showing favorable insulin-sensitivity and blood-pressure effects even without extra weight loss. The personalized recommendation therefore leans on window timing and sustainability more than on chasing maximal fast length.
The optimizer folds in the user's own history: self-reported hunger (visual analog scale) across prior fasting attempts, frequency of skipped or broken fasts, and sleep-quality trends during longer fasting windows. A user whose hunger ratings spike and adherence collapses on 18h+ fasts will be steered toward a well-tolerated 14–16h early-shifted window rather than a theoretical 20h maximum, because a modestly shorter window sustained for months outperforms an aggressive window abandoned after two weeks.
Hunger tolerance is not static — VAS hunger scores in most trials peak in the first 1–2 weeks of a new fasting schedule and decline as ghrelin rhythms re-entrain, so the algorithm also allows for planned re-evaluation after an initial adaptation period rather than locking in a single window permanently.