The quick answer

Subtracting two clock times is minutes-past-midnight arithmetic: 09:15 to 17:45 is 510 minutes, rendered as 8h 30m, 8.50 decimal hours and 30,600 seconds. If the end time is earlier than the start, the tool assumes midnight is crossed, so 22:00 to 06:30 also reads 8h 30m. The inputs are times of day, not dates, so weekends and holidays never enter it. Everything runs in your browser.

Two clocks, one subtraction

Duration Between Times is a browser tool that takes a start time and an end time and returns the gap in every form a payroll, invoice or logbook wants: hours and minutes (8h 30m), total minutes (510), decimal hours (8.50) and total seconds (30,600). You enter the four numbers as separate fields: start hour, start minutes, end hour, end minutes. They arrive pre-filled with 9:00 and 17:30, so the page opens showing 8h 30m across all four renderings.

The traps in duration math stay invisible until they fire: an overnight shift entered as 22:00 to 06:30 looks negative to naive subtraction, identical start and end times should read as zero rather than a full day, and hand-converted decimal hours are where billing errors are born. This tool states its conventions up front and has none it does not state.

How to measure the time between two times

  1. Enter the start time

    Set the start hour (0 to 23) and start minutes (0 to 59) in the first two number fields. The inputs are times of day on a 24-hour clock; no AM/PM and no date.

  2. Enter the end time

    Set the end hour and end minutes the same way. If the end time is earlier than the start, the tool assumes the span crosses midnight and adds 24 hours automatically.

  3. Read the four cards

    Duration (8h 30m), total minutes (510), decimal hours (8.50, the payroll form) and total seconds (30,600, the cue-software form). Results recompute on every keystroke.

  4. Sanity-check by hand

    Convert both times to minutes past midnight and subtract: 1,065 − 555 = 510. When your subtraction matches the tool, the answer is verified, and the method is now yours.

How the duration is computed

The arithmetic is pure clock subtraction: both times become minutes since midnight, the start is subtracted from the end, and the result is re-rendered as hours-and-minutes, decimal hours and seconds. When the end time is earlier than the start, 1,440 minutes, one day, are added first: the overnight convention. Nothing calendar-related enters the calculation: weekends, holidays and daylight-saving transitions are all outside it, because the inputs are times of day, not dates.

Duration Between Times: day shift

Input

Start: 09:15 · End: 17:45

Output

Duration: 8h 30m
Total minutes: 510
Decimal hours: 8.50
Total seconds: 30600

Worked examples: a day shift and an overnight span

Three pairs on this page cover the cases people actually type, edge cases included. Every number was produced by the tool's own code path.

Duration Between Times: overnight span

Input

Start: 22:00 · End: 06:30 (crosses midnight)

Output

Duration: 8h 30m
Total minutes: 510
Decimal hours: 8.50
Total seconds: 30600
Duration Between Times: a billable call

Input

Start: 13:00 · End: 14:20

Output

Duration: 1h 20m
Total minutes: 80
Decimal hours: 1.33
Total seconds: 4800

Note what the first two pairs share: 09:15 to 17:45 and 22:00 to 06:30 both read 8h 30m, because the overnight convention adds exactly one day. Identical start and end times read as 0h 0m, not 24 hours, because the tool cannot know that 22:00 to 22:00 means a full day. When dates or zones enter the picture, the Time Zone Converter picks up where this page leaves off.

Who measures durations daily

  • Hourly employees checking pay: clock-in 09:15, clock-out 17:45 means 8h 30m and the 8.50 decimal hours the payroll system prints. Two minutes with this tool reconciles a pay-stub line.
  • Freelancers and consultants: a call from 13:00 to 14:20 is 1h 20m or 1.33 decimal hours, and the tool hands over both billable renderings at once.
  • Shift supervisors and schedulers: verifying posted shifts against contracted length, where a 22:00 to 06:30 overnight only reads 8h 30m if the midnight crossing is handled, which is exactly the case the tool automates.
  • Event coordinators: doors at 18:00, headline at 21:30, and the 3h 30m gap is the number the run-sheet needs; the seconds row feeds cue software that thinks in seconds.

What the tool promises, plainly

AspectThis tool
Processing100% client-side (JavaScript in your browser)
Signup requiredNo; the tool works without an account, an email address or consent cookies
Data uploadedNever; the four numbers stay on your device
SpeedInstant, live recomputation on every keystroke
Mobile supportFull; number steppers and a responsive layout
Offline useWorks after first load; nothing in this tool phones home
CostFree

Where durations go wrong: conventions, not math

The tool is exact where its inputs are exact, and the surprises come from conventions. Four account for nearly everything:

  • Identical start and end times read as zero, not 24 hours; the tool cannot tell a full day from a no-time span, so enter 23:00 to 23:00 only if you really mean zero.
  • Overnight spans wrap forward, never backward: 22:00 to 06:30 adds a day to read 8h 30m, while the same two readings entered in daylight order, 06:30 to 22:00, are 15h 30m. The order of your two readings selects the convention.
  • A real span crossing a daylight-saving change is not adjusted: enter the times as the clocks actually read on each side, or expect a one-hour difference from elapsed wall time.
  • Payroll decimal values may be rounded: many systems round to the nearest quarter hour, so 8h 25m prints as 8.50 instead of the exact 8.42 this tool reports.

Your times stay in your browser

Times are often medical appointments, therapy sessions or shift records. The arithmetic on this page runs locally in the browser, and nothing you enter transmits anywhere, so there is no server copy to leak.

How this compares with spreadsheet timing

AlternativeWhy people pick this tool instead
Spreadsheet formulasA formula like (B2 − A2) × 24 works until someone types 22:00 to 06:30 and gets a negative hour count; the midnight convention here is stated, not remembered
A phone calculatorSubtracting clock times by hand means borrowing 60 from the hour column whenever minutes run backwards, 09:45 to 17:15 for instance; the tool does the base-60 borrow for every pair you enter
Timesheet softwareBuilt for whole pay periods and approvals; heavier than one pair of clock readings that needs checking right now

Frequently asked questions

How do I calculate the duration between two times?

Convert both to minutes past midnight and subtract: 09:15 is 555, 17:45 is 1,065, and the difference of 510 minutes is 8 hours 30 minutes. The tool performs exactly this, then renders the result in decimal hours and seconds as well.

What are decimal hours?

The payroll rendering of a duration: 8 hours 30 minutes is 8.50 decimal hours, because 30 minutes is half an hour. Payroll systems multiply decimal hours by the hourly rate, so 8.50 × $22 = $187.00.

How does the tool handle overnight spans?

When the end time is earlier than the start, 22:00 to 06:30 for instance, the tool assumes midnight is crossed, adds 1,440 minutes, and reports 8h 30m. Identical start and end times read as zero, not 24 hours.

Does the tool exclude weekends or public holidays?

No. The inputs are times of day, not dates, so weekends and holidays are not part of the arithmetic at all; there is no calendar in the calculation. Business-day counting is a different tool in this cluster.

Does daylight saving time affect the result?

No, and that is a documented boundary: the tool subtracts clock readings exactly as given. If a real span crosses a DST change, enter the times as the clocks actually read on each side, or expect a one-hour difference from elapsed wall time.

How do I convert minutes to hours and minutes?

Divide by 60 and keep the remainder: 510 minutes is 8 hours with 30 minutes left over. The decimal form is simply 510 ÷ 60 = 8.50, and the tool prints all three renderings side by side.

Why does my timesheet show a different decimal value?

Likely a rounding convention: many payroll systems round to the nearest quarter hour, so 8h 25m becomes 8.50 rather than 8.42. This tool reports the exact value; the timesheet rounding calculator covers the rounding rules payroll uses.

Can I use the tool offline?

Once the page has loaded, yes: the arithmetic runs locally in your browser and needs no network connection for any calculation.

Is the Duration Between Times tool free to use?

Yes: free, unlimited and signup-free, with no cap on how many durations you compute. Everything runs in the browser, so there is nothing to install either.

Do you store what I enter?

No. The four numbers you enter are processed in your browser only; no network request carries them anywhere, and closing the tab erases them.

Sources and further reading

The conventions on this page, minutes past midnight, decimal hours and 24-hour clock readings, are the ones these references define.

Sources and further reading

We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.