Matemática

Hours Between Two Times Calculator

Calculate exact hours and minutes between any two clock times. Handles overnight shifts automatically, deducts break time, and shows results in decimal hours, HH:MM, and total minutes — free and instant.

🗓️ Updated June 2026 Reviewed by
Calculator Free · Private
Reviewed by: (editorial policy ) · Last reviewed:
Have a website? Embed this calculator for free Free — copy the code and paste it on your website Embed on your site
<iframe src="https://hacecuentas.com/embed/hours-between-times-calculator" width="100%" height="560" style="border:1px solid #e2e8f0;border-radius:12px;max-width:720px" loading="lazy" title="Hours Between Two Times Calculator"></iframe>
<p style="font-size:13px;text-align:center;margin:8px 0">Powered by <a href="https://hacecuentas.com" target="_blank" rel="noopener">Hacé Cuentas</a> — <a href="https://hacecuentas.com/hours-between-times-calculator" target="_blank" rel="noopener">Hours Between Two Times Calculator</a></p>
Preview →

Paste it on your site. Keep the credit link — thanks for sharing. More widgets →

Whether you're a nurse wrapping up an overnight shift, a freelancer billing a client, or an HR manager auditing timesheets, knowing the exact hours between two clock times matters — down to the minute. This free calculator eliminates the mental math and the errors that come with it.

Just pick your start time and end time from the dropdowns. Have an unpaid lunch or rest period? Drop those minutes into the break field and they're automatically deducted from your total. Results appear instantly in three formats: decimal hours (ideal for payroll and invoicing), HH:MM (great for schedules and readability), and total minutes (useful for fitness tracking, study logs, and productivity apps).

One of the most common headaches in manual time math is the overnight shift — when your end time is earlier than your start time. The calculator detects this automatically and adds the correct 24-hour offset, so a 10:00 PM to 6:00 AM shift correctly returns 8 hours without any workarounds.

Break deductions follow FLSA logic: under US federal law, rest breaks of 20 minutes or fewer are generally compensable, while bona fide meal periods (typically 30 minutes or more, with no work duties) may be unpaid. Enter only your unpaid break time in the break field to get your compensable hours.

When to use this calculator

  • Hourly Payroll — Standard Office Shift — An administrative assistant works 8:30 AM to 5:00 PM with a 30-minute unpaid lunch. The calculator returns 8.00 decimal hours (480 minutes). At $22/hr, gross pay for the day is $176.00 — ready to plug directly into the payroll system without any manual conversion.
  • Overnight Nursing Shift — A hospital RN clocks in at 7:00 PM and out at 7:30 AM, with two 15-minute paid breaks (not deducted). The overnight logic kicks in automatically: the result is 12.50 hours (12:30). At an hourly rate of $38, that's $475.00 gross before overtime calculations.
  • Freelance Consultant Billing — A UX consultant runs a client workshop from 9:00 AM to 1:45 PM with no breaks. The calculator returns 4.75 decimal hours. At a billing rate of $150/hr, the invoice line reads $712.50 — no rounding disputes, no ambiguous 'approximately 5 hours' language.
  • Split-Shift Restaurant Worker — A server works 10:00 AM–2:00 PM (lunch rush) and returns for 5:00 PM–10:30 PM (dinner). Running the calculator twice yields 4.00 + 5.50 = 9.50 hours. With a $15/hr base wage, that's $142.50 for the day before tips — clear documentation for the weekly timesheet.
  • Truck Driver Hours-of-Service Log — A CDL driver departs at 5:45 AM and completes a run at 2:15 PM with a 45-minute DOT-mandated rest break. Net driving/on-duty time: 7.50 hours (7:30). This stays within the FMCSA 11-hour driving limit and the 14-hour on-duty window.
  • Study Session Tracker — A college student studies from 6:30 PM to 11:15 PM and takes a 20-minute phone break. Net focused time: 4.42 hours (4:25). Logging this over a week reveals an average of 4–5 productive hours per evening — useful data for adjusting study habits before finals.
  • Event Production Scheduling — A venue manager calculates crew time: load-in starts at 7:00 AM, doors open at 6:00 PM, and the show ends at 11:30 PM. Two calculations — setup (11.00 hrs) and show (5.50 hrs) — total 16.50 hours of staffed event time.
  • Security Guard Overnight Patrol — A security officer starts at 11:00 PM and ends at 7:00 AM, with a 30-minute unpaid break at 3:00 AM. The overnight offset is applied automatically; deducting the break returns 7.50 net hours (7:30). At $18/hr, the shift costs $135.00.

Common Shift Durations: Hours & Minutes Reference

StartEndBreakDecimal HoursHH:MMTotal Minutes
6:00 AM2:00 PM30 min7.507:30450
7:00 AM3:30 PM30 min8.008:00480
8:00 AM4:00 PM0 min8.008:00480
9:00 AM5:00 PM30 min7.507:30450
9:00 AM5:30 PM30 min8.008:00480
12:00 PM8:00 PM30 min7.507:30450
2:00 PM10:00 PM30 min7.507:30450
7:00 PM7:00 AM0 min12.0012:00720
10:00 PM6:00 AM30 min7.507:30450
11:00 PM7:00 AM30 min7.507:30450

Fuente: U.S. Department of Labor, Wage and Hour Division — FLSA Hours Worked (2026). Break deductions reflect unpaid meal periods per FLSA guidelines; rest breaks of 20 min or fewer are generally compensable and should not be entered as breaks.

How it works

How to Calculate Hours Between Two Times

To find the hours between two times, convert both to minutes from midnight, subtract, apply an overnight correction if the result is negative, subtract any unpaid break, then divide by 60.

Formula:

startMinutes = startHour × 60 + startMin
endMinutes   = endHour   × 60 + endMin

diffMinutes = endMinutes − startMinutes
IF diffMinutes < 0 THEN diffMinutes += 1440   // overnight: add 24 h

netMinutes   = diffMinutes − breakMinutes
decimalHours = netMinutes ÷ 60

The constant 1,440 equals 24 × 60 — adding it when the difference is negative handles any shift crossing midnight without needing a date.

Quick-Reference: Common Shift Durations

StartEndBreakNet hours (decimal)Net (HH:MM)Minutes
6:00 AM2:00 PM30 min7.507:30450
7:00 AM3:30 PM30 min8.008:00480
8:00 AM4:00 PM08.008:00480
9:00 AM5:00 PM30 min7.507:30450
9:00 AM5:30 PM30 min8.008:00480
12:00 PM8:00 PM30 min7.507:30450
2:00 PM10:00 PM30 min7.507:30450
7:00 PM7:00 AM012.0012:00720
10:00 PM6:00 AM30 min7.507:30450
11:00 PM7:00 AM30 min7.507:30450

Overnight Shift — Step-by-Step Example

  • Start = 10:00 PM → 22 × 60 = 1,320 minutes

  • End = 6:00 AM → 6 × 60 = 360 minutes

  • Raw diff = 360 − 1,320 = −960 → add 1,440 → 480 minutes

  • Subtract 30 min break → 450 net minutes

  • 450 ÷ 60 = 7.50 decimal hours (7:30)
  • Converting Decimal Hours to Pay

    Multiply decimal hours directly by the hourly rate — no conversion needed:

  • 7.50 hrs × $18.00/hr = $135.00

  • 8.00 hrs × $22.50/hr = $180.00

  • 12.50 hrs × $38.00/hr = $475.00
  • Decimal Hours ↔ HH:MM Conversion

    To convert decimal hours to HH:MM manually: take the decimal part and multiply by 60 to get minutes.

  • 8.75 hrs → 0.75 × 60 = 45 min → 8:45

  • 6.33 hrs → 0.33 × 60 ≈ 20 min → 6:20

  • 4.50 hrs → 0.50 × 60 = 30 min → 4:30
  • Reverse: divide minutes by 60 and add to whole hours → 4h 45m = 45 ÷ 60 = 0.75 → 4.75 hrs.

    Limitations

  • Single calendar span only. Shifts longer than 24 hours require splitting into segments.

  • No DST logic. On spring-forward/fall-back nights, manually add or subtract 1 hour.

  • Break input is a single total. Sum multiple break periods before entering.
  • Frequently asked questions

    How do I calculate hours between two times?
    Convert both times to minutes from midnight, subtract start from end, add 1,440 if the result is negative (overnight), subtract any unpaid break minutes, then divide by 60. Example: 9:00 AM = 540 min, 5:30 PM = 1,050 min, diff = 510 min, minus 30 min break = 480 min, ÷ 60 = 8.00 hours.
    How does the overnight shift calculation work?
    When your end time is earlier than your start time, the calculator automatically adds 1,440 minutes (24 hours). Example: 11:00 PM (1,380 min) to 7:00 AM (420 min) → 420 − 1,380 = −960 → add 1,440 → 480 minutes = 8 hours. This handles any overnight scenario up to 23 hours 59 minutes without a date.
    What break time should I enter — paid or unpaid?
    Enter only your unpaid break time. Under the US FLSA, rest breaks of 20 minutes or fewer are compensable and should not be deducted. Bona fide meal periods of 30 minutes or more (where employees are completely relieved of duties) may be unpaid. If you have a 30-minute unpaid lunch and two 10-minute paid coffee breaks, enter only 30 minutes.
    What is the difference between decimal hours and HH:MM format?
    Decimal hours express time as a number (7 hours 30 minutes = 7.50) — essential for payroll math: 7.50 × $20/hr = $150.00. HH:MM expresses the same time as 7:30 for schedules and timesheets. Both are provided so you can use whichever fits your context.
    How do I manually convert decimal hours to hours and minutes?
    Take the decimal portion and multiply by 60: 8.75 hrs → 0.75 × 60 = 45 min → 8 h 45 min. 6.33 hrs → 0.33 × 60 ≈ 20 min → 6 h 20 min. Reverse: 4 hrs 45 min → 45 ÷ 60 = 0.75 → 4.75 hrs.
    Can I use this calculator for payroll purposes?
    Yes — decimal hours plug directly into payroll: decimal hours × hourly rate = gross wages. For example, 8.50 hrs × $17.50/hr = $148.75. That said, this tool is a verification aid, not a replacement for certified payroll software. It does not store records, apply FLSA overtime rules (time-and-a-half after 40 hours/week), or account for state-specific wage laws.
    Does this calculator account for Daylight Saving Time (DST)?
    No. The calculator performs pure arithmetic on clock times with no date context. On spring-forward nights (clocks jump from 2:00 AM to 3:00 AM), actual elapsed time is one hour shorter than the clock difference. On fall-back nights, it is one hour longer. Manually adjust ±1 hour on those specific nights.
    What if my start and end times are exactly the same?
    The calculator returns 0 hours 0 minutes (0.00). There is no way to distinguish a zero-duration entry from a full 24-hour shift using clock times alone. For a genuine 24-hour period, split it into two segments or use a date-time calculator that accepts full timestamps.
    How do I calculate hours for a split shift?
    Run the calculator once for each segment, then add the decimal results. Example: 9:00 AM–1:30 PM = 4.50 hrs, plus 4:00 PM–9:30 PM = 5.50 hrs, total = 10.00 hours. The unpaid gap between segments is simply not entered — it's automatically excluded.
    What is the maximum shift duration this calculator handles?
    Up to 23 hours and 59 minutes (1,439 total minutes) gross, before any break deduction. This covers all standard shifts including 12-hour hospital shifts, 14-hour trucking on-duty periods, and extended production days. For periods longer than 24 hours, split the calculation or use a date-time difference tool.
    Can I calculate hours across different time zones?
    This calculator works only on clock times within a single time zone. First convert all times to a common reference (typically UTC or one local time zone), then enter the converted start and end times. The calculator accurately computes the difference between whatever times you enter.
    Why does the result show 8.00 instead of just 8?
    Two decimal places are always shown for consistency and clarity. When adding multiple shift results in a spreadsheet (8.00, 7.75, 6.50), uniform decimal formatting makes columns easier to sum and the values immediately identifiable as decimal numbers ready for multiplication — not integer counts.

    Sources & references

    Methodology & trust

    Editorial

    Calculadora de matemática revisada por el equipo editorial de Hacé Cuentas, contrastada con FLSA Hours Worked — U.S. Department of Labor, según nuestra política editorial y metodología.

    Updates

    Última revisión: June 20, 2026. Los parámetros se verifican periódicamente con las fuentes citadas.

    Privacy

    Calculations run 100% in your browser. We do not store or transmit your data.

    Limitations

    Indicative results. For critical decisions, consult a professional.

    📌 How to cite this calculator

    Rodríguez, M. (2026). Hours Between Two Times Calculator. Hacé Cuentas. https://hacecuentas.com/hours-between-times-calculator

    Contenido bajo licencia CC-BY 4.0 — reutilizable citando la fuente con enlace a Hacé Cuentas.

    ✉️ Reportar un error en esta calculadora