Mapple Health
Food Lab · Body & Vitals

Eating Window Calculator for Meal Times

Use this eating window calculator to turn your first and last meal times into eating and fasting hours, including windows that run past midnight.

Work out your eating window

What do you know?

Your meal times (example times shown; replace them with your own)

24-hour time, for example 08:30
After midnight? Enter it as it is, for example 01:15

This tool only does the time arithmetic. It does not recommend an eating window, a fasting length or fasting for anyone. If you have diabetes, take regular medicines, are pregnant or breastfeeding, or have a history of an eating disorder, speak to your doctor before changing when you eat.

How the eating window calculator works

The eating window calculator measures the time between your first and last meal of the day and gives the rest of the 24 hours as fasting time. Every time is turned into minutes after midnight, so 08:30 becomes 510 and 20:00 becomes 1,200. The sums are then simple:

eating window = last meal − first meal (add 24 h if the last meal is after midnight)

fasting time = 24 h − eating window

last meal = first meal + window length (minus 24 h if it passes midnight)

If the last meal is earlier on the clock than the first, the calculator knows it falls on the next day. The eating window and the fast therefore always add up to exactly 24 hours. The calculation uses only clock times, not your device’s date or time zone, so it gives the same answer wherever you are.

Worked example: three eating schedules

You enterEating windowFasting time
First meal 12:00, last meal 20:008 h16 h (20:00 to 12:00 the next day)
First meal 18:30, last meal 01:156 h 45 min (ends the next day)17 h 15 min (01:15 to 18:30)
First meal 07:45, window 10 h 30 minLast meal at 18:1513 h 30 min (18:15 to 07:45 the next day)

The first row is the pattern often written as 16:8, meaning 16 hours of fasting and 8 hours of eating. The eating window calculator shows that label whenever both parts are whole hours. In the second row, 01:15 is treated as 25:15, so the window is 25:15 − 18:30 = 6 h 45 min.

What is an eating window?

An eating window is the part of the day between your first and last meal; the hours outside it are your overnight fast. Daily time-restricted eating, one form of intermittent fasting, means keeping meals inside a set window each day. You can use an eating window calculator simply to see what your current routine looks like, to plan meals around a work shift, or to compare two schedules. For an overview of what research has and has not shown, read our guide to intermittent fasting benefits.

Who should talk to a doctor first?

Some people should get medical advice before changing when they eat. The NHS lists people with a history of eating disorders, such as anorexia or bulimia, and people who are pregnant or breastfeeding as groups who should not try intermittent fasting. It also advises anyone taking medicines to check with their healthcare provider, because doses may need changing. The US National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK) notes that people with type 2 diabetes who use insulin or sulfonylureas must work with their doctor to adjust these medicines for a new eating pattern. Harvard Health also names people who need to take food with their medicines.

  • People with diabetes, especially those using insulin or sulfonylureas.
  • People who are pregnant or breastfeeding.
  • People with a history of an eating disorder.
  • Anyone taking medicines, particularly ones that must be taken with food.

The NIDDK article also calls for more research in older adults, because of concern about losing muscle. Children, teenagers and anyone with a long-term condition should ask a doctor or registered dietitian for personal advice. Our type 2 diabetes diet guide covers eating with diabetes in more detail.

Tips for entering meal times

  • Use 24-hour time. Type 20:00 rather than 8 pm, and 00:00 for midnight. The colon is needed, so 08:30 or 8:30 both work, but 830 does not.
  • Count every calorie. Milk, sugar and juice contain calories, so enter the first and last time you eat or drink anything that does. Use the same rule each day so your numbers stay comparable.
  • Use a typical day. Weekends, shifts and travel often move meals. Check each version separately.
  • Clock changes are not included. On the night the clocks go forward or back for daylight saving, the real gap is an hour shorter or longer than shown.

What the calculator cannot tell you

This is a clock tool, not a diet plan. It does not judge whether a window is short or long, and it does not tell you what or how much to eat inside it. The quality and amount of food matter whatever the timing; our sustainable weight loss guide and the risks set out in rapid weight loss risks explain why. To check where your weight sits for your height, use the adult BMI calculator.

Used as a simple record of your day, the eating window calculator turns any pair of meal times into clear eating and fasting hours.

Sources used on this page

Frequently Asked Questions

Count the time from your first meal to your last meal. If you first eat at 12:00 and last eat at 20:00, your eating window is 8 h and the other 16 h of the day are your fast. When the last meal is after midnight, add 24 hours to it before subtracting: 01:15 becomes 25:15, so a window that starts at 18:30 lasts 6 h 45 min.

16:8 is shorthand for 16 hours of fasting and an 8-hour eating window in each 24 hours, for example eating between 12:00 and 20:00. The eating window calculator shows this label whenever both parts are whole hours. It only describes a schedule; whether any schedule suits you is a question for your doctor or a registered dietitian.

Yes. Enter the times as they are on the clock, for example a first meal at 18:30 and a last meal at 01:15. Because the last meal is earlier on the clock than the first, the calculator places it on the next day and gives an eating window of 6 h 45 min and a fast of 17 h 15 min. This helps with night shifts and late dinners.

Add the window length to your first meal time. Starting at 07:45 with a window of 10 h 30 min gives a last meal at 18:15, and the fast that follows lasts 13 h 30 min. Choose “First meal and window length” in the calculator, enter the hours and minutes, and it does the sum for you, including windows that run past midnight.

NHS guidance says people with a history of eating disorders, and people who are pregnant or breastfeeding, should not try intermittent fasting, and that anyone taking medicines should check with their healthcare provider first. The US NIDDK notes that people with type 2 diabetes who use insulin or sulfonylureas need their doctor to adjust these medicines for a new eating pattern.

Contents