Time & DurationTIME & DATE TOOLS
Time Math ReferenceBase-60 Sexagesimal
1 Hour:60 Minutes • 3,600 Seconds
Standard Week:40 Hours (5 × 8h)
Full Work Year:2,080 Hours (52 wks)
Gregorian Calendar Year:365 Days (366 in Leap Years)
Runs locally in your browser
TimeAndDuration Editorial Team

Time Duration Calculator

Hours, Minutes & Seconds

Calculating elapsed duration by hand is prone to errors due to base-60 sexagesimal math and midday or cross-midnight rollovers. Calculate elapsed hours, minutes, and seconds directly in your browser between any two times, convert to payroll decimal hours, and review shift intervals accurately.

Handles 12-hour, 24-hour, and cross-midnight calculations
Calculator inputs are processed locally in your browser
Why Trust Our Math

How Time Duration Is Calculated

Elapsed Time

Elapsed duration represents the precise interval between a start time and an end time. The calculation converts both times into total minutes from midnight, adjusts automatically if an overnight span crosses 12:00 AM, and expresses the net interval in clock hours, minutes, and payroll decimal hours.

Common Duration Intervals:
Related calculations:•
Flagship Calculation Engine

Time Duration Calculator

Calculated locally in your browser
Quick Time Presets:
09:00 AM
05:30 PM
Calculated Elapsed Time
8 hours 30 minutes

Elapsed Interval: 09:00 AM to 05:30 PM

Decimal Hours8.50h
Total Minutes510m
Total Seconds30,600s
Calculation Methodology & Formula

How to Calculate Time Between Two Times

Direct Answer

To calculate elapsed time, subtract the start time from the end time. If the interval crosses midnight, account for the change of day by adding 24 hours to the end time. Subtract unpaid breaks when calculating net work time.

Core Time Duration Equation
Duration = End Time − Start Time

Converts total clock values to monotonic minutes: (End H × 60 + End M) − (Start H × 60 + Start M).

Overnight Intervals & Date Normalization
If End Time < Start Time: Modified End = End Time + 24:00 (1,440 min)

Normalizes dates across midnight so overnight shift durations remain positive and continuous.

Worked Example: 9:00 AM to 5:30 PM (With 30-Minute Break)

Input Times

Start: 9:00 AM • End: 5:30 PM

24-hour: 09:00 to 17:30 (540 to 1,050 mins)

Calculated Result

Elapsed Duration: 8 hours 30 minutes

With 30-min unpaid break: Net work time = 8 hours (8.00 hrs)

  1. Convert to 24-hour military notation: 9:00 AM becomes 09:00. 5:30 PM becomes 17:30 (5 + 12 = 17).
  2. Calculate gross elapsed duration: Subtract 09:00 from 17:30 = 8 hours 30 minutes (8.50 decimal hours or 510 total minutes).
  3. Deduct unpaid meal break: Subtract 30 minutes: 510 mins − 30 mins = 480 net minutes.
  4. Determine net work time for payroll: Divide by 60: 480 ÷ 60 = 8.00 net decimal hours.

Edge Cases & Calculation Assumptions

Overnight Shifts

When end time is earlier than start time (e.g., 10:00 PM to 6:00 AM), our engine automatically adds 24 hours (1,440 minutes) to eliminate negative results.

Equal Start & End Times

Start and end times of 9:00 AM to 9:00 AM indicate 0 hours elapsed for instantaneous checks, or 24 hours (1,440 minutes) for a complete diurnal cycle.

Unpaid Break Handling

Under US FLSA regulations, bona fide meal breaks of 30+ minutes where the employee is relieved of duties are deducted from payable hours.

Decimal Hour Rounding

Clock minutes use base-60 math while payroll software uses base-10 decimals (Minutes ÷ 60). For example, 7:30 = 7.50 hrs, not 7.30 hrs.

Input Validation

Inputs are validated in browser memory to ensure minutes stay within 00–59 and hours remain in valid 12-hour or 24-hour ranges without page crashes.

Privacy & Security

All calculations execute locally in your browser memory via client-side JavaScript. Calculation inputs are not sent to our calculation servers.

Topical Authority Architecture4 Focus Clusters

Choose Your Calculation: Focused Topic Clusters

Organized into 4 high-authority topical pillars. Supporting search intents are consolidated directly into comprehensive calculation engines to eliminate thin duplicate pages.

Priority 1 Core Pillar

Cluster 1: Time Duration & Time Difference

Primary target: time duration calculator

Matches the site's primary purpose. Computes exact elapsed clock duration, sub-minute intervals, cross-midnight shifts, and multi-row cumulative totals.

Supporting Topics Mapped:
  • Calculate hours between two times
  • Time difference in hours and minutes
  • Calculate time across midnight (24h rollover)
  • Minutes and seconds between times
  • Add or subtract hours and minutes
Why first: Closely matches the site's main purpose. Consolidates overlapping queries into the primary calculation engine to avoid duplicate thin pages.
Priority 1 Pillar

Cluster 2: Work Hours & Payroll Calculations

Primary target: work hours calculator

Streamline employee punch records, deduct mandatory unpaid lunch breaks, convert minutes to decimal hours, and audit 1.5x overtime wages.

Supporting Topics Mapped:
  • Work hours calculator with lunch break
  • Overnight shift calculator (graveyard splits)
  • Hours and minutes to decimal hours
  • Calculate weekly working hours
  • Time clock calculator for timesheets (7-minute rule)
Important: Distinguish a time arithmetic tool from legal payroll or overtime advice. Calculators compute mathematical elapsed durations based on user inputs.
Priority 2 Pillar

Cluster 3: Date Duration & Calendar Calculations

Primary target: date duration calculator

Compute net working business days, contract delivery lead times, project milestone spans, leap year occurrences, and chronological age.

Supporting Topics Mapped:
  • Days between two dates
  • Weeks and days between dates
  • Add days to a date (future/past projection)
  • Leap-year calculator (400-year cycle)
  • Calculate age between dates
Differentiator: Explicitly explains whether results use elapsed days (24h continuous), calendar months (28–31 variable days), or complete astronomical years.
Priority 3 Pillar

Cluster 4: Time Conversion & Developer Utilities

Primary target: time unit converter

Run precision interval measurements, track multi-lap splits, calculate event countdowns, synchronize international world clocks, and convert Unix epoch timestamps.

Supporting Topics Mapped:
Differentiator: Precisely documents unit definitions (base-60 scaling), Unix POSIX epoch seconds vs milliseconds, and daylight-saving time (DST) shifts.
Integrity & Standards

Why Trust Our Math

Time, date, and payroll math shouldn't be a mystery. The TimeAndDuration Editorial Team builds and maintains every calculation engine using publicly verifiable mathematical formulas, clear boundary rules, and client-side privacy.

Official Regulatory & Scientific Benchmarks

Our dedicated timesheet and rounding tools reference US Department of Labor FLSA guidelines (such as 29 CFR § 785.48 for 15-minute rounding). Calendar tools reference ISO-8601 interval structures and Gregorian leap calendar rules.

Client-Side Calculation Privacy

Every formula executes entirely inside your browser's local JavaScript engine. Your punch-in times, payroll rates, and date inputs remain on your device and are not submitted to our calculation servers.

Continuous Editorial Oversight

All tools, articles, and conversion tables are authored, tested, and updated collectively by the TimeAndDuration Editorial Team. We continuously review our logic against leap years, federal holiday changes, and statutory standards.

Calculation Methodology & Mathematical Principles

Transparent rules governing how our temporal engines compute duration, interpret hours, and resolve edge cases

1. Sexagesimal Elapsed Math

Both start and end times are mapped to continuous monotonic minutes: Total Mins = Hours × 60 + Minutes. The raw duration is the mathematical delta between the two totals.

2. Cross-Midnight Normalization

When the end time is numerically less than the start time (e.g. 10:00 PM to 6:30 AM), our engine detects the diurnal rollover and adds 24 hours (1,440 minutes) to the end time to prevent negative durations.

3. 12-Hour & 24-Hour Parsing

In 12-hour AM/PM notation, 12:00 AM resolves to 00:00, while PM hours 1 through 11 add 12 to synchronize with standard civil clock time. In 24-hour military notation, values 00:00 through 23:59 parse directly.

4. Decimal Hours Conversion

Payroll accounting software (ADP, Paychex, QuickBooks) requires decimal hours rather than sexagesimal minutes. Remaining minutes are divided by 60 and formatted to two decimal places (e.g., 8h 30m = 8.50h).

Maintained by the TimeAndDuration Editorial Team

Have a formula question, correction, or edge-case feedback? We review practitioner inquiries within 48 hours.

AUTHORITATIVE TECHNICAL GUIDE & REFERENCE

Time Duration & Temporal Mathematics Guide

Calculate elapsed time between start and end clock times in hours, minutes, and seconds across same-day and overnight intervals. Reviewed by technical temporal calculation specialists for compliance across US labor rules, legal periods, and engineering standards.

Mathematical Methodology

How Time Duration Conversion Works (Calculation Method)

Our converter implements standardized sexagesimal (base-60) arithmetic to eliminate borrowing errors across hours, minutes, and seconds.

Direct Answer Summary (AEO)

To calculate elapsed time, subtract the start time from the end time. If the interval crosses midnight, account for the change of day by adding 24 hours (1,440 minutes) to the end timestamp. Subtract unpaid breaks when calculating net work time.

Core Calculation Formula

Total Milliseconds = (Hours × 3,600,000) + (Minutes × 60,000) + (Seconds × 1,000) + Milliseconds

1

Input Unification to Baseline Milliseconds

Convert all user inputs (hours, minutes, seconds, and milliseconds) into a single baseline integer in milliseconds.

2

Exact Mathematical Delta Calculation

Subtract baseline start milliseconds from baseline end milliseconds (or apply the requested unit multiplier).

3

Base-60 Modular Decomposition

Extract whole hours by integer division by 3,600,000, then extract whole minutes from the remainder using division by 60,000.

4

Multi-Unit Output Generation

Format the decomposed duration into human-readable clock strings and precise decimal unit equivalents.

Calculation Edge Cases & Assumptions

Overnight Shifts (Cross-Midnight)

Condition: End time is earlier than start time (e.g., 10:00 PM to 06:00 AM)

Rule: Add 24 hours (1,440 minutes or 86,400 seconds) to the morning end timestamp before subtracting start time to eliminate negative duration results.

Equal Start and End Times

Condition: Start time and end time are identical (e.g., 09:00 AM to 09:00 AM)

Rule: Represents 0 hours 0 minutes for instantaneous events, or exactly 24 hours 0 minutes (1,440 minutes) when measuring a full calendar diurnal cycle.

Unpaid Meal Break Deductions

Condition: Employee logs scheduled meal periods during a work shift

Rule: Under US FLSA guidelines, bona fide meal breaks of 30 minutes or longer where the worker is relieved of duties are non-compensable and deducted from gross elapsed time.

Decimal Hour Rounding for Payroll

Condition: Converting sexagesimal clock minutes to base-10 payroll decimals

Rule: Divide clock minutes by 60 (e.g., 30 mins ÷ 60 = 0.50 decimal hours; 45 mins ÷ 60 = 0.75 decimal hours). Standard payroll packages round to 2 decimal places.

Input Range Sanitization

Condition: Entering minutes > 59 or invalid AM/PM clock configurations

Rule: Client-side arithmetic normalizes inputs into valid base-60 minute intervals (00–59) and 24-hour military spans (00:00–23:59) to prevent NaN errors.

Technical Compliance Note: Precision Differentiator: Unit definitions are strictly anchored to base-60 sexagesimal scaling (1 hour = 60 minutes = 3,600 seconds = 3,600,000 ms). All intermediate calculations execute in high-precision 64-bit IEEE 754 floating point numbers to eliminate decimal drift across large spans.
Real-World Case Studies

Step-by-Step Worked Calculation Examples

Practical real-world scenarios demonstrating step-by-step mathematical calculations.

Standard Business Shift (9:00 AM to 5:30 PM with Break)

Start: 09:00 AMEnd: 05:30 PM

Scenario: A full-time employee logs into their shift at 09:00 AM and clocks out at 05:30 PM, taking a scheduled 30-minute unpaid lunch break.

Calculation Steps:
1
Normalize to 24-Hour Military Format

09:00 AM converts to 09:00. 05:30 PM converts to 17:30 (5 + 12 = 17).

2
Subtract Start from End Time

Subtract hours and minutes: 17:30 − 09:00 = 8 hours and 30 minutes (510 gross minutes).

3
Deduct Unpaid Meal Break

Deduct 30 unpaid lunch minutes: 510 minutes − 30 minutes = 480 net payable minutes.

4
Convert to Payroll Decimal Hours

Divide net minutes by 60: 480 ÷ 60 = 8.00 net decimal hours (gross elapsed is 8.50 decimal hours).

Final Calculated Interval:Gross elapsed: 8 hours 30 minutes (8.50h). Net work time: 8 hours 00 minutes (8.00h).

Overnight Graveyard Shift (10:00 PM to 6:30 AM)

Start: 10:00 PMEnd: 06:30 AM (Next Day)

Scenario: A healthcare nurse starts a night shift at 10:00 PM and finishes at 06:30 AM the next morning, taking a 30-minute unpaid meal break.

Calculation Steps:
1
Normalize to 24-Hour Military Time

10:00 PM becomes 22:00. 06:30 AM becomes 06:30.

2
Apply Cross-Midnight +24h Normalization

Because 06:30 < 22:00, add 24 hours to morning end time: 06:30 + 24:00 = 30:30.

3
Calculate Gross Elapsed Duration

Subtract start from normalized end: 30:30 − 22:00 = 8 hours and 30 minutes (510 gross minutes).

4
Subtract Break & Convert to Decimals

510 minutes − 30 minutes break = 480 net minutes = 8.00 net decimal hours.

Final Calculated Interval:Gross elapsed: 8 hours 30 minutes (8.50h). Net shift duration: 8 hours 00 minutes (8.00h).
Reference Data Matrix

Time Unit Conversion Reference Table & Rules

Use these exact mathematical multipliers to convert between time units manually.

Source UnitEquivalent MillisecondsEquivalent SecondsEquivalent Hours
1 Millisecond1 ms0.001 sec0.0000002778 hrs
1 Second1,000 ms1.0 sec0.0002778 hrs
1 Minute60,000 ms60.0 sec0.01667 hrs
1 Hour3,600,000 ms3,600.0 sec1.0 hr
1 Day (24h)86,400,000 ms86,400.0 sec24.0 hrs
1 Week (7d)604,800,000 ms604,800.0 sec168.0 hrs
Standard Operational Rules & Best Practices
Multiply hours by 60 to convert to minutes (e.g., 2.5 hrs × 60 = 150 mins).
Divide minutes by 60 to convert to decimal hours (e.g., 45 mins ÷ 60 = 0.75 hrs).
Multiply seconds by 1,000 to obtain exact millisecond duration.
Multiply days by 24 to find total elapsed hours.
People Also Ask (PAA)

Frequently Asked Questions & Scenarios

To convert decimal hours into standard clock hours and minutes, keep the whole integer as the hour component and multiply the decimal fraction by 60 minutes. For instance, with 7.75 decimal hours: 1. Identify the whole number: 7 hours. 2. Extract the fractional remainder: 0.75. 3. Multiply by 60: 0.75 × 60 = 45 minutes. 4. Final Result: 7 hours and 45 minutes (07:45:00). Why this matters: Payroll systems like QuickBooks, ADP, and Paychex track employee labor in decimal hours to compute wages to the exact cent, whereas workers record time on punch cards in clock minutes. Converting accurately prevents costly payroll discrepancies. If your decimal value has seconds—such as 8.423 hours—take the remaining decimal minutes (0.423 × 60 = 25.38 minutes), keep 25 minutes, and multiply 0.38 × 60 = 22.8 seconds, yielding 8 hours, 25 minutes, and 23 seconds.

Our Time Duration Converter executes calculations using IEEE 754 64-bit double-precision floating-point arithmetic, providing 15 to 17 significant decimal digits of mathematical precision without rounding drift. When converting milliseconds to larger temporal units, the algorithm unifies the input into an exact 64-bit integer before decomposing across standard SI multipliers: • Milliseconds to Seconds: Divide by 1,000 (1 s = 1,000 ms) • Milliseconds to Minutes: Divide by 60,000 (1 min = 60,000 ms) • Milliseconds to Hours: Divide by 3,600,000 (1 hr = 3.6 × 10⁶ ms) • Milliseconds to Days: Divide by 86,400,000 (1 day = 8.64 × 10⁷ ms) • Milliseconds to Calendar Weeks: Divide by 604,800,000 ms This high-resolution engine guarantees that microsecond-level discrepancies never accumulate during long-duration calculations or high-frequency automated batch conversions.

Sexagesimal arithmetic is a base-60 numeral system inherited from ancient Babylonian astronomy. Unlike standard base-10 decimal math where numbers carry over at powers of 10 (10, 100, 1,000), clock math groups 60 seconds into 1 minute and 60 minutes into 1 hour. Our algorithm decomposes any duration into normalized sexagesimal units through modular arithmetic: • Whole Hours = Math.floor(Total Milliseconds ÷ 3,600,000) • Remaining Milliseconds = Total Milliseconds % 3,600,000 • Whole Minutes = Math.floor(Remaining Milliseconds ÷ 60,000) • Remaining Seconds = Math.floor((Remaining Milliseconds % 60,000) ÷ 1,000) This ensures that when minutes reach 60, they increment the hour by 1 and reset minutes to 0, completely avoiding invalid clock readouts like 4:75 PM.

Companion In-Depth Guide

Read the Full Guide: Ultimate Time Duration Calculation Master Guide

Master sexagesimal time arithmetic, midnight crossings, borrowing rules, and interval formulas.

Read Full Guide