Work out the gap between two times of day with FindUtils Time Difference Calculator. It handles a shift that runs past midnight, subtracts an unpaid break, and gives the answer as decimal hours for a timesheet. Everything runs in your browser.

This guide is about the three cases where the obvious arithmetic gives the wrong answer.

Case 1: The Clock Resets

From 09:00 to 17:30 the subtraction works: eight and a half hours.

From 22:00 to 06:00 it does not. The end is a smaller number than the start, so 06:00 − 22:00 gives minus sixteen hours. The real answer is eight.

The fix is to notice the end fell on the next day and add twenty-four hours. That is the entire job, and it is why this tool exists separately from a date calculator: with two bare clock readings there is no date to tell you which day the end belongs to.

The setting has three positions rather than a checkbox, because the three cases genuinely differ:

ModeBehaviourUse when
Autowraps only when the end is not after the startalmost always — this is the default
Alwaystreats the end as the next day regardless, so 09:00 to 17:00 is 32 hoursa long shift where both times look like a normal day
Neverrefuses to wrap and reports an erroryou want to be told you typed the times the wrong way round

Case 2: Two Equal Times

A shift from 09:00 to 09:00 is twenty-four hours, not zero.

Plenty of calculators return zero here, and it is the worst kind of wrong: it looks plausible, it passes review, and it silently removes a whole day from a timesheet. Nobody catches it until payroll.

Case 3: The Twelve-Hour Clock

12:00 am is midnight. 12:00 pm is noon.

Neither is "twelve o'clock plus an offset", so the common shortcut — add twelve to the hour when it says pm — gets both of them wrong, and they are the two values people most often type. Both are handled here.

Decimal Hours

Under the main answer sits the same duration as a single number, because that is what the next step usually needs.

Eight hours and thirty minutes is 8.5, not 8.3.

That slip is common and it is expensive: it under-reports by twelve minutes on every entry. Any duration whose minutes are not a multiple of six produces a decimal that does not resemble the minutes at all — 8h 20m is 8.33, 8h 50m is 8.83.

Check the Result With a Known Case

Use a known case before you copy many results into payroll software.

StartEndBreakModeExpected result
09:0017:3030 minutesAuto8 hours
22:0006:0030 minutesAuto7 hours 30 minutes
09:0009:000 minutesAuto24 hours
12:00 am12:00 pm0 minutesAuto12 hours

If this check gives a different result, review the clock format and the overnight mode. Do not copy the value to payroll first.

Which Tool for Which Job

You haveUse
Two clock times, no datesTime Difference Calculator
Two dates, or two full date-timesDate Difference Calculator
A week of entries with overtime and payTimesheet Calculator

The date calculator accepts ISO 8601 values such as 2026-01-01T09:30, so it counts the time of day too. What it cannot do is wrap past midnight — with real dates it never needs to, and with bare clock times it has nothing to wrap from.

Common Mistakes

Mistake 1: Subtracting Overnight Times by Hand

06:00 − 22:00 is minus sixteen. If a spreadsheet column shows negative shifts, this is why.

Mistake 2: Reading 8h 30m as 8.3

It is 8.5. See above.

Mistake 3: Forgetting the Unpaid Break

A half-hour lunch inside a 09:00 to 17:30 shift makes it eight hours, not eight and a half. Put it in the Break field.

Mistake 4: Using Always by Default

Always adds a day unconditionally, so a normal 09:00 to 17:00 becomes thirty-two hours. Leave it on Auto unless you know the end really is the next day.

Tools Used in This Guide

FAQ

How do I calculate hours across midnight? Enter the times and leave the mode on Auto. It adds a day when the end is not after the start.

What does 09:00 to 09:00 give? Twenty-four hours. Two equal times mean a full day.

What are decimal hours? The duration as one number for payroll: 8h 30m is 8.5.

Can I subtract a lunch break? Yes, in the Break field. A break longer than the shift is rejected rather than going negative.

Does it accept am and pm? Yes, and it puts 12:00 am at midnight and 12:00 pm at noon.

What if my times are on different dates? Use the Date Difference Calculator, which takes full date-times.

Next Steps

Feed the decimal hours into Timesheet Calculator for a full week with overtime, or use Timezone Converter first if the two times were recorded in different zones.