Article — Hours Between Two Times
The hours between two times equals the difference of the two clock readings expressed in minutes, divided by 60. For a 09:00 start and a 17:30 end on the same day, that is (17 × 60 + 30) − (9 × 60) = 510 minutes, or 8 hours 30 minutes. The arithmetic is unchanged whether the times are written in 24-hour form or in 12-hour AM/PM — only the conversion to a common scale shifts. The two cases that trip people up are spans that cross midnight (the end-minute count looks smaller than the start) and intervals that include unpaid breaks. Both are handled by adding or subtracting fixed counts of minutes before the final hours-and-minutes split.
This guide covers the formula, the midnight wrap-around, the difference between 12-hour and 24-hour time, how to report results in decimal hours for U.S. payroll, and the small set of mistakes that produce surprising results — with examples drawn from working time, sleep tracking, cooking, and travel.
The basics of hours between two times
Clock time is a position, not an interval. "10:00" by itself is a moment; "from 10:00 to 13:30" is an interval of 3 hours 30 minutes. The interval calculation is always done by converting both endpoints to a common scale, subtracting, and converting the result back.
The cleanest scale is minutes-since-midnight. A 24-hour clock reading of 14:30 becomes 14 × 60 + 30 = 870 minutes. A reading of 09:15 becomes 555. The difference is 315 minutes, which converts back to 5 hours 15 minutes via integer division by 60 (315 ÷ 60 = 5 with remainder 15). The same minute scale works for any pair of times in the 0–1439 range.
The hour itself is not a fundamental physical unit. The International System of Units (SI) defines only the second; the hour is a derived unit equal to 3,600 seconds, by international agreement under ISO 8601. The 60-minute hour is a Babylonian inheritance — their base-60 number system survives in time and angles, although it was abandoned almost everywhere else.
Overnight: hours between two times that cross midnight
When the end time looks smaller than the start — a night shift that runs 22:00 to 06:00, a sleep span from 23:30 to 07:00 — the naive subtraction returns a negative number. Fix the result by adding 1,440 minutes (24 hours) to lift the end onto the next day. For 22:00 to 06:00: end = 360, start = 1320, raw difference = −960, corrected = −960 + 1440 = 480 minutes = 8 hours.
The U.S. Bureau of Labor Statistics defines a night shift as work performed mostly between 6:00 PM and 6:00 AM. About 16% of full-time U.S. wage and salary workers worked an alternative schedule in 2023 — evening, night, or rotating — according to the BLS American Time Use Survey, so the overnight case is far from rare.
If the end is more than 24 hours after the start, the same-day or "crosses midnight" toggles give the wrong answer — both assume one day or less. Switch to "Custom dates" and pick the actual start and end date. The calculator then multiplies the day gap by 1,440 minutes before adding the clock difference.
12-hour and 24-hour time formats
The two formats represent the same instants in time using different labels. The 24-hour clock counts 0 through 23 in a single run from one midnight to the next. The 12-hour clock counts 1 through 12 twice, marking the morning half with AM (Latin ante meridiem, "before midday") and the afternoon half with PM (post meridiem).
The conversion is mechanical for most of the day — 1:00 PM is 13:00, 6:00 PM is 18:00, and so on by adding 12. The two endpoints that catch people out are noon and midnight. 12:00 AM is midnight (00:00 on the 24-hour clock); 12:00 PM is noon (12:00). The naming is counter-intuitive: 12 AM is not "morning AM" rising into 1 AM, but rather the start of the AM block at the top of the clock.
- 12:00 AM — midnight, 00:00 in 24-hour form (start of day)
- 12:30 AM — half past midnight, 00:30
- 11:59 AM — last minute of morning, 11:59
- 12:00 PM — noon, 12:00 (midday)
- 12:30 PM — half past noon, 12:30
- 11:59 PM — last minute of day, 23:59
Most of Europe, Asia, the military worldwide, aviation, and ISO 8601 use the 24-hour clock for unambiguity. The United States, Canada, the United Kingdom in everyday speech, Australia, and parts of Latin America default to 12-hour AM/PM in conversation but use 24-hour in transport schedules, science, and computing.
Decimal hours for payroll and invoicing
"8 hours 30 minutes" is awkward to multiply by a wage rate. Payroll systems, timesheets, freelance billing software, and most spreadsheets prefer decimal hours: 8.5 for 8 h 30 m, 8.25 for 8 h 15 m, 7.75 for 7 h 45 m. The conversion is exact — minutes divided by 60.
The U.S. Fair Labor Standards Act requires non-exempt employees to be paid for "all hours worked", with overtime at 1.5 times the regular rate above 40 hours per week. Tracking with decimal hours avoids the rounding errors that creep in when a clerk converts "8 h 17 m" mentally; a payroll engine multiplying 8.283 by an hourly wage gets the exact answer.
U.S. Department of Labor regulations allow rounding of clock-in / clock-out times to the nearest quarter hour (15 minutes), but only if the rounding averages out fairly over time and does not systematically reduce employee pay. Rounding every entry down ("always round to the previous quarter") is a violation; an audit can claw back years of underpayment.
Subtracting breaks from hours between two times
Workplace hours often include unpaid breaks — a 30-minute lunch, a couple of 10-minute coffee breaks. The total paid time is the clock difference minus the break minutes. A shift from 09:00 to 17:30 with a 30-minute lunch is 510 − 30 = 480 minutes paid, or exactly 8 hours.
U.S. federal law (FLSA) does not require employers to provide breaks, but it does specify how breaks are paid when offered. Short breaks (5–20 minutes) are considered compensable work time. Meal periods of 30 minutes or longer are not, provided the employee is fully relieved of duty. Several states — California, New York, Illinois — layer their own break requirements on top of federal rules.
If you eat at your desk while continuing to answer emails or take calls, the time counts as work under FLSA — even if HR has scheduled it as an unpaid meal period. The standard is whether the employee is "completely relieved from duty", not what the timesheet says.
Common mistakes when counting hours
The simple arithmetic produces wrong answers in four predictable ways. Confusing 12:00 AM with 12:00 PM swaps midnight and noon, a 12-hour error. Forgetting that an overnight shift wraps around midnight gives a negative or absurdly large number. Mixing AM/PM and 24-hour values in the same calculation — subtracting 17:00 from 5:00 PM — gives 0 instead of 12. Treating an interval that crosses Daylight Saving Time as a clean clock subtraction misses the lost or gained hour.
On the spring-forward day, the local clock jumps from 02:00 directly to 03:00 — that day has only 23 hours. On the fall-back day, 02:00 happens twice and the day has 25 hours. A shift that crosses the change point will be either an hour longer or shorter than the clock difference suggests. Payroll software handles this automatically only if it stores timestamps in UTC; if it stores local clock time, manual correction is needed.