Date & Time

How to Calculate Time Duration

Learn how to calculate the duration between two times, including minute differences, overnight periods, and break deductions.

Updated July 16, 2026

To calculate time duration, subtract the start time from the end time. Convert both times into minutes when the minute values differ, and add 24 hours when the period crosses midnight. For example, the duration from 9:00 AM to 5:30 PM is 8 hours 30 minutes.

Related toolTime Duration Calculator

Calculate elapsed hours and minutes, overnight duration, break deductions, decimal hours, and total minutes.

Open calculator
Elapsed timeSubtract the starting time from the ending time

Converting both clock times into minutes creates a reliable method for same-day and overnight calculations.

Calculating the duration from 9 AM to 5:30 PM Nine AM is converted to 540 minutes, 5:30 PM is converted to 1050 minutes, and the difference is 510 minutes.9:00 AM540 minutes5:30 PM1,050 minutes8h 30m510-minute duration1,050 − 540 = 510 minutes

Time Duration Formula

The basic formula subtracts the starting time from the ending time.

When a break should not count towards the duration, subtract the break after calculating the total elapsed time.

The Time Duration Calculator performs these conversions automatically.

Basic calculationDuration = End time − Start time − Excluded break

Step 1: Write Down the Start and End Times

Record both times using the same clock format.

For example, use 9:00 AM and 5:30 PM or their 24-hour equivalents, 09:00 and 17:30.

Using one consistent format reduces the risk of confusing morning and evening times.

Step 2: Convert Each Time to Minutes

Multiply the hour by 60 and add the minute portion.

Nine o'clock in the morning is 9 multiplied by 60, which equals 540 minutes after midnight.

Seventeen thirty is 17 multiplied by 60 plus 30, which equals 1,050 minutes.

Step 3: Subtract the Starting Value

Subtract 540 from 1,050.

The difference is 510 minutes.

This is the complete duration before any break is deducted.

Start9:00 AM = 540 minutes
End5:30 PM = 1,050 minutes
Difference510 minutes

Step 4: Convert Minutes Back to Hours

Divide 510 by 60.

Eight full hours account for 480 minutes, leaving 30 minutes.

The final duration is therefore 8 hours 30 minutes.

How to Calculate Duration Across Midnight

When the end time is earlier than the start time, the period may cross midnight.

Add 1,440 minutes, equal to 24 hours, to the ending value before subtracting.

For example, 10:00 PM to 6:00 AM lasts eight hours.

Overnight rule

Add 24 hours to the ending time when it occurs on the following day.

Example: 10:00 PM to 6:00 AM

Ten o'clock at night is 1,320 minutes after midnight.

Six o'clock the next morning becomes 360 plus 1,440, or 1,800 minutes.

Subtracting 1,320 from 1,800 gives 480 minutes, equal to eight hours.

How to Subtract a Break

Calculate the elapsed duration first.

Convert the break to minutes and subtract it from the elapsed total.

A period of 8 hours 30 minutes with a 30-minute break produces eight counted hours.

Example with Uneven Minutes

Consider a start time of 8:45 AM and an end time of 2:20 PM.

These become 525 minutes and 860 minutes.

The difference is 335 minutes, equal to 5 hours 35 minutes.

Using 12-Hour and 24-Hour Time

The calculation is the same in either format.

In 24-hour time, 1:00 PM is written as 13:00 and 11:30 PM is written as 23:30.

Be careful with 12:00 AM, which is midnight, and 12:00 PM, which is noon.

Common Mistakes

Do not subtract minute values independently when borrowing is required.

Do not treat an earlier ending time as negative when the period crosses midnight.

Do not confuse noon with midnight.

Subtract breaks only after finding the complete elapsed duration.

Conclusion

Convert both times to minutes, subtract the start from the end, and convert the result back into hours and minutes.

Add 24 hours for overnight periods and deduct excluded breaks afterwards.

Use the Time Duration Calculator to calculate same-day and overnight durations.

FAQs

How do I calculate the duration between two times?

Convert both times into minutes and subtract the starting value from the ending value.

What if the end time is earlier than the start time?

Add 24 hours to the ending time when it occurs on the following day.

How do I subtract a break?

Convert the break to minutes and subtract it from the elapsed duration.

How many minutes are in 8 hours 30 minutes?

Eight hours 30 minutes equals 510 minutes.

Can I calculate overnight duration?

Yes. The Time Duration Calculator handles periods that cross midnight.

Calculate the duration between two times

Enter a start time, end time, and optional break to calculate the complete elapsed duration.

Use Time Duration Calculator