Fasting time calculator, in one step
This doubles as a fasting time calculator and a fasting hours calculator: the same two inputs answer both. Give it your last meal and a duration and it returns the window boundaries, or give it a window you already keep and it tells you how many hours that actually is. People searching for either phrase want the same arithmetic, so there is one tool rather than two.
The custom duration option supports anything from a 10-hour overnight window to multi-day fasts. Past 24 hours a fast no longer has a daily eating window, and the calculator says so plainly instead of inventing one.
How to count fasting hours by hand
You do not need a calculator for this, and it is worth knowing the method so the result above is something you can check rather than something you have to trust. A fast is continuous clock time from your last bite to your first bite. Nothing pauses it, and nothing about sleep, work, or time of day changes the arithmetic.
When the whole fast sits inside one calendar day, subtract. A fast from 6 AM to 4 PM is ten hours, because 16 minus 6 is 10 on the 24-hour clock. That case is easy and almost nobody gets it wrong.
The case people do get wrong is the one that crosses midnight, which is most fasts. Split the fast in two at midnight and add the halves. Suppose you finish dinner at 8 PM and want to know when a 16-hour fast ends. From 8 PM to midnight is 4 hours. That leaves 12 hours, so the fast ends at 12 PM the next day. Reverse the same method to count a window you already keep: if you stopped eating at 9:30 PM and had breakfast at 8 AM, that is 2 hours 30 minutes to midnight plus 8 hours after it, giving 10 hours 30 minutes.
Two things trip people up. Minutes carry differently from hours, so 9:45 PM plus 16 hours is 1:45 PM rather than 1:45 AM, and a fast longer than 24 hours lands two calendar days later than the one you started counting from. Both are ordinary mistakes and both are why the calculator above prints the date next to the time.
Working backwards from your first meal
Most people have the opposite problem: the first meal is fixed and the question is when to stop eating the night before. A 7 AM gym session followed by breakfast at 8 AM, a 12:30 PM lunch break you cannot move, a family breakfast at the weekend. In each case the unknown is the start of the fast, not the end.
Subtract instead of adding. For a 16-hour fast ending at an 8 AM breakfast, count back 8 hours to midnight and 8 more to 4 PM, so eating has to stop at 4 PM the previous day. That is early enough that most people discover 16 hours does not fit an 8 AM breakfast without giving up dinner, which is useful information to have before starting rather than after a week of missing the target. Shortening to 14 hours moves the deadline to 6 PM, and 12 hours moves it to 8 PM.
The reverse fasting calculator runs this direction directly: give it the meal you want and the duration you want, and it returns the time to stop eating. Same engine, opposite input.
Fasting window and eating window, side by side
| Fasting window | Eating window | Meals it usually holds | Typical placement |
|---|---|---|---|
| 12 hours | 12 hours | All three, unchanged | 7 PM → 7 AM fast, eat 7 AM → 7 PM |
| 14 hours | 10 hours | Late breakfast, lunch, dinner | 8 PM → 10 AM fast, eat 10 AM → 8 PM |
| 16 hours | 8 hours | Lunch and dinner | 8 PM → 12 PM fast, eat 12 PM → 8 PM |
| 18 hours | 6 hours | Two meals, close together | 8 PM → 2 PM fast, eat 2 PM → 8 PM |
| 20 hours | 4 hours | One meal plus a small second | 8 PM → 4 PM fast, eat 4 PM → 8 PM |
| 23 hours | 1 hour | One meal | OMAD: one meal at a fixed hour |
Every hour added to the fast is an hour removed from the eating window. That trade is the entire design space of intermittent fasting, and the third column is where it becomes real: the step from 16 to 18 hours removes a meal slot, which is why it feels larger than the step from 14 to 16 despite being the same two hours. Which window suits you is mostly a question about your calendar, and the fasting schedule calculator answers it from your actual routine.
Does sleep count inside the fasting window?
Yes, and it is the reason these schedules are workable at all. Sleep is fasted time like any other, so a 16-hour fast overlapping 8 hours in bed leaves roughly 8 waking hours to manage, usually the morning. That is a very different proposition from 16 waking hours, and it explains why 16:8 became the common default rather than something shorter.
Placement changes the overlap. An eating window of 12 PM to 8 PM against sleep from 11 PM to 7 AM puts the full 8 hours of sleep inside the fast. Move the window later, to 4 PM until midnight, and you lose most of that overlap: the fast now runs from midnight through the morning and into the afternoon, with only 7 hours of it spent asleep. The duration on paper is identical. The experience is not.
The planner computes this overlap for any schedule you give it and reports the number in hours, which is a more useful thing to compare than the protocol name. Night shift workers have the same arithmetic with the clock rotated, and the night shift calculator handles daytime sleep the same way it handles overnight sleep, because a 24-hour circle does not care which part of it you sleep in.
Choosing where your window sits
Two schedules with identical durations can feel completely different depending on placement. An 8-hour window at 12 PM to 8 PM preserves social dinners and gives up breakfast; the same 8 hours at 8 AM to 4 PM does the reverse. Three questions usually settle it. Which meal of the day would you refuse to give up? When do you sleep, given that sleep should sit inside the fast wherever it falls? And when does your household eat together?
Anchor the window to those answers and the rest is arithmetic. If the anchors contradict each other, say a 9 PM dinner alongside an 8 AM breakfast with a 16-hour target, the planner will detect that no window satisfies both and show which anchor has to move, along with the longest fast that does fit between them.
When the window has to move
A fixed window survives contact with an ordinary week for about four days. Dinner runs late, a flight crosses two time zones, a birthday lands on a Tuesday, someone books a 7 AM meeting. The useful question is what to do about it, and there are three workable answers depending on what you are protecting.
Keep the duration and slide the whole window. If dinner ends at 10 PM instead of 8 PM, a 16-hour fast now ends at 2 PM instead of noon. The schedule is intact and the clock times moved, which is the simplest correction and the one that costs nothing.
Keep the clock times and shorten the fast. Holding a noon first meal after a 10 PM dinner gives you a 14-hour fast instead of 16. That is a shorter fast and a normal day, and it is worth saying plainly that a 14-hour fast is not a failed 16-hour fast. It is a 14-hour fast.
Or skip the day. Weekly consistency is what the research on adherence points at, and one unstructured day inside a week of structure is a rounding error. The history view reports your actual average over weeks so you can see the pattern instead of guessing at it, and the weekly planner accepts a different window for every day if your week is genuinely shaped that way.
What counts as inside the window
The calculator draws boundaries in clock time and assumes the fasting side contains no calories. In practice the question people arrive with is narrower: whether black coffee, sparkling water, or an electrolyte tablet sits inside the fast or ends it.
The honest position is that no trial establishes a calorie threshold at which a fast stops counting, so anyone quoting you a specific number has chosen it rather than measured it. What can be stated is what is measurably in the drink. Black coffee, plain tea, and water contain effectively nothing. A splash of milk, a sweetened creamer, or a sports drink contains a measurable amount, and how much depends entirely on how much you pour. Our what breaks a fast reference lists the common items with their actual calorie counts so you can decide with the numbers in front of you.
For scheduling, the boundary that matters is your first real bite, because that is what the timer records and what your history reflects. If you want the window in this calculator to mean strictly zero calories, keep the fasting side to water, black coffee, and plain tea, and the arithmetic above describes exactly what you did.
One engine behind every page
This site runs a single tested calculation engine everywhere: this fasting window calculator, the protocol calculators, the fasting timer, and the planner. A 16:8 window computed here is identical to one computed anywhere else, including across midnight, daylight-saving changes, and leap days. Your inputs stay on your device, results appear instantly, and there is no account or subscription at any point.