Time calculators

Time Duration Calculator

Updated Aug 31, 2026 By Jehan Wadia
Rate Formulas
Calculator Mode
Start & End Time
: :
Invalid start time
: :
Invalid end time

Duration
9 hours, 0 minutes, 0 seconds
Total Hours (Decimal)
9.00
Total Minutes
540
Total Seconds
32,400
Total Days (Decimal)
0.3750
Duration Breakdowns
Full Breakdown
Full Duration9 hours, 0 minutes, 0 seconds
Total in Single Units
Total Days0.3750 days
Total Hours9.0000 hours
Total Minutes540.00 minutes
Total Seconds32,400 seconds
Total Weeks0.0536 weeks
Payroll / Billing
Decimal Hours (Payroll)9.00
Quarter-Hour Rounded9.00
Tenth-Hour Rounded9.0
Duration Visualization

Introduction

The Time Duration Calculator finds the exact amount of time between any two points in the day. Enter a start time and an end time, and the tool instantly shows you the difference in hours, minutes, and seconds. It also gives you the total in decimal hours, total minutes, and total seconds, which is helpful for payroll, billing, or tracking how long a task took.

You can use this calculator in two modes. Same-Day Duration mode works when both times fall on the same day, like clocking in at 8:30 AM and clocking out at 5:30 PM. Cross-Date Duration mode lets you pick different dates, so you can measure time spans that stretch across days, weeks, or even months. The results include a full breakdown by years, months, days, hours, minutes, and seconds, along with payroll-friendly decimal formats rounded to the quarter-hour or tenth-hour.

How to use our Time Duration Calculator

Enter a start time and an end time, and this calculator will show you the exact duration between them in hours, minutes, seconds, and more.

Calculator Mode: Pick "Same-Day Duration" if both times fall on the same day. Pick "Cross-Date Duration" if the times span across different dates.

Start Time: Enter the hour, minute, and second for when the time period begins, then choose AM or PM. You can also click the "Now" button to fill in the current time automatically.

End Time: Enter the hour, minute, and second for when the time period ends, then choose AM or PM. Click "Now" to use the current time if needed.

Start Date and End Date (Cross-Date mode only): When using Cross-Date Duration mode, pick the start date and end date from the date fields that appear.

Include End Date as a Full Day (Cross-Date mode only): Turn this switch on if you want to add one full day (24 hours) to the result.

Swap Start & End: Click this button to quickly switch the start and end times with each other.

Calculate: Press the "Calculate" button to see your results. The calculator will display the total duration as hours, minutes, and seconds. It will also show the result as total decimal hours, total minutes, total seconds, total days, and total weeks. A payroll section rounds the time to decimal hours, quarter-hours, and tenth-hours for billing or timekeeping. In Cross-Date mode, you will also see a calendar breakdown by years, months, days, hours, minutes, and seconds. A donut chart gives you a visual picture of how the duration is split up.

Reset: Click "Reset" to clear your entries and return the calculator to its default values.

What Is Time Duration?

Time duration is the amount of time that passes between a start point and an end point. For example, if you start work at 8:30 AM and leave at 5:30 PM, the duration is 9 hours. We measure time duration in units like seconds, minutes, hours, and days. Figuring out the exact duration between two times is one of the most common tasks in everyday math, and it comes up in school, work, and daily planning.

How Time Duration Is Calculated

To find the duration between two times, you subtract the start time from the end time. This sounds simple, but it can get tricky because of how our clock system works. We use a 12-hour clock with AM and PM, and each hour has 60 minutes (not 100). Each minute has 60 seconds. This means you can't just subtract the numbers the normal way — you need to convert everything into the same unit first.

Here's the basic method: convert both times to a 24-hour format, turn each time into total seconds since midnight, then subtract. For example, 8:30 AM is 30,600 seconds after midnight (8 × 3,600 + 30 × 60), and 5:30 PM is 63,000 seconds after midnight (17 × 3,600 + 30 × 60). The difference is 32,400 seconds, which equals 540 minutes, or 9 hours.

Same-Day vs. Cross-Date Duration

A same-day calculation means both the start and end times fall on the same calendar day. A cross-date calculation spans two or more days. Cross-date math is more complex because you also need to account for calendar differences — different months have different numbers of days, and leap years add an extra day in February. When dates are involved, the result can be broken down into years, months, days, hours, minutes, and seconds. Finding someone's exact age based on their birth date, which our Age Calculator handles, is one specific cross-date calculation.

Decimal Hours and Payroll Rounding

Many workplaces and billing systems don't use hours and minutes. Instead, they use decimal hours. In decimal hours, 30 minutes equals 0.50 hours, and 15 minutes equals 0.25 hours. To convert minutes to decimal, you divide the minutes by 60. So 9 hours and 45 minutes becomes 9.75 decimal hours.

Payroll systems also use rounding rules. Quarter-hour rounding rounds time to the nearest 15-minute mark (0.25 hours). Tenth-hour rounding rounds to the nearest 6-minute mark (0.10 hours). These rounding methods help simplify wage calculations and billing statements. Across an entire pay period, those daily durations are tallied into weekly totals on a time card.

Common Uses for a Time Duration Calculator

  • Work hours: Track how many hours you worked in a shift to calculate pay.
  • Travel planning: Find out how long a trip takes from departure to arrival.
  • Cooking and baking: Figure out when something in the oven will be done.
  • Project management: Measure how long tasks take to improve scheduling.
  • School assignments: Solve time arithmetic problems in math class.
  • Event planning: Calculate how many days, hours, or minutes remain until a deadline or special date.

Quick Conversion Reference

  • 1 minute = 60 seconds
  • 1 hour = 60 minutes = 3,600 seconds
  • 1 day = 24 hours = 1,440 minutes = 86,400 seconds
  • 1 week = 7 days = 168 hours = 604,800 seconds

Keeping these conversions in mind makes it easier to understand results when time is displayed in different units. Whether you need total seconds for a science problem or decimal hours for a timesheet, the same underlying duration just gets expressed in a different way.


Formulas used

Total Duration (Same-Day)
\text{Duration}_{\text{sec}} = (H_{\text{end}} \times 3600 + M_{\text{end}} \times 60 + S_{\text{end}}) - (H_{\text{start}} \times 3600 + M_{\text{start}} \times 60 + S_{\text{start}})
Total Duration (Cross-Date)
\text{Duration}_{\text{sec}} = \frac{T_{\text{end}} - T_{\text{start}}}{1000} + \begin{cases} 86400 & \text{if include end date} \\ 0 & \text{otherwise} \end{cases}
Total Hours (Decimal)
\text{Total Hours} = \frac{|\text{Duration}_{\text{sec}}|}{3600}
Total Days (Decimal)
\text{Total Days} = \frac{|\text{Duration}_{\text{sec}}|}{86400}
Total Weeks (Decimal)
\text{Total Weeks} = \frac{|\text{Duration}_{\text{sec}}|}{604800}
Quarter-Hour Rounded
\text{Quarter Hour} = \frac{\operatorname{round}(\text{Total Hours} \times 4)}{4}
Tenth-Hour Rounded
\text{Tenth Hour} = \frac{\operatorname{round}(\text{Total Hours} \times 10)}{10}
12-Hour to 24-Hour Conversion
H_{24} = \begin{cases} 0 & \text{if } H_{12}=12 \text{ and AM} \\ H_{12} & \text{if AM} \\ 12 & \text{if } H_{12}=12 \text{ and PM} \\ H_{12}+12 & \text{if PM} \end{cases}

Frequently asked questions

What happens if my end time is earlier than my start time?

If the end time is earlier than the start time, the calculator shows a negative duration with a minus sign (−). This means time went backward based on your inputs. You can click the Swap Start & End button to flip them and get a positive result.

What does Include end date as a full day mean?

When you turn this switch on in Cross-Date mode, the calculator adds 24 extra hours to your result. This is useful when you want to count the end date itself as a complete day in your total.

What are decimal hours?

Decimal hours express minutes as a fraction of an hour using decimals instead of minutes. For example, 30 minutes is 0.50 hours, and 15 minutes is 0.25 hours. Many payroll and billing systems use this format.

What is quarter-hour rounding?

Quarter-hour rounding rounds your total time to the nearest 15-minute block. So 9 hours and 10 minutes rounds to 9.25 hours, and 9 hours and 5 minutes rounds to 9.00 hours. Many employers use this for timesheets.

What is tenth-hour rounding?

Tenth-hour rounding rounds your total time to the nearest 6-minute block (0.1 hours). For example, 2 hours and 14 minutes rounds to 2.2 hours. Some payroll systems prefer this method over quarter-hour rounding.

Can I calculate overnight shifts like 10 PM to 6 AM?

In Same-Day mode, entering 10:00 PM as the start and 6:00 AM as the end will give a negative result because 6 AM comes before 10 PM on the same day. Switch to Cross-Date mode and set the end date to the next day to get the correct 8-hour duration.

How do I convert the result to just minutes or just seconds?

The calculator already does this for you. Look at the Total Minutes and Total Seconds cards in the results section. You can also find these values in the Total in Single Units breakdown.