acalculator

What is the time duration?

Enter when the period starts and when it ends, each with a date and a time. The elapsed time updates as you type.

Your numbers

Duration
2 days, 8 hours, 30 minutes

From September 29, 2026 9:00:00 AM to October 1, 2026 5:30:00 PM is 56.5 hours.

Total hours
56.5
Total minutes
3,390
Total seconds
203,400
Total days
2.3542

Answer for the example date Tuesday, September 29, 2026. It changes to today's date when the page loads.

Duration: 2 days, 8 hours, 30 minutes. From September 29, 2026 9:00:00 AM to October 1, 2026 5:30:00 PM is 56.5 hours.

How to calculate

Computes the elapsed time between two dates with times of day in days, hours, minutes, and seconds, and as total hours, minutes, and seconds.

Example with the default inputs (Start date September 29, 2026, Start time 09:00:00, End date October 1, 2026, End time 17:30:00) on the example date Tuesday, September 29, 2026: From September 29, 2026 9:00:00 AM to October 1, 2026 5:30:00 PM is 56.5 hours.

Method: seconds = (end date − start date in days) × 86,400 + end time − start time in seconds; then split into days, hours, minutes, and seconds.

  • Every day has 24 hours: clock changes for daylight saving time and leap seconds are not counted.
  • Both times are in the same time zone.
  • Dates are on the Gregorian calendar, from 1600 to 2400, with its leap years.
  • An end before the start gives no answer.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Start date 2026-09-27, Start time 09:00:00, End date 2026-09-29, End time 17:30:00 gives Duration 2 days, 8 hours, 30 minutes, Total hours 56.5, Total minutes 3,390, Total seconds 203,400, Total days 2.354167.Source: hand calculation in content.mdx: 2 days + 8 h 30 min = 203,400 s
  2. Start date 2026-12-31, Start time 23:59:30, End date 2027-01-01, End time 00:00:15 gives Duration 45 seconds, Total seconds 45, Total minutes 0.75.Source: hand calculation in content.mdx: 30 s to midnight plus 15 s
  3. Start date 2024-02-28, Start time 12:00:00, End date 2024-03-01, End time 12:00:00 gives Duration 2 days, Total hours 48.Source: hand calculation in content.mdx: February 28 to March 1, 2024 is 2 days
  4. Start date 2026-03-08, Start time 01:00:00, End date 2026-03-08, End time 03:00:00 gives Total hours 2.Source: hand calculation in content.mdx: 3:00 − 1:00 on a 24-hour clock is 2 hours

How it works

Each date and time becomes a count of seconds on one timeline:

instant = (days since January 1, 1970) × 86,400 + hours × 3,600 + minutes × 60 + seconds

The duration is the end instant minus the start instant, in seconds. It is then split into parts:

  • days = seconds ÷ 86,400, rounded down
  • hours = what is left ÷ 3,600, rounded down
  • minutes = what is left ÷ 60, rounded down
  • seconds = what is left

The totals are seconds ÷ 3,600 (hours), seconds ÷ 60 (minutes), and seconds ÷ 86,400 (days).

Assumptions

  • The same start and end show 0 seconds (0 hours) and no days-hours-minutes line. Results are not bounded beyond the 1600 to 2400 input dates.
  • Every day has exactly 24 hours. Daylight saving changes and leap seconds are not counted, and both times are in the same time zone.
  • Dates follow the Gregorian calendar with its leap year rule, from 1600 to 2400.
  • An end before the start gives no answer. The same date and time gives 0 seconds.

Worked examples by hand

9:00:00 AM, September 27, 2026 to 5:30:00 PM, September 29, 2026. The dates are 2 days apart, and 17:30 − 9:00 = 8 hours 30 minutes. In seconds: 2 × 86,400 + 8 × 3,600 + 30 × 60 = 172,800 + 28,800 + 1,800 = 203,400 seconds. That is 2 days, 8 hours, 30 minutes, 203,400 ÷ 3,600 = 56.5 hours, 3,390 minutes, or 2.3542 days.

11:59:30 PM, December 31, 2026 to 12:00:15 AM, January 1, 2027. 30 seconds to midnight, then 15 seconds: 45 seconds, or 0.75 minutes.

Noon, February 28, 2024 to noon, March 1, 2024. 2024 is a leap year (divisible by 4, not a century year), so February 29 is between them: 2 days, or 48 hours.

1:00 AM to 3:00 AM on March 8, 2026. On a 24-hour clock this is 2 hours. That night US clocks jump from 2:00 AM to 3:00 AM, so only 1 hour really passes; the calculator does not know your time zone and counts clock time.

Other questions people ask

How do I calculate the time between two dates and times?

Turn both into seconds from one fixed point, subtract, and split the result into days, hours, minutes, and seconds. From 9:00 AM on September 27 to 5:30 PM on September 29 is 2 days plus 8 hours 30 minutes: 2 × 86,400 + 8 × 3,600 + 30 × 60 = 203,400 seconds, or 56.5 hours.

How do I subtract times with seconds by hand?

Work from the right and borrow like in long subtraction: 60 seconds from the minutes, 60 minutes from the hours, 24 hours from the days. From 23:59:30 to 00:00:15 the next day: 15 − 30 needs a borrow, giving 45 seconds and a total of 45 seconds.

Does it count leap years?

Yes. Dates follow the Gregorian calendar: a year divisible by 4 is a leap year, except years divisible by 100 that are not divisible by 400. From noon on February 28, 2024 to noon on March 1, 2024 is 2 days, because 2024 has a February 29.

Does daylight saving time change the answer?

No. The calculator counts every day as 24 hours of clock time, with no time zone. On the night US clocks spring forward (March 8, 2026), 1:00 AM to 3:00 AM shows 2 hours, although only 1 hour passes. Adjust by an hour yourself if the period crosses a clock change.

What is the difference between this and the hours calculator?

The hours calculator takes two times on the same or the next day and gives decimal hours for timesheets. This page takes a date with each time, so it handles any span, and it counts seconds.

What if the end is before the start?

There is no answer, and the page says so. Swap the two, or fix the date.