Free Online Time Calculator

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.

Live
End time is next dayTurn on for an overnight or full-day span.

No signup · No data upload · Free calculator

Your Result
8 hrs 15 mins
8.25Decimal Hours
495Total Minutes
29,700Total Seconds

Same-day time difference

Start9:30 AM
End5:45 PM
Crosses MidnightNo
Duration8h 15m
Try:

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.

  1. Enter the start time. Choose the hour and minutes when the period began, taking care to pick AM or PM correctly.
  2. 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.
  3. 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.
  4. Press Calculate, or watch it update. The result appears automatically as you change a time, and the Calculate button refreshes it as well.
  5. 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.
  6. 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.

StartEndResultDecimalTotal minutes
10:00 PM6:00 AM next day8h 00m8.00480 minutes
9:00 AM5:30 PM same day8h 30m8.50510 minutes
7:45 AM12:15 PM same day4h 30m4.50270 minutes
11:30 PM2:15 AM next day2h 45m2.75165 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.

Scroll to Top