Intermittent Fasting Window Calculator

Fit a meal-timing window around your shift, sleep and preferences.

1. Your shift

An end before the start means the following day. Equal times are not a 24-hour shift.

2. Fasting plan

Fast:eat hours in one 24-hour cycle. Longer is not a higher score or a recommendation.

Fast 16h · Eat 8h

3. Sleep schedule Optional
4. Eating preference

A preference can require a compromise. Sleep times help anchor After waking and Before sleep.

If this scope does not apply, use individualized nutrition guidance. No exact age or medical details are collected.

Edits clear the previous result. Optimize again when ready.

Your suggested schedule

Enter your schedule, confirm adult scope, then select Optimize my window. No fasting schedule is generated without confirmation.

Scheduling tool for adults; not medical advice. This tool organizes meal timing and does not determine whether fasting is medically appropriate. If you are pregnant or breastfeeding, have a history of eating disorders, diabetes, use glucose-lowering medication, or have another condition affected by meal timing, seek individualized medical guidance before fasting.

When your shift changes

Optional comparisons. Use the same plan and preference, then edit only the exceptions. Changing these inputs clears results until you update the schedule.

Private by default: schedule inputs stay in this tab’s memory. Nothing is automatically saved, sent for calculation or put into the URL. Refreshing clears the schedule.

About this calculator

Fit an eating and fasting window around your work shift, optional sleep times and meal-timing preference, including overnight and rotating shifts.

This calculator provides scheduling assistance for adults and does not determine whether intermittent fasting is medically appropriate. It fits a single eating window around the clock times you enter. It does not prescribe weight loss, calories, macros, food choices or medication changes.

How to use the Intermittent Fasting Window Calculator

Enter your shift start and end, choose a fasting plan, optionally include bedtime and wake time, then select an eating preference. Confirm that you are 18 or older and not pregnant or breastfeeding before selecting Optimize my window. No exact age, diagnoses or medication names are requested.

The initial example is a 9 AM–5 PM shift, a 16:8 plan, no sleep information and no preference. Read the suggested eating/fasting times, reasons and timeline together. Changing an input clears the old output so you can explicitly generate a new schedule. Copy schedule exports generated times and transition notes only after you choose it.

Use My shift changes tomorrow for a quick comparison, or Variable weekly schedule to edit exceptions one weekday at a time. These are secondary tools, so the initial form stays focused on four scheduling choices.

What fasting windows and ratios mean

The ratio is fasting hours:eating hours within 24 hours. A 16:8 selection has a 16-hour fasting interval and an 8-hour eating window. The presets 12:12, 14:10, 16:8, 18:6 and 20:4 receive equal visual treatment; none is labelled better.

Custom accepts 12–20 fasting hours in 0.25-hour steps, and computes the remaining eating duration. For example, 15.5 fasting hours leaves 8.5 eating hours. These bounds define the supported scheduling range, not medical approval of any duration. There is no zero-hour eating window or multi-day fasting plan.

An eating window marks an available time range, not a requirement to eat continuously, a meal count or a prescribed amount of food. The tool does not set fluid restrictions.

How shift work affects meal timing

CDC/NIOSH describes how night work and long or irregular shifts can disturb usual sleep/wake patterns. Meal timing may be constrained by breaks, commuting, caring responsibilities and daytime sleep. A clock-based tool cannot assess those circumstances or a person’s circadian phase.

Nighttime eating is described neutrally when it occurs in the suggested window. You can explore After waking with sleep information to move the window toward waking hours. The calculator does not impose a rule that everyone must avoid eating after midnight, nor claim that its schedule prevents disease.

How overnight shifts are handled

If an interval ends earlier than it starts, it crosses midnight: 10 PM–6 AM is eight hours. Eating, fasting, work and sleep can all wrap around midnight. The timeline splits a wrapping row at midnight for display, but the underlying interval remains contiguous.

For the main and tomorrow comparison, previous day, next day and +2 days labels are relative to today. In weekly cards, weekday headings identify the shift-start day; full weekday labels identify the actual eating opening and closing. After work on a Monday 10 PM–6 AM shift can therefore open Tuesday morning. Before work can open on the previous day if the full eating window extends back that far.

Sleep is a repeating clock pattern for each row, not a dated sleep diary. Check the warning if entered work and sleep overlap, particularly when a rotating shift crosses a day boundary.

How sleep-aware scheduling works

With sleep enabled, the optimizer strongly penalizes every minute of eating-window overlap with the entered sleep period. For one contiguous sleep interval, it first reaches the smallest possible overlap, then balances the remaining scheduling preferences.

If waking time is shorter than the requested eating duration, some overlap is unavoidable. The result reports its exact duration rather than inventing more waking time or silently shortening the window. Entering daytime sleep works the same way as nighttime sleep. These times describe your context; they are not sleep recommendations.

Time math and schedule optimization

Times are integer minutes on a 1,440-minute local-clock cycle. No date-string parsing is used for core arithmetic.

  • Fasting minutes + eating minutes = 1,440.
  • Duration = (end − start + 1,440) modulo 1,440.
  • Eating close = eating open + eating duration; the clock display wraps modulo 1,440 while retaining day offsets.
  • The repeating-pattern fast starts at eating close and ends at the next eating opening, 1,440 minutes after the current opening.

Equal work or sleep start/end times are rejected as ambiguous; they do not mean a full-day interval. In weekly tools, use Off / no shift to remove the work constraint.

The optimizer evaluates all 1,440 possible start minutes. Eating duration is fixed, sleep overlap carries the strongest penalty, then preference, work fit and continuity determine the practical suggestion. Ties use the earliest clock minute. The numerical scoring weights are implementation choices documented in the review, not clinical evidence or a biological optimum.

  • Before work aims to finish at shift start.
  • During work aims to center the window on the shift and maximize overlap.
  • After work aims to open at shift end, retaining the following-day offset for overnight work.
  • After waking aims to open at wake time; Before sleep aims to finish at bedtime.
  • Without sleep, After waking uses Before work timing and Before sleep uses After work timing, with an explicit notice.
  • No preference uses an initial work-based anchor ending two hours after shift end. Sleep avoidance and continuity can change that placement. Without work, sleep/wake or the previous opening is used; noon is the final fallback.

There is no assumption that you can take a break at a suggested time. Shift overlap is reported as a fact, not a promise of access to meals.

How variable shifts are handled

The weekly editor initially uses the main shift Monday–Friday and Off on Saturday/Sunday. Choose a weekday to change its shift or sleep setting. Same as main follows edits to the main shift; Different shift uses that day’s entered times. Copy main shift to working days resets working-day shift overrides while preserving off days and separate sleep choices.

The week is solved in order from Monday to Sunday, seeded by the main result. A soft continuity preference discourages unnecessary changes; off days with no sleep/preference keep the preceding timing. Sleep and an explicit preference can still force a change. This is a deterministic sequential heuristic, not a global weekly optimum.

The Sunday-to-Monday return is checked too. Tomorrow is a separate comparison with optional sleep override; it does not silently rewrite the week. The live countdown always describes only the main repeating daily pattern.

How schedule transitions work

For adjacent rows, the actual fasting gap is next day’s absolute eating opening minus the current day’s absolute eating close. The calculation keeps full day offsets and does not apply modulo 24 hours. A negative gap means the dated eating windows overlap, not a positive fast.

Every difference from the selected plan is stated. A gap more than one hour longer than the selected fast, any gap over 20 hours, or overlapping eating windows receives a prominent transition warning. These are conservative product flags, not validated clinical thresholds. Extended gaps are comparisons to review, not instructions to fast longer.

For example, moving an eight-hour eating window from 11 AM–7 PM to 4 PM–midnight the next day leaves a 21-hour interval between them, rather than 16 hours. A move earlier can shorten the interval or cause overlap. The calculator never calls longer fasting beneficial and does not silently alter either eating duration to conceal the transition.

How to change your fasting window

Change the preference, add sleep times or select another supported ratio, then optimize again. Review the reasons and any transition note before treating two daily patterns as a continuing schedule. Rotating shifts may require a compromise, and a rigid fasting pattern may not fit.

Do not extend a fast merely to satisfy a generated timetable. Professional guidance is appropriate when meal timing affects a medical condition or when changing a pattern causes concern. This tool cannot decide whether you should fast.

Assumptions and limitations

For adults 18+ outside pregnancy and breastfeeding. It does not screen for diagnoses, assess medical suitability, model weight change, prescribe food or predict the timing of ketosis or autophagy. The preset default is an example, not a claim that 16:8 is optimal.

All plans use one contiguous eating window and one repeating fasting interval in a nominal 24-hour local-clock cycle. Split shifts, multiple sleep periods, commute times, on-call interruptions and access to breaks are not modeled. A single daily sleep interval can be overridden per day in the variable tools.

The countdown uses device-local hours and minutes after the component mounts, updating once per minute without screen-reader announcements each minute. It can be up to a minute behind; suspended browser tabs may delay updates. It is a wall-clock estimate, not a precise elapsed-time timer. Daylight-saving changes and travel between time zones can change actual elapsed durations. No location or timezone service is used.

Research on time-restricted eating involves selected populations and protocols, not this optimizer. The 2025 BMJ review calls for stronger longer-term evidence. Nothing here promises weight loss, disease reversal or that a longer interval is healthier.

Who should seek individualized medical guidance

If you have diabetes, especially when using insulin, sulfonylureas or other glucose-lowering medication that can cause hypoglycemia, discuss fasting with your care team first. A history of severe hypoglycemia is another reason for individualized guidance. Fasting may require professional supervision and medication review; this tool gives no medication-adjustment, stopping or dosing instructions.

If you have a history of an eating disorder or restrictive eating, fasting schedules may not be appropriate; individualized professional guidance is safer. This calculator does not recommend a special fasting plan for that situation.

Pregnancy, breastfeeding, under-18s and conditions affected by meal timing require individualized nutrition guidance. Confirming the form’s adult scope does not establish that fasting is medically suitable for you.

Worked schedule example

Enter a 10 PM–6 AM shift, sleep from 8 AM–3 PM, a 16:8 plan and After waking. The production optimizer generates:

  • Eat: 3:00 PM → 11:00 PM (8h).
  • Fast: 11:00 PM → 3:00 PM (next day) (16h).
  • Sleep overlap: 0m.
  • Work overlap: 1h.

The window opens at wake time, avoids the entered sleep period and overlaps the first hour of work. The final hour depends on practical access to a break; the tool cannot guarantee it. These values come from the same engine used by the form and are asserted in deterministic tests.

Fasting window FAQ

What is a 16:8 fasting schedule?

It describes a 16-hour fasting interval and an eight-hour eating window in a repeating 24-hour cycle. Here it is a scheduling selection, not a universal recommendation.

Can the calculator handle night shifts?

Yes. An end time earlier than its start is treated as the following day. The output retains day offsets and the timeline shows wrapping segments at both ends.

How does it calculate an eating window?

It scores every start minute while keeping the selected duration exact. Sleep avoidance dominates, followed by the entered preference, shift fit and continuity. The result is a practical fit, not a medical optimum.

What if my shift changes every day?

Use Variable weekly schedule and edit one weekday at a time. Each day can follow the main shift, use different times or be off. Review every transition, including Sunday back to Monday.

Can I enter my sleep schedule?

Yes. Turn on the optional sleep setting and enter bedtime and wake time. Tomorrow and individual weekdays can reuse it, replace it or omit sleep information.

What happens when a fasting window crosses midnight?

The duration is calculated on the 24-hour clock and day offsets remain explicit. In variable schedules, actual gaps use dated openings and closings, so they are not forced back into a 24-hour remainder.

Is a longer fasting window better?

This calculator makes no such claim. All presets have equal status, and an extended transition is flagged for review rather than rewarded.

Can I use intermittent fasting if I have diabetes?

Do not use this output as medical clearance. Diabetes and glucose-lowering medication can make fasting risky, including hypoglycemia. Consult your care team for individualized advice; the calculator does not adjust medication.

Who should talk to a healthcare professional before fasting?

People with diabetes, a history of severe hypoglycemia or eating disorders, medication affected by meal timing, or another relevant condition should seek individualized guidance. This tool excludes under-18s, pregnancy and breastfeeding.

Does the calculator save my work or sleep schedule?

No. Inputs remain in tab memory, with no automatic storage, server calculation or input URL. Copy schedule exports generated times only after you choose it. Refreshing clears the form and confirmation.

Sources and methodology review

Methodology reviewed September 28, 2026. This is an editorial review of scheduling assumptions and safety context, not clinical approval.

NIDDK/NIH and clinical education sources inform the cautionary scope. CDC/NIOSH supplies shift-work context. The peer-reviewed review informs the limits of health claims; its linked correction concerns an author affiliation. None validates the optimizer’s numerical weights or labels a particular generated window medically optimal.