Understanding the intermittent fasting window calculator — concept and principle
This calculator turns your last meal time and the number of fasting hours into a daily eating window: when you may eat again, when the window closes and how long it lasts. It is designed for time-restricted eating plans such as 16:8 or 18:6, where the fast is repeated every day.
How it is calculated
- Window opens = last meal time + fasting hours, wrapped around a 24-hour clock.
- Window closes = last meal time + 24 h, i.e. the same clock time the next day, so the cycle repeats.
- Window length (h) = 24 − fasting hours.
Times are entered as decimal hours on a 24-hour clock: 20 means 8 pm and 19.5 means 7:30 pm. Fasting hours should be between 0 and 24.
The principle
In time-restricted eating, a day of 24 hours is split into a fasting part and an eating part, so the two always add up to 24. The notation 16:8 means 16 hours of fasting and 8 hours of eating; 18:6 means 18 and 6. Adding the fasting length to the time of the last meal gives the moment the fast ends, and the clock arithmetic "modulo 24" moves it into the next day when needed. The 5:2 plan is different: it involves eating normally on five days and greatly reducing energy intake on two non-consecutive days, so it is planned by days of the week rather than by hours and is not calculated here.
Worked example
- Inputs: last meal at 20 (8 pm), fasting 16 hours.
- Window opens = 20 + 16 = 36 → 36 − 24 = 12:00 the next day.
- Window closes = 20 + 24 = 44 → 44 − 24 = 20:00.
- Window length = 24 − 16 = 8 hours (a 16:8 schedule).
How to read the result
Eat your meals between the opening and closing times, then start the next fast at the closing time. A 12-hour fast (12:12) is a gentle starting point, 14:10 and 16:8 are the most common, and 18:6 or longer is more demanding. Studies suggest that much of the weight benefit comes from eating less overall; the timing helps some people achieve that, but it does not cancel out a large calorie surplus inside the window.
Common mistakes
- Entering times on a 12-hour clock (8 instead of 20 for 8 pm).
- Counting caloric drinks such as milky coffee or juice as part of the fast.
- Compensating with very large meals in a short window.
- Jumping straight to long fasts instead of extending the fast gradually.
Frequently asked questions
Can I drink water or black coffee while fasting?
Most plans allow water, plain tea and black coffee because they provide almost no energy.
Is 16:8 better than eating three meals a day?
Trials comparing time-restricted eating with ordinary calorie reduction often find similar weight loss when total intake is similar.
Does it matter when the window is?
An earlier window, such as 8:00–16:00, fits some people's sleep and work better; consistency usually matters more than the exact hours.
Sources: de Cabo R., Mattson M.P., Effects of Intermittent Fasting on Health, Aging, and Disease, New England Journal of Medicine 381:2541–2551, 2019