Time Duration Calculator
The Time Duration Calculator works out how much time passed between a start and end time — perfect for timesheets and work hours. It handles overnight shifts, subtracts unpaid breaks, and gives you the result in hours and minutes and in decimal hours for payroll. The overnight-shift check is a single test: if the end time is earlier than the start time, the calculator assumes exactly one midnight crossing and adds a full 24 hours — it can't represent a shift spanning more than 24 hours total. If the unpaid break entered is longer than the raw time between start and end, worked time is floored at zero rather than going negative, so an oversized break reports 0 hr 0 min instead of an error. Decimal hours are always shown to two decimal places (minutes ÷ 60), the format most payroll and invoicing systems expect.
Total time
8 hr 0 min
A 30-minute unpaid break has been subtracted.
Enter clock-in and clock-out times to get worked hours for a timesheet. Decimal hours (for example 8.50) is the format most payroll systems use. Everything is calculated in your browser.
How This Tool Works
Enter the start and end time and, optionally, an unpaid break in minutes. The worked duration appears instantly in hours and minutes and as decimal hours — the format most payroll systems use.
Formula & Method
Duration = end time − start time. If the end time is earlier than the start (an overnight shift), 24 hours are added. Any unpaid break minutes are then subtracted, and the result is shown as hours and minutes and as decimal hours (minutes ÷ 60).
Example Calculation
Take an overnight shift starting at 22:15 (10:15 PM) and ending at 06:45 (6:45 AM), with a 45-minute unpaid break. Since the end time (405 minutes past midnight) is earlier than the start time (1,335 minutes past midnight), the calculator detects an overnight shift and adds 24 hours (1,440 minutes): 405 − 1,335 + 1,440 = 510 raw minutes. Subtracting the 45-minute break gives 510 − 45 = 465 minutes worked — that's 7 hours 45 minutes, or 465 ÷ 60 = 7.75 decimal hours for payroll.
About the Time Duration Calculator
Subtracting clock times sounds easy until the numbers cross an hour boundary. Working out that 8:12 in the morning to 4:47 in the afternoon is eight hours and thirty-five minutes takes a moment of mental carrying, and doing it for a week of timesheet entries is where mistakes creep in. This calculator takes a start time, an end time, and an optional unpaid break in minutes, and returns the time actually worked as hours and minutes, as decimal hours, and as a plain total of minutes.
The decimal-hours figure is the one payroll and billing systems usually want. Instead of 8 hours 10 minutes it reports 8.17, which is the minutes divided by 60 and shown to two decimal places. Some employers and invoicing tools round time to the nearest quarter hour or tenth of an hour instead, so it is worth knowing which convention applies before you copy a number across. The exact minute total is always shown too, giving you something unambiguous to round from or to add up across several days.
Overnight shifts are handled automatically. When the end time is earlier on the clock than the start time, the calculator assumes you worked through midnight and adds a full day before subtracting the break. This is how night nurses, security staff, bakers, and bartenders usually record a shift. The tool works on clock times only, with no dates, so it handles a single shift of under 24 hours, and it does not calculate pay, overtime, or daylight saving adjustments.
When to Use It
Filling in a weekly timesheet
A part-time employee enters each day's clock-in, clock-out, and unpaid lunch to get hours and minutes, then converts to the decimal format the company's payroll form asks for. Writing down the total minutes for each day and adding them before converting avoids the small rounding drift that comes from adding already-rounded decimals.
Recording a night shift
A nurse who works from 7:00 in the evening until 7:30 the next morning enters those two times and a 30-minute break. The tool detects that the end time is earlier on the clock, adds the missing 24 hours, and reports the true length of the shift, saving the need to count across midnight by hand.
Billing a client by the hour
A freelancer who logs start and stop times for a work session wants an invoice line in decimal hours. Entering the session returns, for example, 2.75 for two hours and 45 minutes, which can be multiplied by the hourly rate. Keeping the minute total alongside gives the freelancer a defensible record if the client asks how the time was calculated.
Checking time on an event or study plan
An organizer or a student planning study blocks can use it to see how long a session, a rehearsal, or a drive lasts, including a break that does not count. Subtracting the break gives the focused time available, which makes it easier to decide whether a schedule is realistic before committing to it.
How to Use It, Step by Step
- Set the 'Start time' using the time field. Click the hour, minute, and AM or PM segments, or type them in. The format shown, 12-hour or 24-hour, follows your device and browser settings.
- Set the 'End time' the same way. For a shift that finishes after midnight, enter the clock time it actually ends, such as 3:10 AM. Do not add 24 yourself, because the tool does that for you.
- Enter the length of your unpaid break in the 'Unpaid break (min)' box. Type whole minutes only, such as 30 or 45, and use 0 or leave it empty if there was no unpaid break.
- Read the large 'Total time' figure, which shows the worked time as hours and minutes after the break has been subtracted.
- Below it, copy the 'Decimal hours' value for payroll or invoicing. It is rounded to two decimal places, so 8 hours 10 minutes appears as 8.17.
- Use 'Total minutes' when you need to add several days together. Summing exact minutes and converting once at the end is more accurate than adding several rounded decimal numbers.
- Look for the small notes under the numbers. One says the end time was assumed to be the next day, and another confirms how many break minutes were subtracted. They help you verify that the tool read your entries correctly.
- If you see 'Enter a start and end time to see the duration', one of the time fields is empty. Fill both in again and the result will reappear.
Understanding Your Results
The result is shown in three equivalent forms. The headline 'Total time' is the human-friendly hours and minutes, ideal for a quick check or a message to a colleague. 'Decimal hours' divides the minutes by 60 and shows two decimals, which suits payroll, billing, and spreadsheets. 'Total minutes' is the exact count, and it is the safest number to store or add up, because it contains no rounding.
Useful conversions to remember: 15 minutes is 0.25 hours, 30 minutes is 0.50, 45 minutes is 0.75, and 6 minutes is 0.10. Other minute counts produce repeating decimals that the tool rounds, so 10 minutes becomes 0.17 and 20 minutes becomes 0.33. That rounding is harmless for a single entry but can add a few hundredths when you total several days, which is why the minute figure is better for weekly sums.
To sanity-check, estimate on your own: from 9:00 to 5:30 is eight and a half hours, and a half-hour break leaves exactly eight. If the answer is zero and you expected a positive result, look at the break value or the times, because a break longer than the span is floored at zero. A result equal to 23 hours 59 minutes less the break usually points to a start and end that are one minute apart in the wrong order.
More Worked Examples
A standard day with an awkward start
Scenario: Start 8:12 AM, end 4:47 PM (16:47), unpaid break 25 minutes, repeated for five days.
The span from 08:12 to 16:47 is 515 minutes. Subtracting the 25-minute break leaves 490 minutes, shown as 8 hr 10 min with decimal hours of 8.17 and 490 total minutes. Over five identical days, adding the rounded decimal values gives 40.85 hours, while adding the exact minutes gives 2,450, which divides by 60 to 40.83. The two-hundredths gap is why you should sum minutes first and convert once.
An overnight shift
Scenario: Start 6:30 PM (18:30), end 3:10 AM (03:10), unpaid break 20 minutes.
The end time is 190 minutes after midnight and the start is 1,110 minutes after midnight. The raw difference is negative, 190 minus 1,110 equals -920, so the tool adds 1,440 minutes for one day, giving 520. Subtracting the 20-minute break gives 500 minutes, displayed as 8 hr 20 min, 8.33 decimal hours, and 500 total minutes. The note 'Assumed the end time is the next day (crossed midnight)' appears under the result.
Edge cases: an oversized break and equal times
Scenario: First try start 12:00, end 12:20, break 30 minutes. Then try start 9:00 and end 9:00 with no break.
In the first case the span is 20 minutes, and subtracting 30 would give -10, but the tool floors the result at zero and shows 0 hr 0 min, 0.00 decimal hours, and 0 total minutes. In the second case the end is not earlier than the start, so no day is added and the answer is also 0 hr 0 min. Equal times are not treated as a 24-hour shift, so enter a one-minute difference if you truly mean a full day.
Tips for Better Results
- Record clock times as they actually happened rather than rounded to the nearest quarter hour, then apply your employer's rounding policy afterward. That keeps your own records accurate and makes disputes easier to settle.
- When totaling a week, write down each day's 'Total minutes', add them, and divide by 60 once. This avoids the compounding effect of rounding each day to two decimal places.
- Check whether your break is paid or unpaid before you enter it. Only unpaid time should be subtracted here, and rules about required meal periods and which breaks must be paid differ by location and employer.
- For a split shift with a long gap, such as two sessions in a day, calculate each session separately and add the minutes. The single break field is designed for a short unpaid pause within one continuous shift.
- Use 24-hour time if you work across midnight and your device allows it. Seeing 23:00 and 07:00 makes it harder to confuse AM and PM, which is the most common cause of a result that is off by exactly 12 hours.
- The two time fields are standard browser time inputs, so their look and behavior differ between phones and computers. If one is cleared by accident, the result area shows the 'Enter a start and end time' prompt until you fill it again.
Common Mistakes to Avoid
- Mixing up AM and PM. Entering 5:00 instead of 5:00 PM for the end of a day shift makes the tool treat it as an overnight shift of nearly 20 hours, so check the note about crossing midnight.
- Entering the break in hours instead of minutes. A value of 1 for a one-hour lunch subtracts only a minute, so type 60 in the 'Unpaid break (min)' box.
- Typing a decimal break such as 7.5. The break is read as whole minutes, so extra digits after the decimal point are dropped, and a value like 1.5 is treated as 1.
- Rounding each day's decimal hours and then adding them. Small errors accumulate, so total the minutes instead and convert once at the end.
- Using the tool for shifts longer than 24 hours or across several dates. It only knows clock times, so split a multi-day span into separate days and add the minutes yourself.
Assumptions and Limits
- The calculation uses clock times only and has no concept of dates, time zones, or daylight saving. A shift that crosses a clock change can be an hour longer or shorter in reality than the figure shown, so adjust manually in those cases.
- An end time earlier than the start is assumed to fall on the next day, exactly once. Equal start and end times produce zero, and anything that would exceed 24 hours must be entered as separate periods.
- Decimal hours are the total minutes divided by 60 and rounded to two places. Your employer may round differently, such as to the nearest quarter hour, tenth of an hour, or by a grace period, so follow their method when submitting time.
- This tool measures duration only. It does not calculate wages, overtime, breaks required by law, or tax. For payroll compliance questions, consult your employer, a payroll professional, or the labor authority for your jurisdiction.
Key Terms
- Decimal hours
- A way of writing time as a decimal number of hours, so 7 hours 45 minutes becomes 7.75. Payroll and billing systems use it for easy multiplication.
- Unpaid break
- A pause such as a meal period during which an employee is not working and is not paid. It is subtracted from the span between clock-in and clock-out.
- Overnight shift
- A shift that starts on one calendar day and ends on the next. Its end time appears earlier on the clock than its start time.
- 24-hour clock
- A time notation running from 00:00 to 23:59 with no AM or PM. It removes the ambiguity between morning and evening hours.
- Timesheet
- A record of hours worked, kept by employees or contractors so that pay or invoices can be calculated from start and end times.
- Rounding rule
- An employer's policy for adjusting recorded time to fixed increments, such as quarter hours. It affects pay, so confirm which rule applies where you work.
Related guides
Frequently Asked Questions
Does it handle overnight shifts?+
Yes. If the end time is earlier than the start time, the calculator assumes the shift crossed midnight and adds 24 hours automatically.
What are decimal hours?+
Decimal hours express minutes as a fraction of an hour — for example 8 hours 30 minutes is 8.50 decimal hours. Most payroll and billing systems use this format.
Can I subtract a lunch break?+
Yes. Enter the unpaid break in minutes and it is subtracted from the total worked time.
What happens if my break is longer than my shift?+
The calculator floors worked time at zero — it won't show a negative result. If your entered break minutes exceed the raw time between your start and end time, you'll see 0 hr 0 min and 0.00 decimal hours, which is a sign to double-check your times or break length rather than a valid shift.
Can I calculate a shift longer than 24 hours?+
No — the calculator only detects a single midnight crossing. If your end time is earlier than your start time, it assumes exactly one 24-hour wraparound. For shifts spanning more than a full day, split them into separate entries (one calculation per calendar day) and add the totals together.
How do I convert hours and minutes to decimal hours by hand?+
Divide the minutes by 60 and add the result to the hours. For example, 6 hours 40 minutes is 6 plus 40 divided by 60, which is 6.67 when rounded to two places. Going the other way, multiply the decimal part by 60: 0.25 is 15 minutes and 0.8 is 48 minutes. The tool shows both forms, so you can check your own arithmetic.
How do I add several days of hours together?+
The most accurate method is to note the total minutes for each day, add them all, and divide the sum by 60 at the end. If you add decimal hours that were already rounded, the total can drift by a few hundredths. For example, five days of 8.17 add to 40.85, while the exact 2,450 minutes equal 40.83 hours.
Should I include my lunch break in my hours?+
That depends on whether the break is paid. If your employer does not pay for the meal period, it should be subtracted, which this tool does through the unpaid break field. If the break is paid, leave the field at 0. Rules about when breaks must be paid vary by location, so check your employment agreement or local labor guidance.
Can I calculate the time between two dates with this?+
No. It compares only two clock times within a single day or across one midnight, so it cannot tell you how many days or hours lie between two calendar dates. For that, use a date difference tool. You can still use this one to measure each individual day within a longer span and then add the minutes together.
Why does my result show zero hours?+
A result of zero most often means your unpaid break is as long as, or longer than, the time between the start and end, or the start and end are identical. The tool never shows negative time, so it floors the answer at zero. Double-check that the break is entered in minutes rather than hours and that both times are correct.
Found this useful? Share it
Help someone else out — or link to it from your own site.
Link to this tool
Writing about time duration calculator? Paste this on your site to link here.
<a href="https://everyfix.net/tools/time-duration-calculator/">Time Duration Calculator</a> by <a href="https://everyfix.net">EveryFix</a>Related Tools
Hourly to Salary Calculator
Convert an hourly wage into daily, weekly, monthly, and annual pay.
Use tool →Age Calculator
Calculate your exact age in years, months, and days.
Use tool →Date Difference Calculator
Calculate the number of days, weeks, or years between two dates.
Use tool →Percentage Calculator
Calculate percentages, percentage of a number, or percentage change.
Use tool →