Hours Between Two Times

Enter a start and end time on the 24-hour clock and your break, and get the hours worked in h:mm and decimal hours — overnight shifts included.

  • Runs on your device
  • Keyboard-first
  • Free, no sign-up

Start time (24-hour)

End time (24-hour)

Time worked (h:mm)

—

Decimal hours
—
Total minutes
—
Crosses midnight
—
Pay for the shift
—

Calculated on your device. Nothing you type is sent anywhere.

Cite
APA: Mr. Behairy. (2026). Hours Between Two Times. Anubis Calc. https://calculatoranubis.com/en/hours-between-times
MLA: Mr. Behairy. "Hours Between Two Times." Anubis Calc, 2026, https://calculatoranubis.com/en/hours-between-times.
Embed

Copy this snippet to embed this calculator on your site or blog for free:

<iframe src="https://calculatoranubis.com/en/embed/hours-between-times" width="100%" height="520" style="border:0;border-radius:18px" loading="lazy" title="Hours Between Two Times"></iframe>
<p><a href="https://calculatoranubis.com/en/hours-between-times" rel="noopener">Hours Between Two Times — Anubis Calc</a></p>

How it works

To find the time between two clock times, convert both to minutes after midnight and subtract. If the end time is earlier than the start time, the period crosses midnight, so 24 hours (1,440 minutes) is added to the end. Unpaid break minutes are then subtracted.

minutes = (end − start [+ 1,440 if overnight]) − break decimal hours = minutes ÷ 60 · pay = decimal hours × hourly rate

Worked example. A shift from 08:30 to 17:15 with a 45-minute lunch: 17:15 is 1,035 minutes after midnight and 08:30 is 510, so the span is 525 minutes; minus 45 = 480 minutes = 8:00 hours. A night shift from 22:00 to 06:30: 390 − 1,320 is negative, so add 1,440 → 510 minutes = 8.5 hours.

Using the 24-hour clock

Enter afternoon times as 13–23: 1:00 pm is 13, 5:15 pm is 17:15, and midnight is 0 (or 24 for “end of day”). This avoids AM/PM mistakes, which are the most common error in time cards.

12-hour24-hour
12:00 am (midnight)00:00
9:30 am09:30
12:00 pm (noon)12:00
3:45 pm15:45
11:00 pm23:00

Weekly totals and overtime

Add each day’s decimal hours for the week. Hours above the normal working limit — often 8 a day or 40–48 a week depending on the country — may be paid as overtime; work out the amount with the overtime pay calculator. To add several durations together, use the time calculator.

This tool assumes a shift shorter than 24 hours. Daylight-saving changes (not used in the Gulf countries) can make a night shift one hour longer or shorter.

Sources & assumptions

24-hour clock, shift under 24 hours, break in whole minutes; daylight-saving changes are not applied.

Reviewed by: Mr. Behairy (Accountant, Financial Auditor & Tax Specialist) · Editorial policy · Formulas reviewed:

Frequently asked questions

How do I calculate hours worked?

Subtract the start time from the end time, then subtract unpaid breaks. The calculator converts the result to hours and minutes and to decimal hours.

How do I handle a shift that ends after midnight?

Just enter the times; if the end is earlier than the start, the calculator adds 24 hours automatically.

How do I convert hours and minutes to decimal?

Divide the minutes by 60 and add them to the hours: 7 h 45 min = 7.75 hours.

Should I enter AM/PM?

No, use the 24-hour clock: 2 pm is 14, 9 pm is 21.

Can it calculate my pay?

Yes. Enter an hourly rate and the pay for the shift is shown.

Are breaks paid?

It depends on your contract and local law. Enter only unpaid break minutes.