Hours Calculator

How many hours between two times? Works overnight, 12h or 24h, several spans per day, minus breaks.

点击时间输入框会弹出浏览器的时间选择器,无需手动输入;跨零夜班自动处理。

开始结束休息(分钟)工时
总工时
0h 00m 0.00
总休息
0 min
时间段数
1

Hours between two times — the manual way

Convert both times to 24-hour, subtract, borrow across midnight if needed. 8:30 AM → 5:15 PM: 17:15 − 8:30 = 8 h 45 m; minus a 45-minute lunch = 8:00. That subtraction, with AM/PM parsing and midnight rollover, is what this calculator automates — for one span or ten.

Why decimal hours matter

Payroll multiplies rate by decimal hours: 7:45 becomes 7.75, not 7.45. Both are shown side by side so you never paste the wrong one into a payroll system.

Frequently asked questions

How do I calculate hours between two times?
Subtract the start from the end. If the end is earlier, the span crossed midnight: 9:00 PM → 5:00 AM is 8 hours. Enter both times above and the calculator handles midnight, AM/PM or 24-hour input, and unpaid breaks.
Can I add up several time spans?
Yes — use “Add another time span” for each segment (morning shift, evening shift, second job). Totals add up in h:mm and decimal.
What about a lunch break?
Either enter the break as its own span and skip it, or use the break field to subtract minutes from the total.
How do I get decimal hours?
Divide minutes by 60: 7 h 45 m = 7.75. The result panel shows decimal next to h:mm automatically.