Elapsed Time Calculator

Find the elapsed time between two clock times or two dates, in hours, minutes and seconds and in decimal hours. Choose how each interval crosses midnight, subtract breaks, and total up to ten intervals, such as the two halves of a work shift.

  • Overnight made explicit
  • Breaks subtracted
  • Decimal hours included
Overnight, minus a break
Settings

Enter 24-hour times as HH:MM or HH:MM:SS. Choose Next day to add one day.

Intervals

1 / 10

These are example values. Type over them or start blank.

Interval 1 · Example

Results

Example result

Clock only, 24-hour HH:MM[:SS]

Net time across entered intervals
00:35:00
Net time in decimal hours
0.5833 hours
Gross time
00:45:00
Total breaks
00:10:00

1 accepted · 0 blank ignored

Intervals are added as entered. Overlapping intervals may count the same time twice.

Half-up · 0 decimal-second places · Version 1.5.2 · T02

Row breakdown

SourceStart inputEnd inputDay assumptionBreak input (HH:MM:SS)GrossBreakNetNet exact (ms)
Example23:3000:15Next day00:10:0000:45:0000:10:0000:35:002100000/1

How to use the elapsed time calculator

  1. Choose clock times or datesKeep Clock only for times within a day or overnight. Choose Dated intervals when the span runs across several days, then enter a date and time for each end.
  2. Enter start and end timesType 24-hour times as HH:MM or HH:MM:SS, such as 09:45 or 14:30:15.
  3. Say how the interval crosses midnightPick Same day, Next day or Full day for each clock-only interval. The calculator never assumes an overnight span, so 23:30 to 00:15 needs Next day.
  4. Subtract breaks and add intervalsEnter any unpaid break as HH:MM:SS in the Break field, such as 00:30:00, and use + Add interval for each extra time span. Then select Calculate elapsed time.

How many hours are between two times?

Subtract the start time from the end time. From 09:45 to 14:30 there are 4 hours 45 minutes, which is 04:45:00 or 4.75 decimal hours. To do it by hand, count to the next whole hour (09:45 to 10:00 is 15 minutes), then the whole hours (10:00 to 14:00 is 4 hours), then the remainder (14:00 to 14:30 is 30 minutes).

If the end time is earlier than the start time, the interval either crossed midnight or the times were entered the wrong way round. The calculator asks you to choose instead of guessing, because the two readings give very different answers.

Elapsed time overnight and across midnight

For a span that crosses midnight, choose Next day. The calculator then adds 24 hours to the end time before subtracting. A shift from 22:00 to 06:30 the next day is 08:30:00, and 23:30 to 00:15 the next day is 00:45:00.

Equal start and end times are zero on the same day. Choose Full day (equal times) when you mean exactly 24 hours, such as 07:00 to 07:00 the next morning.

Subtract breaks and add multiple time intervals

Gross time is the span from start to end. Net time is the gross time minus the break. A shift from 09:00 to 17:30 with a 30-minute break is 08:30:00 gross and 08:00:00 net, or 8.00 decimal hours. A break longer than its interval is flagged.

For a split shift, enter each part as its own interval. 08:15 to 12:00 is 03:45:00 and 12:45 to 17:20 is 04:35:00, so the total is 08:20:00, which is 8.3333 decimal hours. Intervals are added as entered, so overlapping intervals count the shared time twice.

Worked elapsed time examples
StartEndDay choiceBreakNet timeDecimal hours
09:4514:30Same day—04:45:004.75
09:0017:30Same day00:30:0008:00:008.00
22:0006:30Next day—08:30:008.50
23:3000:15Next day00:10:0000:35:000.5833
07:0007:00Full day—24:00:0024.00

Time duration between dates

Choose Dated intervals to find the time between two dates and times, for example 2024-02-28 12:00 to 2024-03-01 12:00. 2024 is a leap year, so that span includes 29 February and is 48:00:00. Dates from 1900 to 2100 are checked, so an impossible date such as 2023-02-29 is rejected.

Both ends use one fixed UTC offset, so daylight-saving changes and named time zones are not applied. If the clocks changed between your two local times, add or subtract that hour yourself.

Elapsed time in Excel or Google Sheets

With the start time in A2 and the end time in B2, =MOD(B2-A2,1) gives the elapsed time and handles spans across midnight: 22:00 to 06:30 returns 8:30:00. Subtract a break in C2 with =MOD(B2-A2,1)-C2, and multiply by 24 for decimal hours: =(MOD(B2-A2,1)-C2)*24 gives 8 for 09:00 to 17:30 with a 0:30 break.

If each cell holds a date and a time, plain =B2-A2 works. Format time results as [h]:mm:ss so spans over 24 hours do not wrap. Note that MOD treats equal start and end times as zero, never as a full day.

Related time calculations

The result already includes decimal hours. To convert other durations, use the time to decimal calculator. To find the average of several durations, such as the length of each shift over a week, use the time average calculator.

Frequently asked questions

How do you calculate elapsed time between two times?

Subtract the start time from the end time. From 09:45 to 14:30 is 4 hours 45 minutes. If the end is earlier than the start because the interval crossed midnight, add 24 hours to the end time first, which is what the Next day choice does.

How many hours are between 9 AM and 5:30 PM?

9:00 AM to 5:30 PM is 8 hours 30 minutes, or 8.5 decimal hours. In 24-hour time, enter 09:00 and 17:30. With a 30-minute unpaid break the net time is 8 hours.

How do I calculate time across midnight?

Enter the times as they appear on the clock and choose Next day. For 22:00 to 06:30 the calculator adds one day to the end and returns 8 hours 30 minutes. It never assumes an overnight span on its own.

Why do equal start and end times give zero?

On the same day, 07:00 to 07:00 is no time at all. If you mean a full 24 hours, choose Full day (equal times) for that interval.

Can I subtract a lunch break?

Yes. Enter the break as HH:MM:SS, such as 00:30:00, in the Break field for that interval. The result shows the net time after breaks along with the gross time and the total of all breaks.

Can I add up several time intervals?

Yes. Select + Add interval to enter up to ten intervals. Each one is calculated separately and the net times are added. Overlapping intervals are not merged, so enter time that overlaps only once.

Does the result show decimal hours?

Yes. Net time is shown in hours, minutes and seconds and in decimal hours to four places, so 8 hours 20 minutes also appears as 8.3333 hours.

Does it handle daylight saving time or time zones?

No. Dated intervals use one fixed UTC offset for both ends, so a span across a daylight-saving change is measured as if the clocks had not changed. Adjust the result by the change yourself.

Should I enter 12-hour or 24-hour times?

Enter 24-hour times. 2:30 PM is 14:30 and 12:15 AM is 00:15. Values such as 24:00 or 23:59:60 are rejected so that every time has one meaning.