Time & duration calculator

Hours Calculator

Find the exact hours and minutes between any two times. Enter a start and end time and the total updates as you type — overnight shifts and unpaid breaks included.

Enter your times

Works with 12-hour or 24-hour input. No sign-up, nothing stored.

Passing midnight? We add the extra day automatically.

Total time worked

8h 30m
Overnight shift — crosses midnight
Decimal hours
8.50
Total minutes
510

What this hours calculator does

This tool answers a question that comes up constantly and is surprisingly easy to get wrong by hand: how many hours are there between one time and another? Type a start time, an end time, and — if you take one — an unpaid break, and it returns the worked time three ways: as hours and minutes, as decimal hours for payroll, and as total minutes. Everything recalculates the moment you change a field, so there is no button to hunt for.

It is built for the moments where the arithmetic is fiddly — a shift that runs past midnight, a 45-minute lunch break, a clock-in of 08:12 and a clock-out of 16:47. Those are exactly the cases where mental math slips, and where a wrong figure on a timesheet costs real money.

How to use it

Four quick steps — most people never touch the break field and just read the total.

  1. Enter your start time.Pick it from the clock or type it. Both 12-hour (9:00 AM) and 24-hour (09:00) input work.
  2. Enter your end time.If it is earlier than the start — say 22:00 to 06:00 — the calculator assumes the shift crossed midnight and adds the extra day for you.
  3. Add any unpaid break.Enter your lunch or break in minutes to subtract it. Leave it at 0 if the whole span is paid.
  4. Read and reuse the result.Copy it to a message, print it for a paper timesheet, or download it as a CSV row for your records.

How the hours are calculated

The method is simple once you stop thinking in clock time and start thinking in minutes past midnight. Every time on a 24-hour clock is just a number of minutes from 00:00, and once both times are numbers, the rest is subtraction.

Worked example · 9:00 AM to 5:30 PM, 30-min lunch
Start 09:00 → 540 minutes
End 17:30 → 1050 minutes
Gross = 1050 − 540 = 510 minutes
Less 30-min break = 480 minutes
480 ÷ 60 = 8h 00m = 8.00 decimal hours

Overnight shifts

When the end time is before the start time, the shift has crossed midnight. The calculator adds 1,440 minutes (one full day) so the result stays positive. A 10:00 PM to 6:00 AM shift becomes 1,440 + 360 − 1,320 = 480 minutes, or 8 hours — and the tool flags it with an overnight badge so you know the extra day was applied.

Decimal hours vs. hours and minutes

People read time as hours and minutes, but payroll systems multiply decimal hours by an hourly rate. The two are not the same: 8 hours 30 minutes is 8.50 decimal hours, not 8.30. To convert manually, divide the minutes by 60 (30 ÷ 60 = 0.5). If you only need that step, the dedicated time to decimal converter does it in isolation, and decimal to time goes the other way.

Quick examples

Common shift patterns and what they come to after breaks.

StartEndBreakResultDecimal
09:0017:0030 min7h 30m7.50
08:1516:450 min8h 30m8.50
22:0006:0060 min7h 00m7.00
07:3015:0045 min6h 45m6.75
11:0019:2030 min7h 50m7.83

Working in 24-hour time and want to double-check a value reads the way you think? The military time converter and the 24-hour clock chart map every hour to its 12-hour equivalent.

Who uses it, and for what

  • Hourly workers & shift staff checking a clock-in against a clock-out before submitting a timesheet.
  • Freelancers & contractors turning a work session into billable decimal hours for an invoice.
  • Managers & small-business owners tallying a team's daily hours. For a full week with multiple entries, the time card calculator is the better fit.
  • Students & anyone tracking time — study sessions, workouts, travel, or how long a task really took.

If you simply need the gap between two times without payroll framing, the time duration calculator gives the same answer in plainer terms. And to shift a time forward or back by a set amount, use the add & subtract time calculator.

Frequently asked questions

How do I calculate the number of hours between two times?

Convert both times to minutes past midnight, subtract the start from the end, then divide by 60. For example, 9:00 to 17:30 is 1,050 − 540 = 510 minutes = 8 hours 30 minutes. This calculator does that instantly and also subtracts any break you enter.

Does it handle overnight shifts?

Yes. When the end time is earlier than the start time — like 22:00 to 06:00 — the tool assumes the shift crosses midnight, adds a full day, and shows an overnight badge so the adjustment is visible. That example returns 8 hours.

What are decimal hours and why does payroll use them?

Decimal hours express minutes as a fraction of an hour, so 8 hours 30 minutes becomes 8.50. Payroll and invoicing tools multiply decimal hours by an hourly rate, which is why timesheets record time this way rather than as hours and minutes.

Can I enter times in 24-hour (military) time?

Yes — the time fields accept both 12-hour and 24-hour input. If a 24-hour value is unfamiliar, the military time converter shows its 12-hour equivalent.

Is the break subtracted from the total?

Yes. Any minutes in the break field are removed from the worked time, so the result reflects paid hours only. If a break is longer than the shift itself, the total is shown as zero.

Is it free, and is my data private?

It is completely free with no sign-up. The calculation runs entirely in your browser — your times are never uploaded or stored on a server.

Accuracy & sources

Results come from standard time arithmetic: each time is converted to minutes past midnight, subtracted, the break removed, and the total converted back — exactly as shown in how the hours are calculated. There is no proprietary formula or external conversion factor, and every worked example on this page has been independently verified by hand.

Times are read and displayed using the 24-hour clock notation defined by ISO 8601, the international standard for representing dates and times; decimal hours follow the standard minutes ÷ 60 convention used by payroll systems. Written and reviewed by Fletcher Langley, and re-checked whenever the tool changes — last reviewed August 2026.

About the author

Fletcher Langley
Time & Scheduling Specialist · 24hourto12hour.com

Operations and workforce-systems specialist with 14+ years inside shift-based industries and payroll platforms, and a BS in Industrial Engineering. Fletcher writes and reviews the calculators, converters, and guides here — from overnight-shift math to decimal payroll hours — drawing on years spent translating between 12-hour, 24-hour, and military time for real timesheets.

Written & reviewed by Fletcher Langley · Last updated: August 2026