Time Duration Calculator
Two times in — hours and minutes, decimal hours for payroll, and total minutes out.
Enter a start and end time to get the exact duration between them: 9:00 AM to 5:30 PM is 8 h 30 m — 8.5 decimal hours, 510 minutes. Overnight is automatic: when the end time is earlier on the clock, it's counted into the next day, so 10:00 PM to 6:00 AM is 8 hours. Switch between 12-hour AM/PM and 24-hour entry, add calendar dates at Standard for a full days/hours/minutes difference, add or subtract a duration at Detailed (9:00 AM + 7 h 45 m = 4:45 PM), or fill the Advanced weekly timesheet with breaks for a payroll-ready total.
Exact arithmetic — durations are computed in whole minutes, never estimated. Decimal hours are rounded only for display (2 places).
How to count the hours between two times
Minutes since midnight, then subtract
Every clock time can be written as minutes since midnight: multiply the hour (on the 24-hour clock) by 60 and add the minutes. 9:00 AM is 9 × 60 = 540; 5:30 PM is 17 × 60 + 30 = 1,050. The duration is the difference: 1,050 − 540 = 510 minutes, and 510 ÷ 60 = 8 remainder 30, so the answer is 8 h 30 m.
The overnight rule: end before start means add 24 hours
If the subtraction comes out negative, the end time belongs to the next day — add one full day (1,440 minutes). For a 10:00 PM to 6:00 AM shift: 360 − 1,320 = −960, and −960 + 1,440 = 480 minutes = 8 hours. That single rule handles every overnight shift, red-eye flight and closing-to-opening gap without you touching a date field.
| From → to | Duration | Decimal hours | Total minutes |
|---|---|---|---|
| 9:00 AM → 5:30 PM | 8 h 30 m | 8.5 | 510 |
| 8:15 AM → 4:45 PM | 8 h 30 m | 8.5 | 510 |
| 10:00 PM → 6:00 AM | 8 h 0 m | 8.0 | 480 |
| 11:30 PM → 7:15 AM | 7 h 45 m | 7.75 | 465 |
| 12:00 PM → 12:00 AM | 12 h 0 m | 12.0 | 720 |
Spanning whole days? Switch to Standard and add calendar dates: the calculator counts the whole days between the dates, then adjusts by the two times of day. July 1, 2026 9:00 AM → July 4, 2026 5:00 PM is 3 days + 8 hours = 3 d 8 h, or 80 hours (4,800 minutes) in total.
Decimal hours for payroll: 7:45 = 7.75
Minutes are sixtieths, not hundredths
Payroll multiplies hours by an hourly rate, so it needs time as one decimal number. The conversion is minutes ÷ 60: 45 minutes is 45 ÷ 60 = 0.75, so 7 hours 45 minutes is 7.75 decimal hours — and 7.75 × $20/hour is exactly $155. Typing 7:45 as 7.45 is the classic timesheet error: 0.45 × 60 = 27, so 7.45 really means 7 h 27 m and quietly drops 18 minutes of pay.
| Minutes | Exact decimal | Payroll (2 dp) |
|---|---|---|
| 6 | 0.10 | 0.10 |
| 12 | 0.20 | 0.20 |
| 15 | 0.25 | 0.25 |
| 20 | 0.333… | 0.33 |
| 30 | 0.50 | 0.50 |
| 40 | 0.666… | 0.67 |
| 45 | 0.75 | 0.75 |
| 48 | 0.80 | 0.80 |
| 54 | 0.90 | 0.90 |
A worked pay week
A week of 38 h 45 m converts to 38.75 decimal hours; at $20/hour that's 38.75 × $20 = $775.00 exactly. The mental anchor that makes all of this fast: every 6 minutes is exactly 0.1 hours — so 12 minutes is 0.2, 24 is 0.4 and 48 is 0.8 without any long division.
Rounding on real timesheets. US employers may lawfully round punch times, most commonly to the nearest quarter hour — with the convention that 1–7 minutes past the quarter round down and 8 or more round up — as long as the rounding averages out fairly over time. This calculator never rounds your inputs; it shows the exact duration and lets the payroll system do any rounding.
Weekly timesheets, breaks and the 40-hour week
Each day: end − start − unpaid break
A 9:00 AM to 5:30 PM day is 8 h 30 m on the clock; subtract a 30-minute unpaid lunch and the paid day is 8 hours. Five of those make the classic 40-hour week. The Advanced timesheet on this page does exactly that arithmetic for up to 7 rows — overnight rows included, so 11:00 PM to 7:00 AM with a 30-minute break is 8 h − 30 m = 7 h 30 m.
Paid and unpaid breaks
Under US federal practice, short breaks of roughly 5–20 minutes are ordinarily counted as paid work time, while bona fide meal periods — typically 30 minutes or more, with the employee fully relieved of duty — may be unpaid. Only unpaid time belongs in the break column: if your lunch is paid, leave the break at 0 and your total is simply end − start.
Over 40 hours: overtime
For non-exempt employees, hours over 40 in a workweek are overtime at time-and-a-half. A 44-hour week at $18/hour pays 40 × $18 + 4 × $27 = $720 + $108 = $828. The timesheet flags any hours over 40 so you can price them separately — then the Paycheck Calculator can take the gross figure through taxes.
| Day | Start → end | Break | Paid hours |
|---|---|---|---|
| Mon–Fri (each) | 9:00 AM → 5:30 PM | 30 m | 8 h 0 m (8.00) |
| Weekly total | 5 days | 2 h 30 m total | 40 h 0 m (40.00) |
| Night shift | 11:00 PM → 7:00 AM | 30 m | 7 h 30 m (7.50) |
12-hour vs 24-hour time (and where midnight lives)
Same clock, two notations
The 12-hour clock counts 1–12 twice, tagged AM (ante meridiem, before noon) and PM (post meridiem, after noon); the 24-hour clock counts 0–23 straight through. Converting is one addition: for PM times other than 12 PM, add 12 to the hour — 5:30 PM becomes 17:30. Morning times keep their number: 9:00 AM is 09:00.
| 12-hour | 24-hour | Note |
|---|---|---|
| 12:00 AM | 00:00 | midnight — start of the day |
| 6:00 AM | 06:00 | morning hours keep their number |
| 12:00 PM | 12:00 | noon |
| 1:00 PM | 13:00 | afternoon: add 12 |
| 5:30 PM | 17:30 | the everyday conversion |
| 11:59 PM | 23:59 | last minute of the day |
The 12 o'clock trap
The hour after midnight runs 12:00 AM → 12:59 AM (00:00 → 00:59), and the hour after noon runs 12:00 PM → 12:59 PM (12:00 → 12:59) — the "12" behaves like a 0. NIST notes that AM/PM labels are technically ambiguous at exactly 12:00, which is why airlines and contracts often write 11:59 PM or 12:01 AM instead. Military time is the 24-hour clock without the colon: 5:30 PM is 1730 ("seventeen thirty").
❓ Frequently asked Frequently asked questions
How do I calculate the number of hours between two times?
Convert each time to minutes since midnight, subtract, then divide by 60. 8:15 AM is 8 × 60 + 15 = 495 minutes and 4:45 PM is 16 × 60 + 45 = 1,005 minutes; the difference is 510 minutes, and 510 ÷ 60 = 8 remainder 30, so 8:15 AM to 4:45 PM is 8 hours 30 minutes (8.5 decimal hours). If the subtraction comes out negative, the end time is on the next day — add 24 hours (1,440 minutes). That one rule is all the calculator needs to handle any pair of times, overnight shifts included.
How many hours is an overnight shift like 10 PM to 6 AM?
8 hours. In minutes since midnight, 10:00 PM is 1,320 and 6:00 AM is 360; the raw difference is 360 − 1,320 = −960, and adding one day (1,440 minutes) gives 480 minutes = 8 hours. Whenever the end time is earlier on the clock than the start, the calculator assumes the duration crosses midnight and adds 24 hours automatically. An 11:30 PM to 7:15 AM shift works out the same way: −975 + 1,440 = 465 minutes = 7 hours 45 minutes.
How do I convert 7:45 to decimal hours for payroll?
Divide the minutes by 60: 45 ÷ 60 = 0.75, so 7 hours 45 minutes is 7.75 decimal hours. Payroll systems multiply decimal hours by the hourly rate — 7.75 hours at $20/hour is exactly $155. The classic mistake is reading 7:45 as 7.45; that would be 7 hours 27 minutes (0.45 × 60 = 27) and shortchanges the timesheet by 18 minutes. Minutes are sixtieths of an hour, not hundredths.
What is the minutes-to-decimal-hours conversion table?
Divide minutes by 60. The exact anchors: 6 minutes = 0.10, 12 = 0.20, 15 = 0.25, 30 = 0.50, 45 = 0.75, 48 = 0.80 and 54 = 0.90. Some values repeat forever — 20 minutes is 0.333… and 40 minutes is 0.667 — and payroll systems usually record those to two decimals as 0.33 and 0.67. The quickest mental anchor is that every 6 minutes is exactly 0.1 hours.
What is the difference between 12-hour and 24-hour time?
They are the same clock in two notations. The 12-hour clock counts 1–12 twice with AM (before noon) and PM (after noon); the 24-hour clock counts 0–23 straight through. To convert a PM time other than 12 PM, add 12 to the hour: 5:30 PM = 17:30. Morning times keep their number: 9:00 AM = 09:00. The special cases are 12:00 AM (midnight) = 00:00 and 12:00 PM (noon) = 12:00. Military time is the 24-hour clock written without a colon, so 5:30 PM is 1730. The clock-format switch on this calculator converts every displayed time between the two.
How do I subtract a lunch break from my hours worked?
Work out end minus start, then subtract the unpaid break minutes. A 9:00 AM to 5:00 PM day is 8 hours; take off a 30-minute unpaid lunch and you're paid for 7 hours 30 minutes = 7.5 decimal hours. Under US federal practice, bona fide meal periods (typically 30 minutes or more, fully relieved of duty) may be unpaid, while short breaks of about 5 to 20 minutes are ordinarily counted as paid work time. The break column in the Advanced timesheet subtracts unpaid minutes day by day.
How do I add or subtract hours and minutes from a time?
Convert to minutes, add or subtract, then convert back. 9:00 AM is 540 minutes; adding 7 h 45 m (465 minutes) gives 1,005 minutes = 4:45 PM the same day. If the total passes 1,440 minutes you've rolled into the next day: 8:00 PM + 10 hours = 6:00 AM the next day. Subtraction mirrors it — 6:00 AM − 8 hours = 10:00 PM the previous day. The Detailed level applies any duration to your start time and labels the day shift for you.
How do I find the days, hours and minutes between two dates?
Count the whole days between the calendar dates, then adjust by the two times of day. From July 1, 2026 at 9:00 AM to July 4, 2026 at 5:00 PM: the dates are 3 days apart, and 9:00 AM to 5:00 PM adds another 8 hours, giving 3 days 8 hours — 80 hours or 4,800 minutes in total. Enter both dates at the Standard level and the calculator does the full days/hours/minutes breakdown, including totals in hours, minutes and decimal days.
Why do timesheets use decimal hours instead of hours and minutes?
Because pay is a multiplication: hours × rate only works when hours is a single decimal number. A week of 38 hours 45 minutes is 38.75 decimal hours, and 38.75 × $20 = $775 exactly — you can't multiply 38:45 by a rate directly. That's why payroll software asks for 38.75, not 38:45. This calculator always shows both forms, and the weekly timesheet totals your week in h:mm and decimal simultaneously.
Is midnight 12 AM or 12 PM?
By near-universal digital convention, midnight is 12:00 AM (00:00 on the 24-hour clock) and noon is 12:00 PM (12:00). Strictly speaking, NIST notes both labels are ambiguous for 12 exactly — AM means ante meridiem (before noon), PM means post meridiem (after noon), and noon itself is neither — which is why timetables often print 11:59 PM or 12:01 AM instead. On this calculator, entering 12:00 AM means 00:00 and 12:00 PM means 12:00, matching how phones and computers display them.
Where these figures come from
Clock arithmetic is standard mathematics — every duration here follows from minutes-since-midnight subtraction and the 1,440-minute day. The conventions referenced above come from these sources:
- Midnight, noon and the 12 AM / 12 PM convention — NIST — Times of Day FAQs.
- The 12-hour clock and AM/PM notation — Wikipedia — 12-hour clock.
- The 24-hour clock and military time — Wikipedia — 24-hour clock.
- Hours worked, paid breaks and meal periods (US) — US Department of Labor — Fact Sheet #22: Hours Worked Under the FLSA.
Last checked: July 2026. The arithmetic never changes; workplace conventions (break rules, timesheet rounding) reflect US federal practice as of this check — state rules can be stricter.
Select the question that matches what you're working on.
The headline is the exact gap between your two times — the same duration is then restated as decimal hours and total minutes, because different jobs need different forms.
8 h 30 m, 8.5 hours and 510 minutes are the same answer. Use h:mm for people, decimal hours for payroll, and minutes when you're adding lots of short intervals.
The calculator always measures from start forward to end. If the end is earlier on the clock, it assumes you crossed midnight — it never returns a negative duration.
When you see "(next day)" beside the end time, the 24-hour rule fired: 10:00 PM → 6:00 AM was read as ending tomorrow morning, giving 8 hours rather than −16.
Three habits prevent nearly every time-math mistake: keep minutes as sixtieths, respect the two twelves, and subtract only unpaid breaks.
The colon form is hours:minutes; the decimal form is hours ÷ fractions of 60. 7:45 = 7.75 in decimal — typing 7.45 silently loses 18 minutes.
12:00 AM is midnight (00:00) and 12:00 PM is noon (12:00). The hour after midnight is 12:xx AM, then 1:xx AM — that's the one place AM/PM intuition breaks.
Take the raw span first, then remove unpaid minutes: 9:00 AM–5:30 PM is 510 minutes; minus a 30-minute lunch leaves 480 minutes = 8 hours. Doing it in decimals invites rounding errors — 30 minutes is exactly 0.5 hours, but a 20-minute break is 0.333…, which payroll clips to 0.33. Whole minutes stay exact.
Shift lengths, pay weeks and "what time will it be" — each has a precision level that answers it fastest.
Simple level: enter start and end, read the h:mm and decimal rows. Overnight shifts need nothing extra — end-before-start is handled.
Advanced level: fill start, end and unpaid break for each day. The weekly total appears in h:mm and payroll decimal, with hours over 40 flagged.
Detailed level: add or subtract any duration from your start time — 9:00 AM + 7 h 45 m = 4:45 PM, with next-day and previous-day labels.
Hours feed straight into pay — these tools take your duration the rest of the way.