Calculate Hours Between Two Times
Enter a start time and an end time and get the exact hours between them — in decimal hours for payroll, plus hours & minutes, total minutes and seconds. Overnight shifts are handled automatically.
Overnight Ready
Handles shifts and time periods that cross midnight.
Decimal Hours
Ready to paste into a timesheet, payroll sheet or invoice.
Instant Result
Calculation runs directly inside your browser — nothing is uploaded.
Calculate Time Difference
Enter start and end time.
No signup · No data upload · Free calculator
Same-day time difference
| Start | 9:30 AM |
|---|---|
| End | 5:45 PM |
| Crosses Midnight | No |
| Duration | 8h 15m |
More Time Calculators
Twenty focused tools — pick the one that matches your question.
Time Difference Calculator
Difference between two clock times, in hours and minutes.
Time Duration Calculator
Exact elapsed time between two dates and times.
Decimal Hours Calculator
Hours and minutes to decimal hours for payroll, and back.
Work Hours Calculator
A full week of hours with overtime and gross pay.
Overtime Calculator
Split weekly hours into regular and overtime pay.
Time Card Calculator
Total a week of clock-ins into hours and pay.
Add Time Calculator
Add hours, minutes and seconds to any time.
Subtract Time Calculator
Subtract one time from another, step by step.
Minutes Calculator
Minutes between two times, plus minutes to hours.
Hours Adder Calculator
Add a list of durations together.
Days Between Dates Calculator
Days, weeks and weekdays between two dates.
Time Zone Difference Calculator
How far apart two time zones are.
Meeting Time Zone Planner
Find a meeting time that works across zones.
Flight Duration Calculator
Flight time from the times printed on a ticket.
Stopwatch
A big on-screen stopwatch with lap times.
Countdown Timer
Countdown with a progress bar and a finish beep.
Shift Length Calculator
Paid length of one shift after breaks.
Military Time Converter
24-hour military time and 12-hour AM/PM, both ways.
Sleep Duration Calculator
How long you slept, and how many sleep cycles that is.
Date Countdown Calculator
Days, hours and minutes until any date.
Working out how many hours passed between two times sounds simple, yet it trips up almost everyone when the period crosses midnight or needs to be turned into a decimal for a timesheet. This free tool does the maths in seconds. Enter a start time and an end time, say whether the end time falls on the next day, and you will see the result as hours and minutes, as a decimal number of hours, as total minutes, and as total seconds.
It is built for everyday use. A nurse finishing a night shift can check the shift length before filling in a rota. A freelancer can turn start and finish times into billable hours. A parent can work out how long a child slept, a student can measure a study session, and a manager can check a shift before approving overtime.
How to Use
Using the calculator takes less than a minute. Follow the steps below for an accurate result on the first try.
- Enter the start time. Choose the hour and minutes when the period began, taking care to pick AM or PM correctly.
- Enter the end time. Choose the hour and minutes when the period ended, whether that was the end of work, waking up, or arriving somewhere.
- Tick the next-day box if needed. If the end time is after midnight and the start was before midnight, tick End time is next day. Use it for any overnight period, such as 10:00 PM to 6:00 AM.
- Press Calculate, or watch it update. The result appears automatically as you change a time, and the Calculate button refreshes it as well.
- Read all four results. The main result shows hours and minutes. Below it are the decimal hours, total minutes, and total seconds, so you can copy the form your timesheet or log needs.
- Check the result against common sense. A same-day period cannot exceed 24 hours. If the figure looks surprising, re-check AM and PM and the next-day setting.
Formula
The calculation is a subtraction, with one adjustment for periods that cross midnight. First, convert both times to minutes counted from midnight. A time of 10:00 PM becomes 22 times 60, which is 1,320 minutes. A time of 6:00 AM becomes 6 times 60, which is 360 minutes. The rule is: difference in minutes equals end minutes minus start minutes, plus 1,440 minutes if the end time is on the next day.
Once you have the difference in minutes, the other forms follow easily. Whole hours are the difference divided by 60 and rounded down, remaining minutes are the remainder after dividing by 60, decimal hours are the difference divided by 60, and total seconds are the difference multiplied by 60. For the night-shift example, 360 minus 1,320 is negative 960, plus 1,440 gives 480 minutes. 480 minutes is 8 hours exactly.
Worked Examples
The table below shows four checked examples. Each one was worked out by converting both times to minutes from midnight, subtracting, adding 1,440 minutes where the period crosses midnight, and converting the result back into hours and minutes and a decimal.
| Start | End | Result | Decimal | Total minutes |
|---|---|---|---|---|
| 10:00 PM | 6:00 AM next day | 8h 00m | 8.00 | 480 minutes |
| 9:00 AM | 5:30 PM same day | 8h 30m | 8.50 | 510 minutes |
| 7:45 AM | 12:15 PM same day | 4h 30m | 4.50 | 270 minutes |
| 11:30 PM | 2:15 AM next day | 2h 45m | 2.75 | 165 minutes |
The first row is the classic overnight shift: 10:00 PM to 6:00 AM is 480 minutes, or eight hours exactly.
Common Uses
People reach for an hours-between-times calculator in far more situations than payroll alone. Here are the most common ones.
- Work shifts and timesheets: turn clock-in and clock-out times into hours and decimal hours for pay and overtime checks, including night shifts.
- Freelance and contract billing: convert time spent on a task into billable hours, then multiply by an hourly rate.
- Sleep tracking: work out how long you slept from bedtime to waking time, which almost always crosses midnight.
- Study and practice sessions: measure focused work in minutes and hours and compare days fairly.
- Travel and appointments: check journey length, waiting time between connections, and time remaining before a meeting or flight.
- Exercise and cooking: time a run, a workout, or a slow-cooked meal, where the difference between two clock times is more useful than a stopwatch alone.
Frequently Asked Questions
How do I calculate hours between two times that cross midnight?
Add 24 hours to the end time before subtracting. For 10:00 PM to 6:00 AM, the working is 360 minus 1,320 plus 1,440, which equals 480 minutes, or 8 hours. Tick the next-day box and the calculator applies this step for you.
What is 8 hours in decimal form?
Eight hours exactly is 8.00 in decimal form. Decimal hours are total minutes divided by 60, so 480 minutes divided by 60 is 8.00, 510 minutes is 8.50, and 495 minutes is 8.25.
Why does my result look wrong when I enter PM times?
The usual cause is mixing up AM and PM, or forgetting the next-day box for overnight periods.
Can I use this for minutes and seconds as well?
Yes. The result shows total minutes and total seconds alongside hours and minutes and decimal hours. Total seconds are simply total minutes multiplied by 60.
Does the calculator account for breaks?
No, it measures the full elapsed time between the two clock times you enter. If you took a 30-minute unpaid break, subtract it afterwards, or calculate the periods before and after the break separately and add them together.