Time Duration Calculator – Hours Between Two Times

Find the exact hours and minutes between any two times. This free time duration calculator handles overnight shifts automatically and can deduct your break for true working hours.

Calculate Duration

Leave empty or 0 for no break. Overnight shifts (end before start) are handled automatically.
Duration
–
In decimal hours–
In minutes–
Overnight?–

How to Use the Time Duration Calculator

Pick your start time and end time using the time pickers, then press Calculate Duration. The result shows the duration as hours and minutes, as decimal hours (useful for timesheets and billing), and as total minutes. If your end time is earlier than your start time — say 10:00 PM to 6:00 AM — the calculator assumes an overnight shift and adds 24 hours rather than giving you a negative answer.

The optional break field deducts unpaid time: enter 60 for a one-hour lunch and the result is your true working time. The break can never equal or exceed the total shift — the tool will tell you if it does.

How the Calculation Works

Both times are converted to minutes since midnight, then subtracted. The overnight rule is the only subtlety:

If end ≤ start: duration = (end − start) + 24 hours  •  Net = duration − break

So 22:00 to 06:00 becomes (360 − 1,320) + 1,440 = 480 minutes = 8 hours. A 30-minute break then gives 7 h 30 min net, or 7.50 decimal hours. Decimal hours are what payroll systems want: 7.5 × hourly rate is trivial, while 7 h 30 min × rate invites arithmetic slips.

Worked Example

A security guard works 10:00 PM to 6:00 AM with a 30-minute break:

StepCalculationResult
1. Start in minutes22 × 601,320
2. End in minutes6 × 60360
3. Overnight adjustment(360 − 1,320) + 1,440480 min = 8 h
4. Deduct break480 − 307 h 30 min
5. Decimal hours450 ÷ 607.50 hours

At $25/hour, that shift pays 7.5 × 25 = $187.50. Without the overnight rule, step 3 would have produced −960 minutes — the classic error this calculator exists to prevent.

Shift-Work and Overtime Examples — Beyond the Basics

ScenarioTimesResult
Office day with lunch9:00 AM – 6:00 PM, 60-min break8 h (9 h − 1 h)
Night factory shift10:00 PM – 6:00 AM, 30-min break7 h 30 min
Split restaurant shift11:00 AM – 3:00 PM + 7:00 PM – 11:00 PM8 h (run the tool twice, add)
Overtime check8:00 AM – 8:00 PM, 60-min break11 h → 3 h overtime over an 8-h day

Two practical tips. First, split shifts: calculate each block separately and add the results — the tool handles one continuous block at a time. Second, overtime disputes: screenshot or note the decimal-hours figure each week; "7.50 hours × 6 days = 45 hours" is unambiguous in a way "about seven and a half" is not, and it matches how most payroll software records time.

Limitations

The calculator assumes a single continuous block of at most 24 hours — multi-day durations belong in the date difference calculator. It does not know about public holidays, weekends or different overtime rates; it gives you hours, and your pay rules turn hours into dollars. Time inputs have minute precision, so seconds are ignored. The tool uses plain clock arithmetic, so daylight-saving transitions — which most US states observe — are not modeled: durations measured across a spring-forward or fall-back change won't be adjusted for the lost or gained hour.

Knowing how long something took is half of digital hygiene; knowing what you exposed while doing it is the other half. The Social Privacy Checkup audits what your social profiles reveal to strangers — a ten-minute review worth scheduling like any other recurring task.

Guides for This Tool

Frequently Asked Questions

How do I calculate hours between two times?
Subtract the start time from the end time. For example, 9:00 AM to 5:30 PM is 8 hours 30 minutes. If the end time is earlier than the start, add 24 hours — the shift ran overnight. This calculator does that automatically and shows the result as hours and minutes and in decimal form.
How does the calculator handle overnight shifts?
If the end time is earlier than (or equal to) the start time, the calculator assumes the shift crossed midnight and adds 24 hours. A 10:00 PM to 6:00 AM shift is therefore 8 hours, not negative 16. That matches how overnight rotas are recorded, so you can enter times as they appear on the schedule.
How do I subtract a lunch break?
Enter the break in minutes in the optional break field. A 9:00 AM–6:00 PM shift with a 60-minute break gives 8 hours of work time instead of 9. The break is deducted once from the whole shift, which suits a single lunch break; for several short breaks, add their minutes together first and enter the total.
What is 8:30 AM to 5:00 PM in hours?
8 hours 30 minutes, or 8.5 hours in decimal. With a 30-minute lunch break deducted, it is 8 hours exactly. Payroll usually wants the decimal version, while timesheets show hours and minutes — this page displays both, so you can copy whichever format your employer or client expects.
How do I convert the result to decimal hours?
Divide the minutes by 60 and add the hours: 7 hours 45 minutes = 7 + 45/60 = 7.75 hours. The calculator shows both formats automatically. Decimal hours are what payroll systems and invoices use, because a figure like 7.75 can be multiplied directly by an hourly rate to get pay.
Can a shift be longer than 24 hours?
This calculator assumes a single shift of up to 24 hours. For multi-day durations, use our date difference calculator instead. Splitting the job that way keeps shift maths honest — overnight and break rules apply per shift, while the date tool handles whole days, weeks and months between two calendar dates.

Related Tools