Hour Calculator
Calculate the duration between two times or dates in hours and minutes.
Calculate Hours Between Two Times
Calculate Hours Between Two Dates
About Hour Calculator
The Hour Calculator finds the exact duration between two time points and expresses it in hours and minutes, plus a decimal hours figure for use in payroll, invoicing, or spreadsheets. It has two dedicated sections: a time-only mode for same-day spans (09:00 to 17:30, for example) and a full date-and-time mode for multi-day gaps such as a shift that spans a calendar rollover or a project that runs across several weeks.
The time-only section is particularly useful for shift workers and freelancers who clock in and out on the same day. If the end time you enter is earlier than the start time, the calculator automatically assumes the shift crosses midnight and adds 24 hours — so entering 22:00 to 06:30 correctly returns 8 hours 30 minutes instead of a confusing negative number. The date-and-time section accepts any two date-and-time pairs, regardless of how far apart they are, and returns the duration in days, hours, minutes, and a combined decimal-hours total.
Every calculation runs entirely in your browser using the built-in JavaScript Date API. No times or dates are sent to any server, stored, or logged. The tool works fully offline once the page loads, and there is no sign-up, no fee, and no limit on how many calculations you run.
Key Features
Midnight-crossing shift support
In time-only mode, if the end time is earlier than the start time the calculator automatically wraps past midnight, so overnight shifts like 22:00 to 06:00 return the correct 8-hour result without any manual adjustment.
Decimal hours output
Each result shows both a human-readable breakdown (e.g. 7 hours 45 minutes) and a decimal figure (7.75 hours) ready to paste into a payroll spreadsheet, invoice, or billing system.
Multi-day date-and-time mode
The second section accepts full date-and-time pairs, so you can calculate the exact duration between any two moments — even weeks or months apart — and get the result expressed in days, hours, and minutes.
100% client-side calculation
All arithmetic runs locally in your browser using the JavaScript Date API. Nothing is uploaded or sent to a server, so sensitive shift records, payroll data, or project timelines stay on your device.
Instant results on click
Hit the Calculate button and the result appears immediately. Each section has its own Clear button so you can reset one calculation without disturbing the other.
No sign-up or cost
The tool is completely free with no account required. Run as many calculations as you need — there are no rate limits or paywalls.
How to Use
Enter Times
Input a start time and end time, or use the date-and-time mode for calculations spanning multiple days.
Calculate
Click Calculate to see the duration in hours and minutes.
Copy or Reset
Use the result for your needs, or click Clear to start a new calculation.
Example
Enter a start time of 08:45 and an end time of 17:15 in the time-only section. The calculator returns the duration in hours and minutes along with a decimal total ready for a timesheet.
Start Time: 08:45
End Time: 17:15 Duration: 8 hours 30 minutes
Decimal: 8.50 hours Common Use Cases
- arrow_circle_right
Timesheet and payroll entry
Employees and contractors who track billable time by the hour can enter clock-in and clock-out times to get the decimal figure (e.g. 7.75 hours) that payroll software and invoicing tools expect, avoiding manual fraction arithmetic.
- arrow_circle_right
Overnight and rotating shift work
Nurses, security staff, and logistics workers whose shifts cross midnight benefit from the automatic next-day wrap. Entering a night shift like 22:30 to 06:00 produces the correct 7 hours 30 minutes instead of a negative value.
- arrow_circle_right
Freelance project billing
Designers, developers, and consultants billing hourly can total each work session quickly, then add sessions across a week to confirm the total hours to invoice — without opening a spreadsheet.
- arrow_circle_right
Multi-day project duration
Project managers who need to know the exact elapsed time between a kick-off meeting and a delivery deadline — spanning days or weeks — can use the date-and-time mode to get a precise hours figure rather than a rough day estimate.
- arrow_circle_right
Event timing and scheduling
Organisers calculating how long a conference, workshop, or travel itinerary runs from start to finish can measure the span precisely and confirm it fits within venue or transport constraints.