Free tool

Hour Calculator: Add Hours and Minutes

A free hour calculator to add or subtract time, find the hours between two times, and total hours worked with breaks and overnight shifts.

Quick answer: 9:00 AM to 5:00 PM is 8 hours (7.5 hours with a 30-minute unpaid lunch). 8 to 5 is 9 hours, 7 to 3 is 8 hours.

Press Enter. Works with 9-5:30, 7 until 3 with 45 min break, 22:00 to 06:00.

Breaks
min

For shifts longer than 24 h.

9:00 AM to 5:00 PM· shift 8 h, minus 30 min unpaid
Hours:minutes
7:30
Decimal hours
7.50
Total minutes
450
Explain the math
  1. Convert to 24-hour time: start 09:00 = 540 min, end 17:00 = 1020 min after midnight.
  2. Shift length: 1020 - 540 = 480 min.
  3. Subtract 30 min of unpaid breaks: 480 - 30 = 450 min.
  4. Result: 450 min = 7:30 = 7.50 decimal hours.

Runs entirely in your browser. Nothing you type is sent anywhere, there is no sign-up and no ads.

How to read the hour calculator result

Every answer is shown three ways at once, so you can paste the one your form or payroll system wants.

  • Hours:minutes (H:MM) is how people read a duration. 7:45 means seven hours and forty-five minutes.
  • Decimal hours is the same time as a fraction of an hour (45 minutes = 0.75), which is what you multiply by an hourly rate. Need to go the other way? Use the decimal hours calculator.
  • Total minutes is handy for billing in minute increments and for spreadsheets.

Open Explain the math under any result to see each step: the 24-hour conversion, the midnight wrap and every break subtracted. Nothing is rounded unless you choose a rounding step, and then you see both the rounded and the unrounded total.

How many hours is 9 to 5? Common shifts

Gross time between the two clock times, and the paid time after a 30-minute unpaid lunch. Pick a row to load it into the calculator.

Hours worked for common shifts, with and without a 30-minute unpaid lunch
ShiftTotalWith 30 min lunchLoad
9:00 AM to 5:00 PM8:00 (8.0 h)7:30 (7.5 h)Open 9:00 AM to 5:00 PM in the calculator
8:00 AM to 5:00 PM9:00 (9.0 h)8:30 (8.5 h)Open 8:00 AM to 5:00 PM in the calculator
7:00 AM to 3:00 PM8:00 (8.0 h)7:30 (7.5 h)Open 7:00 AM to 3:00 PM in the calculator
8:00 AM to 4:30 PM8:30 (8.5 h)8:00 (8.0 h)Open 8:00 AM to 4:30 PM in the calculator
9:00 AM to 6:00 PM9:00 (9.0 h)8:30 (8.5 h)Open 9:00 AM to 6:00 PM in the calculator
10:00 PM to 6:00 AM (overnight)8:00 (8.0 h)7:30 (7.5 h)Open 10:00 PM to 6:00 AM (overnight) in the calculator

How to calculate hours and minutes

Hours worked

Both times become minutes after midnight. Shift length is end minus start; if that is negative the shift crossed midnight, so 24 hours are added. Unpaid breaks are subtracted, paid breaks are not.

Add / subtract time

Each entry (1:30, 2h15m, 45 min, 1.25h) is converted to minutes, signed, and summed. The total is converted back so every 60 minutes carries into an hour.

Between two dates

Each date and time is turned into a real instant using its time zone, then subtracted. That is why a night with a clock change is 7 or 9 hours, not 8.

You can type times however you like: 9, 930, 9:30a, 17:30, or a whole sentence in Quick entry such as 9:15am to 5:45pm, 30 min lunch. Anything it cannot read gets an error message instead of a silent zero. When you write a plain 9 to 5, the end is read as PM and the calculator tells you so.

Hours worked with lunch break: worked examples

Hours worked with lunch: 8:15 AM to 4:45 PM, 30 minutes unpaid

08:15 is 495 minutes and 16:45 is 1005 minutes. 1005 - 495 = 510 minutes (8:30). Minus the 30-minute lunch = 480 minutes, which is 8:00 or 8.00 decimal hours.

Overnight: 10:00 PM to 6:00 AM

22:00 is 1320 minutes and 06:00 is 360 minutes. 360 - 1320 is negative, so add 1440: 480 minutes = 8 hours. The calculator shows the "ends next day" badge.

Adding time: 1:45 + 2:30 + 0:50

105 + 150 + 50 = 305 minutes. 305 / 60 = 5 remainder 5, so the total is 5:05, or 5.08 decimal hours.

Across a daylight saving change: Saturday 10 PM to Sunday 6 AM, Berlin, 29 March 2026

The clocks jump from 02:00 to 03:00, so the wall-clock difference of 8:00 is really 7:00 of elapsed time. The Between two dates tab reports 7 hours and warns you about the difference.

Military time calculator and converter

Convert between regular and 24-hour (military) time, and use the 12-hour / 24-hour switch above the calculator to display every result your way.

Regular (12-hour)
5:30 PM
24-hour clock
17:30
Military (no colon)
1730
Military time chart, 0000 to 2359

Minutes work the same in both systems: 1745 is 5:45 PM, 0020 is 12:20 AM.

000012:00 AM (midnight)
01001:00 AM
02002:00 AM
03003:00 AM
04004:00 AM
05005:00 AM
06006:00 AM
07007:00 AM
08008:00 AM
09009:00 AM
100010:00 AM
110011:00 AM
120012:00 PM (noon)
13001:00 PM
14002:00 PM
15003:00 PM
16004:00 PM
17005:00 PM
18006:00 PM
19007:00 PM
20008:00 PM
21009:00 PM
220010:00 PM
230011:00 PM

Excel formulas to calculate hours worked

Prefer to keep it in a spreadsheet? These work in Excel and Google Sheets.

Hours between two times (decimal)

=MOD(B1-A1,1)*24

A1 = start, B1 = end. MOD handles overnight shifts.

Hours and minutes between two times

=TEXT(MOD(B1-A1,1),"h:mm")

Shows 8:30 instead of 8.5.

Hours worked minus an unpaid break

=(MOD(B1-A1,1)-C1/1440)*24

C1 = break in minutes.

Add time

=SUM(A1:A10)

Format the cell as [h]:mm so totals over 24 hours display correctly.

Subtract time

=A1-B1

Format as h:mm. A negative result shows ####, use =TEXT(ABS(A1-B1),"h:mm").

Military time (1730) to regular time

=TEXT(TIME(LEFT(A1,2),RIGHT(A1,2),0),"h:mm AM/PM")

A1 holds four digits stored as text, such as 0930.

Frequently asked questions

How do I calculate hours worked between two times?

Convert both times to 24-hour format, subtract the start from the end, then subtract any unpaid breaks. For 8:15 AM to 4:45 PM that is 16:45 - 08:15 = 8 hours 30 minutes. If the end time is earlier than the start time, the shift crosses midnight, so add 24 hours before subtracting. This calculator does all of that for you and shows each step under Explain the math.

How do I add hours and minutes together (and subtract them)?

Add the minutes first, then the hours, and carry every 60 minutes into an hour. 1 h 45 min + 2 h 30 min is 3 h 75 min, which becomes 4 h 15 min. To subtract, borrow an hour (60 minutes) when the minutes do not cover the difference: 5:10 - 2:30 is 4:70 - 2:30 = 2:40. In the Add / subtract tab you can paste a whole list such as 1:30, 2h15m, 45 min, -0:20 and get the running total.

How do I calculate hours worked with a lunch break?

Work out the full time between clock-in and clock-out, then take off the unpaid break. 9:00 AM to 5:00 PM is 8 hours; with a 30-minute unpaid lunch it is 7.5 hours (7:30). If a break is paid, do not subtract it. The calculator lets you add several breaks and mark each one as paid or unpaid.

How does the calculator handle overnight shifts?

If the end time is earlier than the start time, it assumes the shift ended the next day and adds 24 hours, and a badge reads "ends next day". 10:00 PM to 6:00 AM is 8 hours. For shifts longer than 24 hours, use Extra full days. If the shift spans a daylight saving change, use the Between two dates tab, which uses the real clock change for your time zone.

How many hours is 9 to 5 (and 8am to 5pm, 7am to 3pm)?

9 to 5 is 8 hours, or 7.5 hours if you take an unpaid 30-minute lunch and 7 hours with an unpaid hour. 8am to 5pm is 9 hours (8.5 with a 30-minute lunch). 7am to 3pm is 8 hours (7.5 with lunch). The table above lists these and a few more, and each row loads straight into the calculator.

How do I convert military time (24-hour) to regular time?

From 0100 to 1259 the hour stays the same (0930 is 9:30 AM, 1230 is 12:30 PM). From 1300 to 2359 subtract 12 and add PM (1745 is 5:45 PM). 0000 is 12:00 AM (midnight) and 1200 is 12:00 PM (noon). Use the converter on this page for the exact result, or the 0000 to 2359 chart.

How do I calculate the time duration between two dates and times?

Use the Between two dates tab. Enter a start and end date and time, and pick a time zone for each if they differ. The result is shown as days, hours and minutes, plus decimal hours and total minutes. Because each moment is converted to a real UTC instant first, daylight saving changes are handled: the night the clocks go forward is one hour shorter, the night they go back is one hour longer.

What is the difference between hours and minutes and decimal hours?

Hours and minutes (H:MM) split a duration into 60-minute units, so 7:45 is seven hours and 45 minutes. Decimal hours express the same duration as a fraction of an hour: 45 minutes is 0.75, so 7:45 is 7.75 hours. Payroll systems usually want decimals (multiply by the hourly rate), while people read H:MM. The calculator shows both, plus total minutes, for every result.

How do I calculate hours in Excel or Google Sheets?

With the start time in A1 and the end time in B1, =MOD(B1-A1,1)*24 gives decimal hours and handles overnight shifts, and =MOD(B1-A1,1) formatted as h:mm gives hours and minutes. Subtract a break in minutes in C1 with =(MOD(B1-A1,1)-C1/1440)*24. To add many durations, use =SUM(A1:A10) and format the cell as [h]:mm so totals above 24 hours do not wrap. Copy-ready formulas are on this page.

Browse all free time and work tools, or continue with one below.

How many hours did you really work?

A calculator needs start and end times you remember. ScreenTimerAI for macOS logs your active computer time automatically, so the answer is already there. Privacy-first, your data stays on your device, one-time purchase.

Written and maintained by Linh, founder of ScreenTimerAI. Last reviewed . The calculation engine is covered by automated tests for 12 AM / 12 PM, midnight, overnight shifts, shifts over 24 hours and daylight saving nights. Everything runs in your browser.