Time Duration Calculator

Find how much time passes between two dates and times, or add or subtract a number of days, hours, minutes and seconds.

What do you want to do?
Start

End

Calendar dates and clock times only. Daylight saving and time zones are not applied.

Duration

—

Enter your numbers to see the result.

How the duration is calculated

Each date-time becomes a count of seconds: whole days since a fixed date times 86,400, plus the seconds since midnight. The duration is the difference. Days, hours, minutes and seconds come from dividing that total.

Duration (s) = (End day × 86,400 + End time) − (Start day × 86,400 + Start time)

Days = ⌊s ÷ 86,400⌋, then hours, minutes and seconds from what is left. Totals: days = s ÷ 86,400, hours = s ÷ 3,600, minutes = s ÷ 60.

Example: time between two date-times

From 2026-02-27 21:30:00 to 2026-03-02 08:15:30.

  1. February 27 at 21:30:00 to March 1 at 21:30:00 is 2 days (2026 is not a leap year, so February has 28 days).
  2. March 1 at 21:30:00 to March 2 at 08:15:30 is 10 hours 45 minutes 30 seconds.
  3. Total: 2 days 10 hours 45 minutes 30 seconds = 211,530 seconds.

Example: adding time

Start 2026-12-30 18:00:00, add 1 day 12 hours 30 minutes.

  1. + 1 day: 2026-12-31 18:00:00
  2. + 12 hours 30 minutes: 2027-01-01 06:30:00
  3. Result: Friday, 2027-01-01 at 06:30:00

Example: subtracting time across a leap day

Start 2028-03-01 09:00:00, subtract 1 day 10 hours.

  1. − 1 day: 2028-02-29 09:00:00 (2028 is a leap year, so February 29 exists)
  2. − 10 hours: 2028-02-28 23:00:00
  3. Result: Monday, 2028-02-28 at 23:00:00

Questions

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

Enter the start and end date and time. The calculator counts the seconds between them and splits the total into days, hours, minutes and seconds, and also shows the whole span in days, hours, minutes and seconds.

What if the end is before the start?

It shows the size of the gap and says the end comes first. To go backwards from a date-time, use the add or subtract option and choose subtract.

How do I add or subtract time from a date?

Choose “Add or subtract”, enter the start, pick add or subtract, and give the days, hours, minutes and seconds. The direction is shown in the result.

Does it handle time zones or daylight saving?

No. It uses plain calendar dates and clock times, and counts every day as exactly 24 hours. If the clocks change between your two times, adjust by an hour yourself.

How is this different from the hours calculator?

The hours calculator works on times within a shift, with a break and overnight handling. This one works on any two date-times, even years apart.

For whole days, months or years, which should I use?

Use the date difference calculator for years, months and days between calendar dates.

Last updated .