Time Calculator

Enter a start time and end time to calculate the duration between them.

Enter the starting hour using 24-hour time.
Enter the starting minute.
Enter the ending hour using 24-hour time.
Enter the ending minute.

Time difference

8 h 30 min

Start time09:00
End time17:30
Total minutes510
Total hours8.5

How to use this time calculator

  1. Enter the start time

    Type the starting hour in the Start hour field and the starting minute in the Start minute field using 24-hour time.

  2. Enter the end time

    Type the ending hour in the End hour field and the ending minute in the End minute field.

  3. View the duration

    The calculator shows the total elapsed time in both minutes and hours.

  4. Check for overnight spans

    If the end time is earlier than the start time, the result automatically accounts for crossing midnight.

Methodology

How this time calculator works

This calculator converts the start and end times into total minutes after midnight, compares them, and reports the duration. If the ending time is earlier than the starting time, the calculation assumes the ending time falls on the next day.

Formula
duration in minutes = end time − start time If end time is earlier than start time, add 24 hours before subtracting.
start time The first clock time entered
end time The second clock time entered
Example

A start time of 09:00 and end time of 17:30 produces a duration of 8 hours and 30 minutes. A start time of 22:15 and end time of 01:00 is treated as an overnight span of 2 hours and 45 minutes.

A nurse starts a shift at 19:00 and finishes at 07:30 the next morning. The calculator treats 07:30 as the next day and returns a duration of 12 hours and 30 minutes, or 750 total minutes.

Assumptions
  • Times use a 24-hour clock.
  • If the end time is earlier than the start time, the calculator assumes the end time falls on the next day.
  • The result describes elapsed clock time and does not account for breaks unless you subtract them manually.
Notes
  • This calculator is useful for shift planning, study sessions, travel estimates, and time logs.
  • If you need date-aware time-zone handling, use the time-zone converter instead.
  • Manual break deduction is still needed if you want net working time rather than gross elapsed time.
Sources
  1. Standard clock-time arithmetic using 24-hour notation

How overnight calculations work

When the ending time is numerically smaller than the starting time — for example, starting at 22:00 and ending at 06:00 — the calculator assumes the end time falls on the next calendar day. It adds 24 hours (1440 minutes) to the end time before subtracting, so the result reflects the true elapsed duration rather than a negative or nonsensical number. This logic mirrors how payroll systems and hospital shift trackers handle overnight work. The only edge case to watch for is a span that exceeds 24 hours; since this tool works with clock times rather than date-times, it always returns the shortest positive duration between the two readings.

Converting between minutes and hours

The calculator reports duration in both total minutes and decimal hours because different contexts prefer different units. Payroll and billing often use decimal hours — 7.75 hours rather than 7 hours and 45 minutes — because they multiply cleanly by an hourly rate. Study planners and fitness trackers usually prefer hours-and-minutes because they map directly to clock readings. To convert manually, divide total minutes by 60 for decimal hours, or use integer division and the remainder: 465 minutes is 7 hours with a remainder of 45 minutes. The calculator saves you from doing this arithmetic every time.

Time calculator FAQs

How does the calculator handle overnight time spans?

If the end time is earlier than the start time, it assumes the end time occurs on the next calendar day.

Can I use this for work shifts?

Yes, but subtract unpaid breaks separately if you need net shift time.

Why does the page ask for hour and minute separately?

That keeps the schema simple and avoids locale-specific time input quirks.

Written by Jan Křenek Founder and lead developer
Reviewed by DigitSum Methodology Review Formula verification and QA
Last updated Mar 11, 2026

Use this as an estimate and validate important decisions with a qualified professional.

Inputs stay in the browser unless a future feature explicitly tells you otherwise.