Calculate duration between dates and times
From TaskSprig · How results work
Updated
Use a time duration calculator to measure the interval between a start date and time and an end date and time. Our calculator shows calendar months, remaining days, hours, minutes and seconds, plus totals in days, hours, minutes and exact seconds. It works in your browser without an account or upload.
The calculation uses calendar dates and clock times without a time zone. Each day is treated as 24 hours; daylight-saving changes and leap seconds are not included. Use a time-zone-aware method when actual elapsed time across a clock change matters.
Open the time duration calculator
1. Enter the two endpoints
- Choose a 24-hour clock or a 12-hour clock with AM and PM.
- Enter the start date and time, then the end date and time.
- Include seconds if you need them. In 24-hour format, for example, enter 09:30:15. In 12-hour format, enter 9:30:15 AM.
- Read the result as you type. If an endpoint is missing or invalid, correct its highlighted field before using the result.
For a same-day example, 2 November 2026 at 09:00 to 17:30 is 8 hours and 30 minutes: 8.5 total hours, 510 minutes or 30,600 seconds. Changing the clock format changes how times are shown; it does not change that interval.
2. Calculate an overnight duration
Set the start to 2 November 2026 at 22:00 and the end to 3 November 2026 at 06:00. There are two hours before midnight and six afterward: the result is 8 hours, or 28,800 seconds.
The end date matters. Entering 06:00 on the same date as a 22:00 start produces an error because the end is earlier. Select the following date explicitly. Swap start and end exchanges exactly what you entered; it does not guess an overnight interval.
3. Compare calendar months with total hours
A month has a variable number of days. The calendar result follows real month boundaries; the totals describe the whole interval in fixed units. They are two ways to express the same endpoints.
Choose Try an example in an empty calculator. It fills 15 January 2026 at 09:30:15 through 18 March 2026 at 12:45:20. The result is 2 months, 3 days, 3 hours, 15 minutes and 5 seconds. Its fixed-day equivalent is 62 days, 3 hours, 15 minutes and 5 seconds, or 5,368,505 exact seconds.
Do not multiply the two months by 30 to check it. In this example the first month contributes 31 days, the next contributes 28, and the remaining three days bring the total to 62 before the clock remainder. There is no fixed-length total-month conversion.
4. Check month ends, leap days and the end date
| Start → end | Calendar result | Total hours |
|---|---|---|
| 31 Jan → 28 Feb 2026 | 0 months, 28 days | 672 |
| 28 Feb → 1 Mar 2024 | 0 months, 2 days | 48 |
| 28 Feb → 1 Mar 2026 | 0 months, 1 day | 24 |
The month-end example stays in days because the end has not reached the same day number in the next month. The leap-year example includes 29 February. These are calendar calculations, not a 30-day-month approximation.
The end date is not added as an extra full day. Identical endpoints produce zero; midnight on one date to midnight on the next produces 24 hours. Counting both date labels as inclusive days answers a different question.
5. Copy the result and keep its assumptions
Copy duration includes the endpoints, calendar result, fixed-unit totals and the no-time-zone assumption. Working values are not saved automatically. Use Clear calculation to remove the entered values; the tool asks before clearing them.
This calculator accepts Gregorian dates from 0001-01-01 through 9999-12-31 and whole-second times. It does not subtract lunch breaks, exclude weekends or apply payroll rules. To record work, breaks and report dates, use the Timesheet Calculator.
Read duration input formats and troubleshooting · Calculate your own duration