Business Hours Duration

There is no standard definition of a working hour. It depends on the window your organisation keeps, which days it keeps it on, whether the lunch break comes out, and which dates the office is closed — so a calculator that hard-codes any of that is answering somebody else's question. All four are inputs here.

Taken off in proportion to how much of the working window the day contributes. Set to 0 to count the whole window.
Your own list. Public holidays differ by country, state and employer, and so do company shutdown days, so nothing is assumed here. Anything after a comma is kept as a label.
Optional. Leave blank to skip it.
Business Hours Duration Calculator — Working Hours Between Two TimestampsBuildFigure

Every part of the definition is yours to set

Ask two organisations how many working hours passed between Friday afternoon and Tuesday morning and you can easily get two different numbers, both defensible. The window might be nine to five or eight to four. Saturday might count. The lunch hour might come out or not. The office might have been shut on the Monday.

None of that is knowable from the timestamps, so none of it is assumed here. The working window, the days of the week, the break and the closure list are all inputs, and the day-by-day table shows exactly what each date contributed so the total can be argued with rather than merely believed.

The closure list in particular is left empty on purpose. Public holidays differ by country and by state, employers observe different subsets of them, and company shutdown days are nobody's standard. A calculator that filled that list in for you would be quietly wrong for most of the people using it.

How a partial day is counted

The first and last days of the span are clipped to the working window. A start at 16:20 against a window ending at 17:00 contributes forty minutes; a start at 07:00 contributes the whole window, because work does not begin before the window opens. Days in the middle contribute the full window, and days that are not working days contribute nothing.

The break is taken off in proportion. A day contributing the whole window loses the whole break; a day contributing a quarter of it loses a quarter. That keeps the arithmetic consistent — two half days come to the same total as one full day — at the cost of not modelling a lunch hour at a fixed time. If somebody starts work at 12:30 and the break is at 12:00, the proportional model charges them part of a break they did not take. For a window of eight hours and a break of one, the largest error the model can make is under an hour, which is usually acceptable for a turnaround figure and not acceptable for a payroll figure.

Working hours are wall clock hours

On the morning the clocks move, the elapsed real time and the working hours part company. A nine-to-five day is eight working hours on every day of the year, including the day that was only twenty-three hours long, because the working window is defined by the clock on the wall and the clock on the wall is what everybody turned up to.

That is the reading this page uses, and it is the right one for turnaround times, service windows and scheduling. It is not necessarily the right one for pay: whether somebody who worked a nominal eight-hour shift across a transition is owed seven, eight or nine hours is a matter of employment agreement and local rules, which vary and which this page takes no position on. When you need the elapsed figure as well, the datetime difference calculator reports both and names the day that caused the divergence, and the daylight saving change dates page tells you which mornings are affected.

The two directions of a service commitment

Measuring backwards — how long did this actually take in working hours — is the main mode. The optional deadline field runs the same machinery forwards: given a start and a number of working hours, it walks the calendar consuming available window until the budget is spent, skipping non-working days and closures, and reports where it lands.

The two answers are consistent with each other by construction, which is the point: a commitment expressed as "eight working hours" and a measurement expressed in working hours are then comparable without anyone having to translate. The landing time carries the same proportional-break caveat as the totals, so treat it as accurate to the working total and approximate to the minute.

For counting whole days rather than hours, the business day calculator is the shorter route, and for building the delivery schedule backwards from a fixed date the backward schedule planner handles the sequencing. Everything on this page is computed in your browser; the timestamps and the closure list stay on your machine.

Questions people ask

Why does it not know the public holidays?

Because there is no single answer to know. Holiday sets differ by country and by state, employers observe different subsets, and company shutdown days are decided internally. Filling the list in automatically would produce a number that looks authoritative and is wrong for most users. Paste your own dates, one per line, and they are excluded and listed back to you.

How is the lunch break handled?

It is subtracted in proportion to how much of the working window each day contributes, so a full day loses the full break and a half day loses half. That keeps partial days additive but does not model a break at a fixed hour. For an eight-hour window with a one-hour break the worst-case error is under an hour, which suits a turnaround figure better than a payroll figure.

Can the working day cross midnight?

Not in this tool. A window that ends before it starts is rejected rather than guessed at, because a night shift needs a different model of what a day is. For overnight shifts, the work hours calculator handles the crossing-midnight case directly.

What happens on a daylight saving day?

A nine-to-five day still counts as eight hours, because the working window is defined by the wall clock. The real elapsed time on that day differs by an hour, which matters for anything measured with a stopwatch rather than a schedule. Both figures are legitimate; this page reports the wall clock one and says so.

Can I use it to check a service level commitment?

You can use it to compute the elapsed working hours and, with the optional field, the point a given number of working hours after the start. Whether that meets any particular commitment depends on the definitions written into the agreement — especially the working window and the holiday set — so set those to match the contract rather than to match your own calendar.

Related