Loona Calculators
Loona Calculators › Date & Time › Time Duration Calculator

⏱️ Time Duration Calculator

How long between 9:30 AM and 5:45 PM — or between a 10 PM departure and a 6:30 AM arrival? Enter any start and end time on the 24-hour clock and get the exact duration, including overnight spans.

How to use the Time Duration Calculator

  1. Enter the start time (hour 0-23 and minute).
  2. Enter the end time the same way — if it falls after midnight, just type it as-is.
  3. Press Calculate — the duration in hours, minutes and decimal form appears below.
Example: From 9:30 AM to 5:45 PM is 8 hours, 15 minutes — 495 minutes, or 8.25 hours. And 10:00 PM to 6:30 AM correctly counts across midnight as 8 hours, 30 minutes.

Frequently Asked Questions

How are overnight durations handled?

Whenever the end time is earlier than the start time, it is treated as falling on the next day — the standard assumption for shifts, flights and journeys.

Why show decimal hours?

Payroll, billing and timesheets often need hours as a decimal (8.25 instead of 8:15). Both forms are shown so you can use whichever your form demands.

What if start and end are identical?

Identical times mean a duration of zero — enter an end time earlier than the start if you mean a full day later.

How it works — the formula

The calculator turns both clock times into minutes since midnight — hour × 60 + minute — and subtracts the start from the end. If the end time is earlier than the start time, it adds a full day (1,440 minutes) to the end first, which is what makes overnight spans work: the end is treated as falling on the next day. The result is then shown three ways: as hours and minutes, as a total minute count, and as decimal hours (minutes ÷ 60) for timesheets and billing.

Formula: Duration in minutes = (end hour × 60 + end minute) − (start hour × 60 + start minute), plus 1,440 if that result is negative. Decimal hours = duration in minutes ÷ 60.

Worked example

Inputs: Start time 22:45 (10:45 PM); end time 05:15 (5:15 AM).

Steps: Start = 22 × 60 + 45 = 1,365 minutes. End = 5 × 60 + 15 = 315 minutes. 315 − 1,365 is negative, so add 1,440: the duration is 390 minutes, which is 6 hours and 30 minutes, or 390 ÷ 60 = 6.5 decimal hours.

Result: Duration: 6 hours, 30 minutes — 390 minutes in total, shown from 10:45 PM to 5:15 AM (next day).

Frequently asked questions

Do I enter times on the 12-hour or the 24-hour clock?

On the 24-hour clock: hours run from 0 to 23 and minutes from 0 to 59, so 5:45 PM is entered as hour 17, minute 45. The start and end times in the result are displayed back in 12-hour AM/PM form so they are easy to recognize.

What is the longest duration this calculator can show?

Just under a full day — 23 hours and 59 minutes. Both times sit inside a single day, and an earlier end time rolls over by exactly one day, so for spans of several days you would add whole days yourself or use a date-based calculator.

What happens if I enter hour 24 or minute 60?

The calculator rejects it with a message asking for hours from 0 to 23 and minutes from 0 to 59. Hours and minutes must also be whole numbers — 9.5 as an hour is not accepted.

My shift starts exactly at midnight — how do I enter it?

Enter hour 0 and minute 0 for the start. A shift from 0:00 to 8:00 is then calculated as a plain 8 hours, with no overnight rollover involved.

Does the calculator handle seconds?

No. Minutes are the smallest unit it works with, so round the start and end times to the nearest minute before entering them.

Related Calculators

📅

Age Calculator

Date & Time

🗓️

Days Between Dates

Date & Time

⏱️

Time Calculator

Date & Time

🕌

Zakat Calculator

Money & Islamic

🏢

Working Days Calculator

Date & Time

Embed this calculator on your website — free

Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.