Skip to content

Hours Calculator: Hours Between Two Dates and Times

Count the hours and minutes between two dates and times, including overnight and multi-day periods, minus unpaid breaks, in hours and minutes or decimal hours.

3 min read

Whether you are logging a shift, billing a client or checking how long a machine ran, you often need the exact hours between two points in time. When the period crosses midnight or spans several days, mental arithmetic gets messy. Our hours calculator takes a start date and time and an end date and time, subtracts unpaid breaks, and gives the result in hours and minutes, decimal hours and total minutes. This guide explains the method and how to use it for timesheets and billing.

How to use the calculator

  1. Start date and start time.
  2. End date and end time.
  3. Unpaid breaks (minutes).

With the defaults, 08:30 to 17:15 on the same day with a 45-minute break:

  • Hours: 8 h 0 min
  • Decimal hours: 8
  • Total minutes: 480

An overnight shift from 22:00 on 2 December to 07:00 on 3 December, with no break, is 9 hours.

How it is calculated

  1. Find the total time between the two moments. 08:30 to 17:15 is 8 hours 45 minutes, or 525 minutes.
  2. Subtract unpaid breaks: 525 − 45 = 480 minutes.
  3. Convert to hours: 480 ÷ 60 = 8 hours.

Because the calculator uses full dates, it handles overnight and multi-day periods correctly. A job from 09:00 Monday to 13:30 Wednesday is 2 days and 4.5 hours, or 52.5 hours.

Decimal hours for payroll

Payroll and invoicing software normally needs decimal hours. Divide minutes by 60:

Hours and minutesDecimal
7 h 15 min7.25
7 h 20 min7.33
7 h 30 min7.5
7 h 45 min7.75
7 h 50 min7.83

Never write 7 h 45 min as 7.45: that loses 18 minutes of pay.

Pay example: 8 hours at $22 per hour = $176. For a whole week with overtime, use the time card calculator.

Billing clients

Freelancers and consultants often bill in increments, such as 6 minutes (0.1 hour) or 15 minutes (0.25 hour). Record exact start and end times, total them, then round according to your agreement. 3 h 40 min is 3.67 hours; billed in 15-minute increments, it becomes 3.75 hours.

Daylight saving time

On the night the clocks change, a shift can be an hour longer or shorter than the clock times suggest. A night shift from 22:00 to 06:00 is normally 8 hours, but 7 or 9 hours on a clock-change night. Check how your employer records those nights. The time zone calculator shows when daylight saving applies in different places.

Breaks

Only subtract unpaid breaks. Paid rest breaks are part of working time. Many employers and laws require a meal break after a certain number of hours, so check local rules if you are setting schedules.

Other uses

  • Machine and equipment hours for maintenance schedules.
  • Rental periods charged by the hour, such as equipment or parking.
  • Study and practice logs.
  • Travel time across days, especially with overnight transport.
  • Childcare hours for invoices or tax records.

Keeping accurate records

The simplest habit is to write down the actual start and end times as they happen, rather than reconstructing them at the end of the week. Phone notes, a small notebook or a time-tracking app all work. Record breaks separately, and note anything unusual, such as being called in early, staying late or travelling between sites, because these may be paid at different rates. Accurate records make it easy to check a payslip or an invoice, and they are invaluable if there is ever a dispute about hours worked. Many employment rules also require employers to keep time records for a set number of years.

Frequently asked questions

How do I calculate hours for an overnight shift?

Enter the start date and time, then the next day's date and the end time. The calculator counts across midnight automatically.

How do I convert minutes into decimal hours?

Divide by 60. 20 minutes is 0.33 hours, so 6 hours 20 minutes is 6.33 hours.

Can I calculate hours over several days?

Yes. Enter different start and end dates, and the calculator counts every hour in between.

Should I include my lunch break?

Subtract it only if it is unpaid. Paid breaks count as hours worked.

Share

Try it yourself

Run your own numbers with our free tool: Hours calculator. No sign-up, and it works on any device.

Open the calculator