Skip to the content
calculator.fans

Everyday calculators

Time duration calculator

Enter a start time and an end time to find how long elapses between them, take off any unpaid break, and get the answer in hours and minutes, in decimal hours and in total minutes. Decimal hours are what most timesheets and payroll systems multiply by an hourly rate. If the end time is earlier than the start, the calculator assumes the period runs past midnight into the next day, which covers night shifts, overnight journeys and late events.

minutes

Time worked

—

In decimal hours
—
In minutes
—

How the duration is worked out

Each time is turned into minutes after midnight, so 08:45 becomes 525 and 17:10 becomes 1,030. The end minus the start gives the elapsed minutes, the break is subtracted, and the result is split back into hours and minutes by dividing by 60. When the end is the smaller number, a whole day of 1,440 minutes is added first: 22:00 to 06:30 is 390 − 1,320 + 1,440 = 510 minutes.

The calculator handles a single span of up to 24 hours. A start and end at the same time gives zero rather than a full day, and anything longer than a day needs splitting into parts. Times are read on the 24-hour clock, so half past five in the afternoon is 17:30, although most browsers show the box in the 12- or 24-hour format your device uses.

minutes = end − start (+ 1,440 if the end is earlier) − break; decimal hours = minutes ÷ 60

Decimal hours for timesheets

Pay is hours times rate, and that multiplication only works with decimal hours. 7 hours 40 minutes is not 7.40 hours: 40 minutes is two thirds of an hour, so the shift is 7.67 hours. Writing 7.40 would pay for 7 hours 24 minutes and lose 16 minutes. To convert, divide the minutes by 60: 15 minutes is 0.25, 30 is 0.5, 45 is 0.75 and 6 minutes is 0.1.

Multiply the decimal hours by an hourly rate for gross pay; the salary calculator then turns an hourly rate into weekly, monthly and yearly figures. To add a percentage for overtime or a night premium, the percentage calculator does the arithmetic.

Payroll rounding and breaks

Many employers round clock-in and clock-out times, often to the nearest 5, 6 or 15 minutes. In the United States, federal rules accept rounding to the nearest quarter hour only when it averages out so that people are paid for all the time they actually work; rounding that always favours the employer is not allowed. Enter the times as recorded, and apply your employer's rounding policy afterwards if you need to match a payslip.

Whether a break is paid depends on the contract. In the UK, adult workers are entitled to one 20-minute rest break when the working day is longer than six hours, and it doesn't have to be paid. US federal law doesn't require meal breaks, though short rest breaks that are given normally count as paid time. Put only the unpaid break in the break box.

Worked examples

Example 1

A day shift from 08:45 to 17:10 with a 45-minute lunch

From 08:45 to 17:10 is 8 hours 25 minutes, or 505 minutes. Taking off the 45-minute break leaves 460 minutes, which is 7 hours 40 minutes. In decimal hours that is 460 ÷ 60 = 7.67 to two places, so at $18 an hour the shift earns 7.6667 × 18 = $138.00 before tax.

Example 2

A night shift from 22:00 to 06:30 with a 30-minute break

The end time is earlier than the start, so the calculator treats 06:30 as the next morning and shows a note saying so. From 22:00 to midnight is 2 hours, and midnight to 06:30 adds 6 hours 30 minutes, 8 hours 30 minutes in all. Less the 30-minute break, the paid time is 8 hours: 8 decimal hours or 480 minutes. If your timesheet splits night hours by date, 2 hours of the elapsed time fall before midnight.

Questions people ask

How do I add up a whole week of shifts?

Work out each day here, note the total minutes, and add the minutes together before converting. Adding minutes avoids the small errors that creep in when rounded decimal hours are summed. Divide the weekly total by 60 for decimal hours.

Can it handle seconds?

No, it works to the minute, which is what timesheets use. For running or cycling times with seconds, the pace calculator is built for that job.

What happens when the clocks change?

On the night the clocks go forward or back, a shift that crosses the change is an hour shorter or longer than the clock times suggest. The calculator doesn't know the date or the time zone, so add or take off that hour yourself.

Sources and further reading

Related calculators