utility calculator
Hours Between Dates Calculator
Calculate the exact hours, minutes, and days elapsed between two dates and times.
Select Start & End
Calculation Results
Formula
Duration math formula
Elapsed Hours = (End Timestamp - Start Timestamp) / 3,600,000 millisecondsTimestamps are calculated in milliseconds from January 1, 1970 UTC. Subtracting the start from the end yields the difference in milliseconds, which is then divided to return hours and days.
Step by step
How the calculation works
- 1Convert the start date and time into a millisecond timestamp.
- 2Convert the end date and time into a millisecond timestamp.
- 3Subtract the start timestamp from the end timestamp to get total elapsed milliseconds.
- 4Divide total milliseconds by 3,600,000 to find the decimal hours difference.
- 5Solve for days (total hours / 24) and modulo remainders to isolate exact days, hours, and minutes.
Example
Example date range calculation
Calculating hours from Monday Oct 12, 2026 9:00 AM to Thursday Oct 15, 2026 5:00 PM. The elapsed calendar time is exactly 3 days and 8 hours. 3 days × 24 hours/day = 72 hours. Add the remaining 8 hours to get a total of 80.0 elapsed hours.
Related guides
Learn more about this calculation
Guide
Time Calculation: Adding, Subtracting, and Converting Time Units
Calculate time intervals, add and subtract hours and minutes, convert between time units, and solve real-world time calculation problems for work and scheduling.
Guide
Date Arithmetic: Calculating Intervals, Durations, and Deadlines
Calculate date intervals, business days, age from birthdate, project deadlines, and durations between dates. Understand date math for planning and tracking.