Time Duration Calculator

Calculate the exact time duration between any two points in time β€” whether measuring hours between clock times or the full span of days, hours, and minutes between two dates.

Duration

8 hours, 30 minutes

Days

00

Hours (rem.)

08

Minutes (rem.)

30

Seconds (rem.)

00

Totals

Total hours8Total minutes510Total seconds30,600Decimal hours8.5000

Formatted duration

08:30:00(HH:MM:SS)

Quick answer

To calculate time duration, subtract the start time from the end time to get the elapsed hours, minutes, and seconds. For example, from 9:00 AM to 5:30 PM is 8 hours and 30 minutes, which equals 510 total minutes. When dates span multiple days, multiply the day difference by 24 and add the remaining hours. This calculator handles overnight spans and multi-day intervals automatically, returning results in days, hours, minutes, and seconds.

Formula & method

Duration = End Time βˆ’ Start Time
  • End Time β€” The later point in time (HH:MM or full date-time)
  • Start Time β€” The earlier point in time (HH:MM or full date-time)
  • Duration β€” Elapsed time expressed in days, hours, minutes, and seconds

When the end time is earlier in the day than the start, add 24 hours to indicate the calculation crosses midnight into the next day.

Total Minutes = (Days Γ— 1440) + (Hours Γ— 60) + Minutes
  • Days β€” Full 24-hour periods in the duration
  • Hours β€” Remaining hours after full days are counted
  • Minutes β€” Remaining minutes after full hours are counted

Converts any duration to a single comparable number. 1 day = 1440 minutes, 1 hour = 60 minutes.

Examples

Example 1: Standard Workday: 9:00 AM to 5:30 PM
Input
Start: 09:00 | End: 17:30 (same day)
Result
8 hours, 30 minutes (510 total minutes)
Why
17:30 βˆ’ 09:00 = 8 hours 30 minutes. Converting: 8 Γ— 60 + 30 = 480 + 30 = 510 total minutes. This is a classic 8.5-hour workday calculation.
Example 2: Multi-Day Event: Jan 15 08:00 to Jan 17 14:30
Input
Start: 2024-01-15 08:00 | End: 2024-01-17 14:30
Result
2 days, 6 hours, 30 minutes (3,270 total minutes)
Why
From Jan 15 to Jan 17 is 2 full days (48 hours). Then 14:30 βˆ’ 08:00 = 6 hours 30 minutes more. Total: 48 + 6 = 54 hours 30 min = (54 Γ— 60) + 30 = 3,240 + 30 = 3,270 total minutes.
Example 3: Quarter Duration: March 1 to June 1, 2024
Input
Start: 2024-03-01 00:00 | End: 2024-06-01 00:00
Result
92 days (2,208 hours / 132,480 total minutes)
Why
March has 31 days, April has 30 days, May has 31 days. 31 + 30 + 31 = 92 days exactly. Converting: 92 Γ— 24 = 2,208 hours; 2,208 Γ— 60 = 132,480 total minutes.
Example 4: Overnight Shift: 2:45 PM to 9:15 AM Next Day
Input
Start: 14:45 | End: 09:15 (next day, crosses midnight)
Result
18 hours, 30 minutes (1,110 total minutes)
Why
14:45 to midnight = 24:00 βˆ’ 14:45 = 9 hours 15 minutes. Midnight to 09:15 = 9 hours 15 minutes. Total: 9h 15min + 9h 15min = 18 hours 30 minutes = (18 Γ— 60) + 30 = 1,080 + 30 = 1,110 total minutes.

Frequently asked questions

How do I calculate time duration across midnight?

When the end time is earlier in the clock day than the start time, the duration crosses midnight. Add 24 hours to the end time before subtracting. For example, 14:45 to 09:15 becomes 09:15 + 24:00 = 33:15, minus 14:45 = 18 hours 30 minutes. This calculator handles midnight crossings automatically when you check the 'next day' option.

What is the difference between clock time and elapsed time?

Clock time refers to a specific moment on a clock face (e.g., 3:00 PM), while elapsed time or duration is the measurement of how much time passes between two clock times (e.g., 2 hours and 15 minutes). This calculator measures elapsed time β€” the duration β€” between any two clock times or date-time pairs.

How many minutes are in a workday?

A standard 8-hour workday contains 480 minutes (8 Γ— 60 = 480). A 7.5-hour workday is 450 minutes, and a 9-hour workday is 540 minutes. Use this calculator to measure the exact duration of your specific start and end times, which may differ from standard assumptions due to overtime, breaks, or flexible schedules.

Can I calculate duration between two dates and times?

Yes. When you provide both a date and a time for the start and end points, the calculator computes the full span including days, hours, minutes, and seconds. It accounts for different month lengths (28–31 days) and gives you a breakdown as well as the total in each unit (e.g., total hours, total minutes).

How do I convert a time duration to decimal hours?

Divide the minutes by 60 and add to the whole hours. For example, 3 hours 45 minutes = 3 + (45 Γ· 60) = 3 + 0.75 = 3.75 decimal hours. This format is commonly used for payroll, billing, and time-tracking systems. The calculator displays both the hours-and-minutes breakdown and the decimal hours equivalent.

Is this calculator accurate for leap years?

Yes. The calculation uses JavaScript's native Date object, which correctly accounts for leap years (years divisible by 4, except centuries not divisible by 400). For example, Feb 29 in a leap year is included in any date range that spans it. The total day count for any interval spanning February in a leap year will include the extra day automatically.

Sources & references

External references open in a new tab. We are independent and not affiliated with these organizations.

  • βœ“ Free to use
  • βœ“ No sign-up required
  • βœ“ Runs entirely in your browser β€” nothing is uploaded.
  • βœ“ Formula and method shown above

Provided β€œas is” for general information only β€” results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.

Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.

Related tools

Embed this tool on your site

Free to embed, no sign-up. Paste this code where you want the time duration calculator to appear: