Set up the inputs
Between two date-times compares Start date and Start time with End date and End time. Add/subtract a duration works from Base date and Base time, then applies the values in Days, Hours, Minutes, and Seconds. Choose a Time zone in either mode before calculating.
- Select Between two date-times or Add/subtract a duration.
- Enter the dates and times, or enter the duration values and Time zone for that mode.
- Select Calculate elapsed duration or Calculate resulting date-time and check the result table.
- Select Copy result or Download result (.txt) to move the plain-text summary into another document.
Compare two date-times
Select Between two date-times and fill in Start date, Start time, End date, and End time. Choose Time zone, then select Calculate elapsed duration. The calculator turns both wall-clock values into instants in that zone and subtracts the earlier instant from the later one.
Start time: 9:00 AM
End time: 5:30 PM
Elapsed duration: 8 hours, 30 minutes, 0 seconds
If End date and End time describe an earlier instant than the start, the calculator swaps the two instants and records that order in the result. The displayed duration rounds milliseconds to whole seconds.
Apply a duration to a date-time
Select Add/subtract a duration for one date-time. Enter Base date and Base time, choose Add duration or Subtract duration under Operation, fill in Days, Hours, Minutes, and Seconds, choose Time zone, and select Calculate resulting date-time.
Blank duration fields count as zero. Values can be finite, non-negative numbers, including decimals. Negative or non-finite entries produce an error. A duration whose total is zero also produces an error.
How Time zone affects the result
Time zone applies to both date-times in comparison mode and to Base date and Base time in add/subtract mode. The calculator uses the browser's built-in Intl time-zone data and its daylight-saving rules to resolve each wall-clock value.
Repeated or nonexistent local times during a daylight-saving transition are not separately flagged. The browser determines how those values resolve. Each result table records the selected zone and the values used. The comparison table also records calculation order and the earlier and later instants.
Read and save the result
Between two date-times shows Elapsed duration, Total hours (decimal), and Total seconds. Its table also lists decimal days, decimal hours, total minutes, the selected zone, and the calculation order. Add/subtract a duration shows Resulting day, Duration applied, Duration (decimal hours), the base instant, and the resulting date-time.
Copy result creates a plain-text summary. Download result (.txt) saves that summary as a text file. The calculation uses the values and time-zone data in the browser, with no request for the entered values and no external records.
Use the related date and time calculators
For calendar-based date math, start with the Date and Time Calculators category. The Date Difference Calculator breaks two dates into calendar years, months, and days. Use the Date Add Calculator when the amount is days, weeks, months, or years. The Countdown Calculator measures time remaining until, or elapsed since, a target date and time.
Frequently asked questions
How do I calculate elapsed duration between two date-times?
Select Between two date-times, fill in Start date, Start time, End date, End time, and Time zone, then select Calculate elapsed duration. The result gives the elapsed span in days, hours, minutes, and seconds.
Can I add or subtract hours from a date-time?
Select Add/subtract a duration, choose Add duration or Subtract duration under Operation, enter the value in Hours, and select Calculate resulting date-time. Days, Minutes, and Seconds can also be part of the duration.
What happens if the end date-time comes first?
The calculator swaps the two instants for the elapsed-duration calculation and reports that order in the result. The displayed elapsed duration is positive.
Does the time duration calculator use my selected time zone?
The selected Time zone is applied to both comparison values or to the base value in add/subtract mode. Daylight-saving behavior follows the browser's built-in time-zone data.