terican

Last verified · v1.0

Calculator · general

Minutes Between Two Times Calculator

Calculate the exact number of minutes between any two times, including overnight shifts and multi-day intervals.

FreeInstantNo signupOpen source

Inputs

Minutes Between Times

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

Minutes Between Timesminutes

The formula

How the
result is
computed.

How the Minutes Between Two Times Calculator Works

The minutes between two times calculator converts any pair of clock times into an exact minute count using a proven arithmetic formula. This tool handles same-day intervals, overnight shifts, and multi-day spans without ambiguity, making it ideal for payroll, clinical scheduling, project tracking, and travel planning.

The Core Formula

The calculator uses the following formula to determine elapsed minutes:

Δm = (h₂ × 60 + m₂) − (h₁ × 60 + m₁) + 1440 × d

Each variable plays a specific role in the calculation:

  • h₁ — Start hour in 24-hour format (0 = midnight, 13 = 1:00 PM, 23 = 11:00 PM)
  • m₁ — Start minute (0–59)
  • h₂ — End hour in 24-hour format (0–23)
  • m₂ — End minute (0–59)
  • d — Total day offset: 1 when the end time falls on the next calendar day (Crosses Midnight = yes), plus the value of Additional Full Days Between. For a span from Monday to Wednesday, d equals 2.

Step-by-Step Derivation

The formula works by flattening each time into a single integer representing the total minutes elapsed since midnight. The start time becomes h₁ × 60 + m₁ and the end time becomes h₂ × 60 + m₂. Subtracting the start value from the end value gives the raw minute difference.

For overnight or multi-day intervals, the end time expressed as minutes since midnight will be numerically smaller than the start time, producing a negative difference. Multiplying 1440 — the number of minutes in one full 24-hour day — by the day offset d corrects this. According to the REDCap Special Functions documentation (University of Wisconsin), clinical date-time calculations convert timestamps to a shared numeric baseline before computing differences, which is precisely the principle this formula applies. Similarly, the Dates and Times in R guide from UC Berkeley Statistics confirms that statistical software stores times as numeric offsets from a reference point and converts them to human-readable units — a structurally identical approach.

Why 1440?

One full day contains exactly 1,440 minutes: 24 hours × 60 minutes per hour = 1,440. This constant appears across time-arithmetic libraries in R, Python, SPSS, and clinical research platforms. Each full midnight boundary crossed adds one instance of 1,440 to the total.

Worked Examples

Example 1: Standard Workday (Same Day)

Start: 9:15 AM → h₁ = 9, m₁ = 15 → 9 × 60 + 15 = 555 minutes

End: 5:45 PM → h₂ = 17, m₂ = 45 → 17 × 60 + 45 = 1,065 minutes

d = 0 (same calendar day, no midnight crossing)

Δm = 1,065 − 555 + 1,440 × 0 = 510 minutes (8 hours 30 minutes)

Example 2: Overnight Shift

Start: 11:00 PM → h₁ = 23, m₁ = 0 → 23 × 60 + 0 = 1,380 minutes

End: 7:30 AM (next day) → h₂ = 7, m₂ = 30 → 7 × 60 + 30 = 450 minutes

d = 1 (Crosses Midnight = yes, Additional Full Days = 0)

Δm = 450 − 1,380 + 1,440 × 1 = 510 minutes (8 hours 30 minutes)

Example 3: Multi-Day Interval

Start: Monday 8:00 AM → h₁ = 8, m₁ = 0 → 480 minutes

End: Wednesday 10:00 AM → h₂ = 10, m₂ = 0 → 600 minutes

d = 2 (Crosses Midnight = yes adds 1, Additional Full Days = 1)

Δm = 600 − 480 + 1,440 × 2 = 120 + 2,880 = 3,000 minutes (50 hours)

Common Use Cases

  • Payroll and shift tracking: Calculate exact minutes worked per shift, including split overnight schedules, for accurate wage computation
  • Medical dosing intervals: Determine elapsed minutes between medication administrations to ensure safe timing
  • Project and task management: Measure task durations precisely for billing, productivity analysis, and deadline planning
  • Travel and logistics: Compute layover durations, transit times, and delivery windows across calendar boundaries
  • Sports and fitness: Track training session lengths and recovery intervals between workouts or competitions

Reference

Frequently asked questions

How do you calculate minutes between two times that cross midnight?
When the end time is numerically earlier on the clock than the start time, midnight has been crossed. Add 1,440 minutes — one full 24-hour day — to the result using the day offset variable d. For example, from 10:30 PM to 6:00 AM: (6×60+0) minus (22×60+30) plus 1,440 equals 450 minutes, or exactly 7 hours and 30 minutes.
What is the formula for finding minutes between two times?
The formula is Δm = (h₂ × 60 + m₂) − (h₁ × 60 + m₁) + 1440 × d. Each time is converted to total minutes since midnight by multiplying the hour by 60 and adding the minutes. The start value is subtracted from the end value, and 1,440 is added for every calendar day boundary crossed. This single formula handles same-day, overnight, and multi-day intervals.
How many minutes are in a 24-hour day?
A 24-hour day contains exactly 1,440 minutes, calculated as 24 hours multiplied by 60 minutes per hour. This constant is the foundation of time-difference arithmetic and appears in date-time libraries across R, Python, and SPSS, as well as clinical data tools like REDCap. Any overnight interval adds 1,440 to the minute difference; each additional full day adds another 1,440.
How do you convert a time in hours and minutes into total minutes?
Multiply the hour by 60 and add the minutes to that product. For example, 3:45 PM expressed in 24-hour format is 15:45, which equals 15 × 60 + 45 = 945 minutes since midnight. This conversion flattens any clock time into a single integer, making subtraction between two times straightforward and unambiguous regardless of AM or PM.
Can this minutes calculator handle time spans longer than 24 hours?
Yes. Set Crosses Midnight to yes for any span that passes through at least one midnight, then enter the count of additional full days in the Additional Full Days Between field. The formula multiplies 1,440 by the combined day offset. A 50-hour span from Monday 8:00 AM to Wednesday 10:00 AM uses d = 2, yielding (600 − 480) + 1,440 × 2 = 3,000 minutes.
Why does this calculator use 24-hour format instead of AM and PM?
The 24-hour format assigns a unique integer to every hour from 0 (midnight) through 23 (11:00 PM), eliminating the AM and PM distinction entirely. This removes the classic 12-hour clock ambiguity where 12:00 AM and 12:00 PM differ by 720 minutes yet share the number 12. Medical, aviation, military, and shift-work scheduling all use 24-hour time for this reason — arithmetic on the values is always unambiguous.