Hours Calculator / Hours Between Two Times

Calculate hours between times with break deduction and overnight wrap. Includes 8:30 to 5:30, 8pm to 8am, hours to minutes, and decimal hour conversion.

01 calculator
Clock

Result

    Show the working

      The Hours Calculator finds the duration between a start time and an end time, in hours and minutes, then converts that duration to decimal hours for payroll or billing. Enter a clock-in and clock-out time, subtract an unpaid break, and the calculator handles shifts that cross midnight automatically. It also supports punch rounding to the nearest 5, 6, or 15 minutes, matching the rules most timekeeping systems apply before totaling a shift.

      Hours between two times

      Concept diagram: Start / end leads to hours between two times leads to ResultStart / endhours between two timesResult
      Hours between two times.

      Hours between two times is the end time minus the start time, expressed in hours and minutes rather than a single decimal figure until you ask for one.

      The calculator accepts times in 12-hour format with AM or PM, or in 24-hour format, and returns the span alongside the same result in decimal hours, total minutes, and total seconds.

      Enter a start time of 9:00 AM and an end time of 5:00 PM and the result is 8 hours 0 minutes, with no break applied yet. The tool treats the two times as points on a single day by default; a separate mode handles spans that run into a following day or across an explicit date range.

      Calculate hours between times on a timesheet

      Calculate hours between times the same way: convert both punches to minutes since midnight, subtract, then format back. That net figure is what belongs on a timesheet once any unpaid break is removed.

      Hours calculator between times with unpaid breaks

      Concept diagram: Raw span leads to subtract break leads to Net hoursRaw spansubtract breakNet hours
      Hours calculator between times with unpaid breaks.

      An unpaid break shortens the paid duration without changing the clock-in and clock-out times themselves. Enter break minutes separately, and the hours calculator between times subtracts them from the raw span to produce a net figure.

      A shift from 9:00 AM to 5:00 PM with a 30-minute unpaid lunch pays for 7 hours 30 minutes, not 8 hours. The calculator will not let the break exceed the shift length; entering a 9-hour break against an 8-hour span returns a blocking message rather than a negative duration, since a break longer than the shift is a data-entry error, not a valid input.

      8pm to 8am is how many hours

      Concept diagram: 8:00 PM leads to midnight wrap leads to 8:00 AM / 12 h8:00 PMmidnight wrap8:00 AM / 12 h
      8pm to 8am is how many hours.

      8pm to 8am is how many hours on an overnight shift: treat 8:00 AM as belonging to the following day. The calculator detects an end clock value earlier than the start and adds 24 hours internally, the same adjustment a payroll clerk makes when night-shift punches look backward on paper.

      Using the minutes formula below, 8:00 PM is 1,200 minutes since midnight and 8:00 AM is 480; after adding 1,440 for the midnight wrap, the span is 720 minutes, which is 12 hours with no break. The existing overnight fixture on this page, 11:00 PM to 7:00 AM, spans 8 hours by the same rule.

      Apply the duration formula

      Formula result = f(inputs), with variables: in is inputs, f is formula, out is resultresult = f(inputs)ininputsfformulaoutresult
      Apply the duration formula.

      The underlying arithmetic converts both times to minutes since midnight, subtracts, adjusts for an overnight crossing, then subtracts any break before formatting the result back to hours and minutes.

      startMinutes = startHour * 60 + startMinute
      endMinutes   = endHour * 60 + endMinute

      if endMinutes <= startMinutes: endMinutes += 1440 // crossed midnight

      duration = endMinutes - startMinutes - breakMinutes ```

      Formatting back divides the resulting minute count by 60 for the hours component and keeps the remainder as minutes. A duration of 510 minutes becomes 8 hours 30 minutes: 510 divided by 60 is 8 with a remainder of 30.

      8 30 to 5 30 is how many hours

      Concept diagram: 8:30 AM leads to 5:30 PM leads to 9 h raw / 8.5 net8:30 AM5:30 PM9 h raw / 8.5 net
      8 30 to 5 30 is how many hours.

      8 30 to 5 30 is how many hours for a common day shift: 8:30 AM to 5:30 PM.

      1. Convert both times to minutes since midnight. Start: 8:30 AM = 510 minutes. End: 5:30 PM = 17:30 = 1,050 minutes.

      2. Subtract for the raw span. 1,050 − 510 = 540 minutes, which is 9 hours 0 minutes with no break.

      3. Subtract a 30-minute unpaid break (when used). 540 − 30 = 510 minutes net.

      4. Format back to hours and minutes. 510 ÷ 60 = 8 remainder 30: 8 hours 30 minutes.

      5. Convert to decimal. 30 ÷ 60 = 0.5, so the net total is 8.5 decimal hours, the figure a payroll system multiplies by an hourly rate.

      Hours to hours and minutes from a decimal

      Scale bar: 1 decimal hours equals 1.87 hours and minutes1 decimal hours1.87 hours and minutes
      Hours to hours and minutes from a decimal.

      Hours to hours and minutes means splitting a decimal hour value into a whole-hours part and a minutes remainder. Multiply the fractional part by 60.

      What is 2.25 hours

      What is 2.25 hours in that split: the whole part is 2 hours, and 0.25 × 60 = 15 minutes, so 2 hours 15 minutes. The reverse path (minutes ÷ 60) is how the calculator builds decimal hours from a clock span.

      Hour conversion to decimal and total minutes

      Scale bar: 1 hours and minutes equals 1.87 decimal / total minutes1 hours and minutes1.87 decimal / total minutes
      Hour conversion to decimal and total minutes.

      Hour conversion on this page also covers payroll-style decimal storage. Minutes divided by 60 give the decimal fraction. Twenty-four minutes divided by 60 is 0.4, so a duration of 8 hours 24 minutes is 8.4 decimal hours. Six minutes is exactly 0.1 of an hour, which is why 6-minute rounding is common in systems built around decimal payroll.

      Hours to minutes calculator view of the same span

      An hours to minutes calculator view of any result is simply the duration left in total minutes before formatting. The 8:30 AM to 5:30 PM raw span is 540 minutes; after a 30-minute break it is 510 minutes. The calculator reports total minutes and total seconds beside the hours-and-minutes line.

      Time calculator hours versus this page

      Concept diagram: Hours Calculator leads to span vs sum leads to Time CalculatorHours Calculatorspan vs sumTime Calculator
      Time calculator hours versus this page.

      Time calculator hours questions sometimes belong on a different tool. The Hours Calculator measures the span between two clock times on a shift or schedule. It answers "how long was this," not "what do these durations add up to."

      A separate Time Calculator adds and subtracts duration values directly, such as combining several logged intervals into a running total. Anyone who already has a list of durations to sum, rather than a start time and an end time to measure, wants the Time Calculator instead. The two pages share a unit of measurement, not a function.

      Round start and end times

      Number line from 0 to 100 with the value 19 marked025507510019
      Round start and end times.

      Punch rounding adjusts each recorded clock time to the nearest rounding interval before the duration is calculated, not after. The Hours Calculator supports 5-minute, 6-minute, and 15-minute intervals, matching the rounding rules used by most timekeeping software. Applying rounding to the raw duration instead of to each punch can produce a different answer.

      A clock-in of 8:07 rounds to 8:00 and a clock-out of 17:03 rounds to 17:00 under 15-minute rounding, giving 9:00 either way in that particular case. But a clock-in of 8:07 and a clock-out of 16:52 round to 8:00 and 17:00 respectively, a 9-hour paid span, while rounding the raw 8-hour-45-minute duration alone would round it down to 8 hours 45 minutes instead. Rounding the punches, not the total, is what payroll systems actually do, so that is the default here.

      Calculate hours across dates

      Concept diagram: Start datetime leads to hours across dates leads to ResultStart datetimehours across datesResult
      Calculate hours across dates.

      A span that runs longer than a single day, such as a multi-day on-call period or a project logged from one date and time to another, needs the date-aware mode of the Hours Calculator.

      Enter a start date and time and an end date and time, and the calculator computes the full elapsed duration across as many days as separate them.

      A period from 6:00 PM on a Friday to 9:00 AM the following Monday spans 2 days, 15 hours, which the calculator also reports as 63 hours and as 2,625 decimal minutes-equivalent detail for anyone tracking an on-call rotation by the hour rather than by the shift.

      Frequently asked questions

      How do I calculate hours between two times?

      Enter a start time and an end time. The calculator converts both to minutes since midnight, subtracts the start from the end, adjusts automatically if the end time falls on the following day, and returns the result in hours and minutes alongside a decimal hours figure.

      How do I subtract a lunch break from hours worked?

      Enter the break length in minutes in the break field. The calculator deducts it from the raw span between the start and end time to produce the net paid duration.

      How does the calculator handle a night shift that crosses midnight?

      Any end time that is numerically earlier than the start time is treated as falling on the following day. An 11:00 PM to 7:00 AM shift returns 8 hours, with the midnight crossing noted in the breakdown rather than treated as an error.

      What is 8 hours 30 minutes in decimal?

      8 hours 30 minutes is 8.5 decimal hours, since 30 minutes divided by 60 equals 0.5. The calculator shows this conversion on every result automatically.

      What is the difference between the Hours Calculator and the Time Calculator?

      The Hours Calculator measures the span between a start time and an end time. The Time Calculator adds and subtracts a list of duration values that are already known, such as combining several logged intervals. They answer different questions even though both display hours and minutes.

      How does punch rounding work?

      Rounding is applied to the start and end time individually, before the duration is calculated, using the chosen interval of 5, 6, or 15 minutes. This matches how most payroll timekeeping systems round a punch, and can produce a different total than rounding the finished duration would.

      Can the calculator handle a break longer than the shift?

      No. A break entered longer than the raw span between the start and end time returns a blocking message rather than a negative result, since that combination almost always indicates a data-entry mistake in one of the times.

      Can I calculate hours across two different dates?

      Yes. Switching to the date-aware mode lets you enter a start date and time and an end date and time separately, and the calculator returns the full elapsed duration across however many days separate them.

      Why is my decimal hours total not a round number?

      Decimal hours rarely land on a round number because minutes do not divide evenly into most fractions of an hour. 24 minutes is exactly 0.4 hours and 6 minutes is exactly 0.1, but most other minute counts produce a repeating or multi-digit decimal, which the calculator rounds to two decimal places for display.

      Summary

      The Hours Calculator converts a start time and an end time into a net duration in hours and minutes, handling unpaid breaks, overnight shifts, and punch rounding the way a payroll timesheet requires. Every result also converts to decimal hours, total minutes, and total seconds.

      The calculator measures a span between two clock times; a separate Time Calculator sums duration values that are already known, and the two should not be confused for the same tool.