Quick answer
The duration between two clock times is the end time minus the start time. If the end is earlier than the start the span is taken to cross midnight, so 22:00 to 06:00 is 8 hours. Enter a start and an end time to see the duration in hours and minutes, as decimal hours and as total minutes.
Equal start and end times give zero. The calculator works on times of day only; to count across several days use a date difference calculator.
Related tools: Days Between Dates Calculator: Number of days, weeks and months between two dates. Hours Calculator: Hours worked between a start and end time, minus breaks. Date Calculator: Add or subtract days, weeks, months or years from a date.
How to use the Time Duration Calculator
- Type start time, for example HH:MM (24-hour).
- Type end time, for example HH:MM (24-hour).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Start time | Text, such as HH:MM (24-hour) | — |
| End time | Text, such as HH:MM (24-hour) | — |
Formula and method
Formula
duration = (end − start) mod 24 h
Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects.
If the end time is earlier than the start, the span crosses midnight. Equal times give 0.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Start time = 09:00; End time = 17:30.
| Result | Value |
|---|---|
| Duration | 8 h 30 min |
| Decimal hours | 8.5 |
| Total minutes | 510 |
Example 2
Inputs: Start time = 22:00; End time = 06:00.
| Result | Value |
|---|---|
| Duration | 8 h 0 min |
| Decimal hours | 8 |
| Total minutes | 480 |
Example 3
Inputs: Start time = 12:00; End time = 12:00.
| Result | Value |
|---|---|
| Duration | 0 h 0 min |
| Decimal hours | 0 |
| Total minutes | 0 |
The first line is the headline result (duration). Below it the time Duration Calculator lists decimal hours and total minutes, which describe the same case from other angles. Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects.
Worked example
From 09:00 to 17:30 is 8 hours 30 minutes, which is 8.5 decimal hours and 510 minutes. The decimal figure is the one to use for pay: 30 minutes is 0.5 hour.
Different end times from a 09:00 start
Every figure in this table comes from running this calculator, so it matches what the form returns.
The 08:00 row crosses midnight, so the span runs to the next morning.
| End time | Duration | Decimal hours | Total minutes |
|---|---|---|---|
| 12:00 | 3 h 0 min | 3 | 180 |
| 17:30 | 8 h 30 min | 8.5 | 510 |
| 23:00 | 14 h 0 min | 14 | 840 |
| 08:00 | 23 h 0 min | 23 | 1380 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Start time: entering "25:00" shows "Enter a time as HH:MM (00:00–23:59)." beside that field and no result.
- End time: entering "9am" shows "Enter a time as HH:MM (00:00–23:59)." beside that field and no result.
Choosing between the Time Duration Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Days Between Dates Calculator](/date-calendar/days-between-dates-calculator/) | start date, end date and count end date? | Days between |
| [Hours Calculator](/time/hours-calculator/) | start time and end time | Hours worked |
| [Date Calculator](/date-calendar/date-calculator/) | start date and operation | Resulting date |
| [Time Card Calculator](/time/time-card-calculator/) | start times, end times and unpaid break per day | Total time |
| [Time Until Calculator](/time/time-until-calculator/) | current time and target time | Time remaining |
Background: dates and times
Date and time results depend on the conventions a tool uses: whether the end date counts, whether weekends and holidays are skipped, how months of different lengths are handled and whether time zones are applied. This page states its convention, and the worked examples show it.
Dates use the Gregorian calendar and calendar days unless the page says otherwise; check deadlines against the rule in your contract or regulation.
Assumptions and limitations
- Times in 24-hour HH:MM
- Spans of 24 hours or more need dates
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for start time and end time to confirm this.
Frequently asked questions
What does the Time Duration Calculator calculate?
Elapsed time between two clock times, including across midnight. It returns Duration, Decimal hours and Total minutes.
What formula does the Time Duration Calculator use?
duration = (end − start) mod 24 h. If the end time is earlier than the start, the span crosses midnight.
What do I need to enter in the time Duration Calculator?
You enter Start time and End time.
How is the result rounded or limited?
Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects. Times in 24-hour HH:MM.
What are the limits of this calculator?
Times in 24-hour HH:MM. Spans of 24 hours or more need dates.
What is an example of a time Duration result?
With start time 09:00 and end time 17:30, the duration is 8 h 30 min.
Related calculators
- Days Between Dates Calculator — Number of days, weeks and months between two dates.
- Hours Calculator — Hours worked between a start and end time, minus breaks.
- Date Calculator — Add or subtract days, weeks, months or years from a date.
- Time Card Calculator — Total hours, overtime and gross pay from daily start and end times.
- Time Until Calculator — Hours and minutes from the current time until a target clock time (generalizes “how long until 3:58 PM”).
- Military Time Converter — Convert between 24-hour (military) time and 12-hour AM/PM time.
- Time to Decimal Calculator — Convert hours and minutes to decimal hours.
- Time From Now Calculator — Clock time after adding or subtracting minutes.
Sources
- ISO 8601-1: Date and time, representations for information interchange (calendar dates, ordinal dates and week dates)
- Gregorian calendar reform, papal bull Inter gravissimas (1582): the leap-year rule used for all dates
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.