Hours Calculator

The Hours Calculator computes the total time between a start and an end time, with optional break deduction. Designed for payroll timesheets, shift tracking, freelance billing, and "how long was that meeting?" math. Handles overnight shifts automatically — if the end time is before the start, it wraps to the next day. Output in both H:MM (human-readable) and decimal hours (what most timesheet software wants). 24-hour format and AM/PM both work.

24-hour or HH:MM. End-before-start wraps around midnight.

Total worked
8h 00m
8.00 decimal hours
09:0017:30, minus 30 min break = 8h 00m worked. Decimal hours useful for billing/timesheets: 8.00.

How to use

  1. 1

    Enter the start time. The HTML time picker accepts 24-hour or AM/PM format depending on your OS settings.

  2. 2

    Enter the end time. If your shift goes past midnight, enter the next day's time normally — the calculator detects "end before start" and adds 24 hours.

  3. 3

    Enter break/lunch minutes if any. Leave at 0 for shifts without breaks. 30 is a typical lunch deduction; 60 is the legal lunch in some US states for 8+ hour shifts.

  4. 4

    Read the result: H:MM format on top, decimal hours below. Use decimal hours for invoicing (most billing software wants 8.5 not 8:30); use H:MM for human-readable timesheets.

Frequently asked questions

Ratings & Reviews

Rate this tool

Sign in to rate and review this tool.

Loading reviews…

The math nobody wants to do on a Friday

"I clocked in at 9:15 and out at 5:30 with a 30-minute lunch — how many hours is that?" Mental math at the end of a long day is exactly when you don't want to count on your fingers. The Hours Calculator does it for you: pick the start time, pick the end time, type the break minutes, read the result.

It handles the three cases that trip people up. Shifts that cross midnight (10 PM to 6 AM = 8 hours, not negative 16). Unpaid breaks (clock-in to clock-out is 8.5 hours; the break makes paid hours 8.0). Decimal hours for timesheets (most payroll software wants 7.75, not 7:45). All three are common enough that hand-calculating them once a week adds up to real time spent on arithmetic that should be automatic.

The page works in the browser. Nothing about your shifts gets logged anywhere — useful if you're tracking hours for a side gig you'd rather not have showing up in some analytics dashboard.

How to use the Hours Calculator

  1. Enter the start time using the time picker. Your operating system decides whether to show 24-hour or AM/PM format — both work, the calculator stores the value internally as minutes-since-midnight.
  2. Enter the end time. If your shift ends the next day (graveyard, overnight, on-call), enter the time normally — the calculator detects "end before start" and adds 24 hours automatically.
  3. Enter break minutes if you took an unpaid lunch or rest break. Leave at zero for shifts without breaks. A 30-minute lunch is typical for an 8-hour shift; some US states mandate 60 minutes for shifts longer than 10 hours.
  4. Read the result. The Hours Calculator shows two formats: H:MM (human-readable, what most paper timesheets want) and decimal hours (what payroll and billing software want).

The numbers update as you type. There's no Calculate button to press, and no "send" — your shift times stay in your browser.

Worked example: 9:15 AM to 5:30 PM, 30-minute lunch

This is a standard US "9 to 5" shift, give or take fifteen minutes on either end. Let's walk through the math the calculator is doing.

Step 1: convert both times to minutes since midnight.

  • 9:15 AM = 9 × 60 + 15 = 555 minutes
  • 5:30 PM = (12 + 5) × 60 + 30 = 1050 minutes

Step 2: subtract.

  • 1050 − 555 = 495 minutes

Step 3: convert back to hours and minutes.

  • 495 ÷ 60 = 8 hours, remainder 15 minutes → 8:15

So clock-in to clock-out is 8 hours 15 minutes. Now subtract the 30-minute unpaid lunch:

  • 495 − 30 = 465 minutes
  • 465 ÷ 60 = 7 hours, remainder 45 minutes → 7:45

And in decimal hours (what your payroll system probably wants):

  • 465 ÷ 60 = 7.75 hours

The 7:45 and 7.75 are the same amount of time written two ways. Forty-five minutes is three-quarters of an hour, so 7 hours and 45 minutes equals 7.75 hours. The calculator shows both so you can copy whichever one your timesheet wants.

Overnight and multi-day shifts

Graveyard shifts are where the math gets sneaky. If you start at 10 PM Monday and end at 6 AM Tuesday, the end time (6) is numerically less than the start time (22). A naive subtraction gives you negative 16 hours, which is wrong.

The calculator handles this by detecting "end time is less than start time" and adding 24 hours to the end:

10 PM start = 22 × 60 = 1320 minutes
6 AM end (next day) = 6 × 60 + 1440 = 1800 minutes
1800 − 1320 = 480 minutes = 8 hours

So a 10 PM to 6 AM shift is exactly 8 hours, the same as a normal day shift. The label in the result tells you "ends next day" so you know the wrap-around happened.

The one case this doesn't cover is a 24+ hour shift (firefighter shifts, long-haul truck driving, some on-call rotations). The Hours Calculator assumes the end time is the *next* occurrence of that clock time, not two days later. If you really worked a 28-hour shift, split it into two entries and add them up.

Decimal hours vs H:MM, and when each one matters

This is the question that comes up most. Both formats describe the same amount of time, but they show up in different places.

H:MM is the human format. 7 hours 45 minutes. It's what you'd write on a paper timesheet because that's how humans talk about time. It also matches how the time-picker inputs look.

Decimal hours is the math-friendly format. The minutes get converted to a fraction of an hour: 45 minutes ÷ 60 = 0.75, so 7:45 becomes 7.75. This is what payroll software, billing software, and spreadsheets want, because multiplying decimal hours by an hourly rate is straightforward (7.75 × $30/hr = $232.50). Multiplying 7:45 by anything requires a conversion step first.

Here's the conversion table for the common minute values:

Shift length (H:MM)Decimal hoursCommon context
4:004.00Half-day shift
4:304.50Short shift with a quick break
6:006.00Part-time shift, often no required break
7:307.50Eight-hour day minus a 30-min lunch
7:457.75Eight-hour-fifteen day minus 30-min lunch
8:008.00Standard full-time shift (US)
8:308.50Full shift, no break (or short paid break)
10:0010.00Overtime begins (California, by day)
12:0012.00Long shift; many states require two breaks

A useful mental shortcut: the minutes column maps to a decimal in quarter-hour steps. :00 = .00, :15 = .25, :30 = .50, :45 = .75. Anything in between needs actual division, but the four common boundaries cover 80% of shifts because people tend to think in quarter-hours.

Why breaks get deducted (and when they don't)

In most US states and most employment contracts, breaks of 30 minutes or more are unpaid. If you clock in at 9 AM and out at 5:30 PM with a 30-minute lunch, you've been at work 8.5 hours but you've worked 8 hours. The employer pays for 8.

The rules differ by state and by employer:

  • Federal (FLSA): meal breaks of 30+ minutes are unpaid; rest breaks of 5-20 minutes are paid. No federal requirement to provide either, just rules about when they're paid.
  • California: 30-minute unpaid meal break required for shifts over 5 hours; second meal break for shifts over 10 hours. Two 10-minute paid rest breaks for shifts over 6 hours.
  • New York: 30-minute unpaid meal break for shifts of 6+ hours that span the noon hour.
  • Most other states: Either follow federal minimums or have their own thresholds, usually around 30 minutes unpaid for shifts of 5-6+ hours.

If your break is 20 minutes or less, it's usually paid and you don't deduct it from your timesheet. If it's 30+ minutes, you usually do. Check your specific state's labor code and your contract — this calculator just does whatever math you tell it to.

Edge cases worth knowing

  • Daylight Saving Time transitions. The Hours Calculator does pure clock-time math — it doesn't know that the second Sunday in March only has 23 hours and the first Sunday in November has 25. If you work a graveyard shift on those nights, the actual elapsed time differs from the clock-time math by an hour. Most payroll systems pay based on scheduled time, not elapsed seconds, so the calculator's answer is what your timesheet wants anyway.
  • Rounding. The calculator is exact to the minute and the decimal is the exact ratio (8:25 = 8.4166... hours, displayed as 8.42). Some payroll systems round to the nearest quarter-hour or nearest tenth — they make their own rounding decisions when you enter the time. If your employer rounds, your paystub may show a slightly different number than this calculator.
  • Overtime is separate. Federal overtime kicks in over 40 hours per week (1.5x rate). California adds daily overtime over 8 hours (1.5x) and over 12 hours (2x). The Hours Calculator gives you raw worked hours; combining them into a weekly total and applying overtime rules is a separate step.
  • Time-zone changes. If you start your shift in one time zone and end in another (red-eye flight crew, traveling consultant), the wall-clock difference doesn't reflect actual elapsed time. Use UTC or do the math against your home time zone.

Related calculators

  • Date Time Calculator — for adding days, hours, or minutes to a date, or computing the difference between two full dates (not just clock times on the same day).
  • Age Calculator — same date-difference logic, framed for birthdays. Years, months, and days between two dates.
  • Days Between — just the day count between two dates. Handy for project deadlines, lease end dates, or counting down to events.
  • Salary to Hourly — once you've got your weekly hours, this converts annual salary to an effective hourly rate (and vice versa).

Frequently asked questions

How does the calculator handle shifts that cross midnight?

Automatically. If the end time is numerically less than the start time (start 10 PM = 22:00, end 6 AM = 06:00), the calculator detects this and adds 24 hours to the end time before subtracting. A 10 PM to 6 AM graveyard shift returns 8 hours, with a label indicating the end was the next day. You don't need to manually enter "next day" or split the shift in two.

What's the difference between H:MM and decimal hours?

H:MM is the human-readable format (7 hours 45 minutes = 7:45). Decimal hours converts minutes to a fraction of an hour (45 ÷ 60 = 0.75, so 7:45 = 7.75 decimal hours). Most payroll and billing software wants decimal hours because the multiplication is straightforward (7.75 × hourly rate = pay). H:MM is what shows up on paper timesheets and how people talk about time. The Hours Calculator shows both because you might need either depending on what you're filling in.

Why do breaks get deducted from worked hours?

Because in most US states and most employment contracts, breaks of 30 minutes or more are unpaid. You're physically at the workplace for 8.5 hours, but the employer only pays for 8. Shorter breaks (5-20 minutes) are typically paid time and don't get deducted. Federal and state rules vary on which break lengths must be offered and which must be paid — check your state's labor code and your employment contract for the specific thresholds.

Does the calculator handle overtime?

No — it gives you raw worked hours. Overtime is a separate calculation that depends on US state law (federal: over 40 hours per week at 1.5x; California: over 8 hours per day at 1.5x and over 12 at 2x; a few states have other thresholds) and your employment agreement. Sum your daily hours into a weekly total, then apply your state's overtime rule.

What time format does the calculator accept?

The HTML time input lets your operating system pick: most US systems show 12-hour format with AM/PM, most other regions show 24-hour. Either way, the calculator internally uses minutes-since-midnight, so 1:30 PM = 13:30 = 810 minutes. The display format affects how you read and type the time, not the math accuracy.

How precise is the result?

Exact to the minute. The decimal hours are the exact ratio of minutes to 60 (8:25 = 8.4166... hours, displayed rounded to two decimals as 8.42). Your payroll system may round the result further when you enter it — quarter-hour rounding is common, as is tenth-hour rounding. That's your employer's decision, not the calculator's.

Can I use this for freelance billable hours?

Yes — that's a common case. Decimal hours are what most billing software wants (FreshBooks, Harvest, QuickBooks Time, Toggl). For tighter billable-hour tracking, use a stopwatch app or a time-tracker that logs as you work; this calculator is best for filling in a timesheet at the end of the day from memory of start/end times. If you're billing in 6-minute increments (tenth-hour, common in legal practice), round the decimal hours to one decimal place.