Quick Time Difference Tool

Time Between Two Times Calculator

Calculate exact hours and minutes difference between any two timestamps with quick presets and break deduction.

Quick Presets:
HR
:
MIN
HR
:
MIN
mins
Time Difference
8 hrs 0 mins
Decimal Hours 8.00 hrs
Total Minutes 480 mins
Total Seconds 28,800 secs
00:00 (12 AM) 35.4% of 24h Day 24:00 (Midnight)
Step-by-Step Guide

How to Use This Calculator

STEP 1
01 / 04

Enter Start Time

Select the hour, minute, and AM/PM (or 24-hour mode) for your starting timestamp, or click a Quick Preset below.

STEP 2
02 / 04

Enter End Time

Enter the concluding timestamp. The calculator automatically checks if your span crosses midnight.

STEP 3
03 / 04

Optional Break Deduction

Enter any unpaid break or lunch minutes to calculate net elapsed duration.

STEP 4
04 / 04

View Exact Time Difference

Instantly view total hours & minutes, decimal hours, and step-by-step arithmetic.

Mathematical Proofs

Mathematical Formulas & Rules

Standard Same-Day Time Difference Formula

Duration = (End_Hours × 60 + End_Minutes) − (Start_Hours × 60 + Start_Minutes)
Variable Definitions:
  • End_Hours, End_Minutes = Ending timestamp converted to minutes from midnight
  • Start_Hours, Start_Minutes = Starting timestamp converted to minutes from midnight

Cross-Midnight Overnight Formula

Duration = ((End_Hours + 24) × 60 + End_Minutes) − (Start_Hours × 60 + Start_Minutes)
Variable Definitions:
  • + 24 Hours = 1,440 minutes added when the end time occurs on the following calendar day
Practical Applications

Worked Calculation Examples

Step-by-step breakdown of common real-world time scenarios, work shifts, and duration math.

Example 1 Verified Math

Morning to Afternoon Shift

Scenario

Calculating time worked between 8:30 AM and 4:45 PM with a 30-minute lunch break.

Calculation: (16:45 − 08:30) − 30m = 8h 15m − 30m
Result: 7 hours 45 minutes net (7.75 Decimal Hours)
Example 2 Verified Math

Overnight Graveyard Shift

Scenario

Measuring shift duration from 10:15 PM to 6:45 AM with a 45-minute unpaid break.

Calculation: (30:45 − 22:15) − 45m = 8h 30m − 45m
Result: 7 hours 45 minutes net billable (7.75 hrs)
Example 3 Verified Math

Short Task Interval

Scenario

Timing a focus session between 2:10 PM and 3:55 PM.

Calculation: 15:55 − 14:10 = 1 hour 45 minutes
Result: 1 hour 45 minutes (1.75 Decimal Hours = 105 mins)

How to Calculate the Time Between Two Times

Finding the exact difference between two timestamps is essential for scheduling appointments, logging work shifts, calculating travel durations, and coordinating across time zones. For advanced second-by-second precision and live mathematical proof steps, use our flagship Time Duration Calculator, or calculate work shifts with meal breaks on our Work Hours Calculator.

1. Base-60 Subtraction & Regrouping

Because time is measured in base-60 (sexagesimal) rather than base-10 (decimal), subtracting minutes requires borrowing 60 minutes from the adjacent hour whenever the end minute is smaller than the start minute (see our Military Time Converter to convert AM/PM times into 24-hour format first):

  • Example: Calculate time between 8:45 AM and 4:15 PM.
  • Step 1 (24-Hour Conversion): 8:45 AM = 08:45, 4:15 PM = 16:15.
  • Step 2 (Regrouping): Since 15 minutes is smaller than 45 minutes, borrow 1 hour (60 minutes) from 16 hours, making it 15 hours 75 minutes.
  • Step 3 (Subtraction): 15:75 − 08:45 = 7 hours 30 minutes.

2. Cross-Midnight (Graveyard Shift) Calculations

When a shift starts late in the evening and concludes the following morning (e.g. 10:00 PM to 6:30 AM), a naive subtraction produces a negative number (6.5 − 22 = −15.5). In modular 24-hour arithmetic, add 24 hours (1,440 minutes) to the end time: (6:30 + 24:00) − 22:00 = 30:30 − 22:00 = 8 hours 30 minutes. For general shift duration, you can also use the Hours Calculator.

Frequently Asked Questions

How do I calculate the time between two times?

Enter your start time and end time into the calculator. If your end time occurs on the next day (e.g. 9:00 PM to 5:00 AM), check the overnight toggle or let the calculator automatically resolve the 24-hour difference.

What is the formula for calculating time between two times?

Duration = End Time (in minutes from midnight) − Start Time (in minutes from midnight). If End Time < Start Time, add 1,440 minutes (24 hours) to End Time before subtracting.

Mathematical Accuracy & Editorial Review

All calculations on this tool are deterministic and rigorously tested against base-60 modulo arithmetic and US Fair Labor Standards Act (FLSA 29 CFR § 785.48) payroll rounding guidelines.

Reviewed by: Time Mathematics & Payroll Editorial Team Last Updated: April 2026