Count Hours Calculator

How many hours did you actually work after breaks?

Enter your start time, end time, and any break minutes to get your exact working hours. Works for overnight shifts, multi-day spans, and any schedule.

Updated July 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Most people can estimate a straightforward shift — eight hours from nine to five is obvious. Where things go sideways is the moment a shift crosses midnight, includes a break that varies day to day, or spans two calendar dates. A five-minute mental calculation in your head becomes a source of payroll errors when the inputs are irregular.

This calculator converts both your start and end times into a single count of minutes measured from midnight. If your shift crosses into the next day, it adds 1440 minutes per date transition before computing the difference. Break time is then subtracted from that raw span to give your net worked time.

The result appears in two forms: hours and minutes for readability, and decimal hours for practical use in payroll or invoicing. Both are derived from the same underlying minute count, so they will always agree with each other.

When To Use This
Right tool, right situation

Use this calculator whenever you need a precise hour count for a single shift — logging time on a timesheet, building a freelance invoice, verifying a paycheck, or tracking hours against a project budget. It handles same-day shifts, overnight shifts, and any configuration with or without breaks.

It is less appropriate when you need to total hours across an entire week or pay period. Each entry is a single shift; multiple shifts require separate calculations or a dedicated weekly hours tool. For payroll involving overtime rules, holiday pay multipliers, or employer-specific rounding policies, this tool gives you the raw duration — applying those rules is a separate step.

This tool also does not account for timezone differences. If your start and end times are in different timezones — a remote handoff between teams in different regions, for instance — adjust one of the times manually before entering it so both are expressed in the same reference timezone.

Common Mistakes
Why results sometimes look wrong

Not entering a date for overnight shifts. The most frequent error is entering a start time of eleven PM and an end time of seven AM without setting dates. Without the date context, the calculator sees the end time as earlier than the start time and returns a warning. Always set End Date to the following calendar day for any shift that crosses midnight.

Entering break time in hours instead of minutes. The break field expects minutes. If you worked a shift with a one-hour lunch and type 1 instead of 60, the calculator deducts only one minute from your total — making your logged time nearly an hour too long. The placeholder shows a value in minutes to reinforce the expected unit.

Forgetting to include all break periods. Many workers enter only the main lunch break and overlook shorter breaks taken during the day. If your employer requires unpaid breaks for rest periods in addition to lunch, their combined total in minutes should go into the break field. Underreporting breaks inflates hours worked and can create discrepancies with employer records.

The Math
Worked examples and deeper derivation

The calculation starts by converting each clock time into minutes since midnight. A start time of nine AM becomes 540 minutes. An end time of five-thirty PM becomes 1050 minutes. Each hour contains 60 minutes, so the conversion is: hours multiplied by 60, plus the remaining minutes.

For same-day shifts, total duration in minutes equals end minutes minus start minutes. For overnight shifts, the calculator adds 1440 minutes for each calendar day the shift crosses. A shift starting at twenty-three hundred on one date and ending at zero-seven-hundred the next day accumulates 1440 extra minutes from the date change before the subtraction is applied.

Break time subtracts directly: worked minutes equals total shift minutes minus break minutes. To convert worked minutes back to hours and minutes, divide by 60 and take the whole-number part as hours; the remainder is minutes. For decimal hours, divide total worked minutes by 60 without rounding. The example state of a nine AM start, five-thirty PM end, and 30-minute break yields 8 hours, 0 minutes, or 8 hours decimal hours.

Standard office shift with a lunch break
Start nine AM, End five-thirty PM, 30-minute lunch break
The total shift from 8 hours, 30 minutes start to end is 8 hours, 30 minutes. Subtracting 30 minutes of break time leaves 8 hours, 0 minutes, or 8 hours decimal hours. This is the number to log in a timesheet or use to calculate pay.
Overnight hospital shift
Start eleven PM on January 1, End seven AM on January 2, 30-minute break
Because the shift crosses midnight, the end date is set one day after the start date. The calculator adds 1440 minutes for the date transition, giving a total span of 8 hours, 0 minutes. After deducting 30 minutes of break time, the net hours worked are 7 hours, 30 minutes — or 7.5 hours in decimal form.
Freelancer logging a short afternoon session
Start ten AM, End two-thirty PM, no break
With no break taken, the total shift duration and worked hours are identical: 4 hours, 30 minutes, equal to 4.5 hours decimal hours. Freelancers billing by the hour can multiply 4.5 hours by their rate to get the invoice amount directly.
Expert Unlock
The thing most explanations skip

The tool assumes all time is continuous between start and end. It cannot model gaps within a shift — two separate working blocks in one day, for example, must be calculated separately and summed. The break field is a single deduction, not a schedule of intervals. For shift patterns where multiple short breaks are logged individually, add them before entering the total.

Decimal hours are unrounded here, which matters when multiplying by an hourly rate. A result of 8 hours hours at a given rate gives a more precise invoice total than rounding to the nearest quarter-hour first. Whether to round is a billing policy decision, not a mathematical one — this tool leaves that choice to you.

Why does my overnight shift show the wrong total?

How do I calculate hours for an overnight shift?
Fill in both the Start Date and End Date fields so the calculator knows the shift crosses midnight. Without a date set for the end time, the tool assumes both times are on the same calendar day and will show a negative or zero result. For a shift starting at eleven PM and ending at seven AM the next morning, set the start date to the first day and the end date to the following day — the result will correctly show the full duration.
Does break time get subtracted from total hours worked?
Yes — the Break Time field takes the number of minutes you enter and subtracts it directly from the total shift duration. The result-hero shows net worked time after that deduction. The Total Shift Duration sub-result shows the raw span before any break is removed, so you can verify both figures at once.
What is the decimal hours output used for?
Decimal hours express your worked time as a single number rather than hours and minutes — useful when calculating pay, filling out billing software, or adding multiple shifts together. For example, roughly 7 hours and 30 minutes is 7.5 decimal hours, which multiplies cleanly against an hourly rate. Most payroll systems and invoicing tools accept decimal hours directly.

Need something this doesn't cover?

Suggest a tool — we'll build it →