A night shift starts at 22:40 and finishes at 06:10. Subtract the start from the end and the arithmetic collapses: 06:10 minus 22:40 is negative in every column. The same wall appears with an overnight backup job, a red-eye flight, a slow download started in the evening. The span is perfectly real. It just crosses midnight, and midnight is where naive clock subtraction breaks, because the end time belongs to a different date than the start time.
This guide shows how to work out elapsed time across midnight, with the free Time Duration Calculator on Ovatly and by hand. The calculator measures the exact span between two date-times and expresses it as a breakdown in days, hours, minutes and seconds, plus totals in each unit. Because it works with full date-times rather than bare clock times, an overnight span needs no special mode. It only needs the truth: the end falls on the following date.
Contents
- Quick answer
- Why midnight breaks clock subtraction
- The two honest methods
- How to work out an overnight span, step by step
- Worked example: 22:40 to 06:10
- Overnight spans and daylight saving
- Limitations
- Common mistakes
- FAQs
- Conclusion
Quick answer
Give the end its real date. Enter the start as 22:40 on the first date and the end as 06:10 on the next date, and the Time Duration Calculator reports the span whole: 7 hours 30 minutes, which is 450 minutes, 27,000 seconds, or 7.50 hours. By hand, split the span at midnight and add the two pieces: 22:40 to midnight is 1 hour 20 minutes, midnight to 06:10 is 6 hours 10 minutes, and the total is the same 7 hours 30 minutes. What never works is entering both times on one date: the end must be after the start, and 06:10 on the start date is earlier than 22:40, not later.
Why midnight breaks clock subtraction
Clock subtraction assumes the end is later than the start on a single timeline of hours. Within one day that holds. Across midnight it fails twice over. The hours column goes negative, because 6 is smaller than 22, and the minutes column goes negative too, because 10 is smaller than 40. Borrowing cannot rescue it: borrowing fixes a column that is short by less than one unit, and here the end time is short by most of a day.
The real problem is missing information. A bare pair of clock times, 22:40 and 06:10, does not say whether the span is 7 hours 30 minutes forwards or 16 hours 30 minutes backwards. The date is what settles it. Once the end carries the next day's date, the span sits on one timeline again and ordinary duration arithmetic applies.
The two honest methods
The calculator method is to enter real date-times. The tool's inputs are a start date and time and an end date and time, so an overnight span is entered exactly as it happened: start on the evening date, end on the morning date after it. Nothing about the entry changes; only the date on the second field moves forward by one day.
The hand method is to split at midnight. Midnight is the one point both halves share, so the span divides cleanly into a part before it and a part after it. Work out each part as an ordinary same-day duration, then add them. The part before midnight runs from the start time to 24:00. The part after runs from 00:00 to the end time. The two methods always agree, which makes the hand method a good check on a calculator entry you are unsure about.
How to work out an overnight span, step by step
- Open the Time Duration Calculator.
- Enter the start date and time: the evening date, with the time the span began.
- Enter the end date and time: the following date, with the time the span ended. This date is the step people miss.
- Read the breakdown and the totals in the result panel. For an overnight span under a day, the breakdown shows 0 days with the hours running past the start time's position, and the totals give the span in hours, minutes and seconds for logging or billing.
Worked example: 22:40 to 06:10
Take the night shift: start 22:40 on Monday, finish 06:10 on Tuesday.
By hand, split at midnight. From 22:40 to midnight: 24:00 minus 22:40 is 1 hour 20 minutes. From midnight to 06:10 is 6 hours 10 minutes. Add the pieces: 1 hour 20 minutes plus 6 hours 10 minutes is 7 hours 30 minutes.
As totals: 7 hours is 420 minutes, plus 30 gives 450 minutes. 450 minutes at 60 seconds each is 27,000 seconds. As decimal hours, the 30 minutes is half an hour, so the total is 7.50 hours, the figure a timesheet or log usually wants.
In the calculator, the same span is two entries: start Monday at 22:40, end Tuesday at 06:10. The result panel reports the same 7 hours 30 minutes, with the same totals, and the two methods agreeing is the sign the dates were entered correctly. If you had entered the end on Monday by mistake, the end would fall before the start, which the tool does not accept; that refusal is a useful guard, not an obstacle.
Overnight spans and daylight saving
Times in the calculator are interpreted in your browser's timezone, and a span crossing a daylight-saving change shows the shifted length, matching your wall clock. Overnight spans meet this head on, because clock changes happen in the small hours, inside exactly the spans this guide is about. On the night the clocks go forward, a shift from 22:40 to 06:10 by the wall clock is genuinely one hour shorter than the same clock times on a normal night, and on the night they go back it is one hour longer. The calculator reports the wall-clock length, which is what a person who lived through the shift experienced, and what most logs record.
Limitations
The end must be after the start. The tool will not guess that an end time means tomorrow; the date you enter is the date it uses, so a wrong date gives a refused entry or, if the wrong date is still later, a wrong span. Check the dates first when an overnight result looks off.
Seconds are exact whole seconds between the two timestamps; sub-second timing is not offered. The calculator also reports the raw span only. It does not deduct breaks, and it does not split a long span into per-day pieces for you; the breakdown is a single set of days, hours, minutes and seconds for the whole span. For a span of several days with a pattern inside it, such as a nightly process, measure one occurrence and multiply, rather than expecting the total to describe the pattern.
Common mistakes
- Entering the end on the start date. 06:10 on the same date is before 22:40, so the span cannot be measured. The end of an overnight span belongs to the next date.
- Adding 24 hours to the answer instead of fixing the dates. The span from 22:40 to 06:10 is 7 hours 30 minutes. Padding a same-day calculation with a flat 24 hours produces a figure a full day too long.
- Forgetting the split leaves a remainder. When splitting at midnight by hand, the first piece ends at 24:00, not at 23:59. Counting to 23:59 loses a minute that never comes back.
- Reading 7.50 hours as 7 hours 50 minutes. The decimal is a fraction of an hour: .50 of 60 minutes is 30 minutes.
- Assuming every night is the same length. A daylight-saving change inside the span adds or removes an hour, and the wall-clock answer the calculator gives already includes that shift.
FAQs
Why is my two-day span not 48 hours? Usually because the times differ (09:00 to 11:30 adds 2.5 hours), or because a daylight-saving change added or removed an hour inside the span.
What if the end time is earlier than the start time? The end must be after the start; swap the fields for a span in the other direction. For an overnight span, enter the end with the next day's date so it is genuinely later.
Which timezone does the calculator use? Times are interpreted in your browser's timezone. A span crossing a daylight-saving change shows the shifted length, matching your wall clock.
Can I measure a span of months? Yes, the span can be any length; the breakdown will show large day counts and the totals give the exact hours and minutes.
How is this different from the Date Difference Calculator? That tool counts whole calendar days and business days between dates. This one includes times of day and reports hours, minutes and seconds, for spans where the clock matters.
Conclusion
An overnight span is an ordinary duration wearing a disguise: two dates instead of one. Give the end its real date and the Time Duration Calculator measures it directly, or split at midnight and add the two pieces by hand. Either way, the answer for 22:40 to 06:10 is 7 hours 30 minutes, and the date on the end field is the whole secret.
Related guide: How to Calculate the Duration Between Two Times on the Same Day.
More calculators guides: Calculators Guides.