Everyday math

Time duration calculator

Find the elapsed time between a start and end time.

Free to use◌No account needed
Your inputsUpdates as you type

⌁ Calculations run in your browser. Calculator input values aren't included in our usage events.

Your result
—

Enter your numbers to see the answer.

Time duration calculator guide

What does this calculator help you figure out?

The time duration calculator finds the elapsed time between a start clock time and an end clock time on the same day. Enter the start hour and minute and the end hour and minute using the 24-hour clock, and it converts both to minutes since midnight, subtracts, and reports the result in decimal hours (8.5 rather than 8:30) with the total minutes underneath. Decimal hours are what timesheets, payroll systems, and hourly invoices expect, which is the main reason to use this tool over mental arithmetic. The calculation is exclusive: it measures the gap between two instants, so 9:00 to 17:30 is 8.5 hours, not 8.5 hours plus one minute. Breaks are not subtracted automatically; the work hours calculator handles daily breaks across several days. An end time earlier than the start time is treated as zero rather than as an overnight span, so night shifts need the adjustment described below.

How is the result calculated?

Elapsed minutes = (end hour × 60 + end minute) − (start hour × 60 + start minute). Hours = elapsed minutes ÷ 60. Negative results display as 0.

Worked example

Worked example with the defaults: start 9:00, end 17:30. Convert the start to minutes: 9 × 60 + 0 = 540. Convert the end: 17 × 60 + 30 = 1,050. Subtract: 1,050 − 540 = 510 minutes. Divide by 60: 510 ÷ 60 = 8.5 hours, which the calculator displays as 8.5 hours with a row showing 510 min. For a shift with a 30-minute unpaid lunch, subtract it yourself: 8.5 − 0.5 = 8 paid hours.

Units and conversion notes

Hours use the 24-hour clock (17 for 5 p.m.), and minutes run from 0 to 59. The result is in decimal hours, where 0.25 h = 15 min, 0.5 h = 30 min, and 0.75 h = 45 min; 8 h 20 min shows as 8.33 hours. Time zones are irrelevant because both times are read from the same clock. Seconds are not accepted.

What does the result mean?

The result follows directly from the numbers you entered, so its accuracy is the accuracy of those inputs. The most common source of a surprising answer is a mismatch between the question you meant to ask and the one the calculator answered, so re-read the field labels if the figure looks wrong. The formula is shown above so you can check the arithmetic yourself. On this page the figure rests entirely on start hour, start minute, end hour and end minute, so start there if the time duration calculator returns something you did not expect.

Common mistakes to avoid

Good to know: entering 5 instead of 17 for 5 p.m. gives 0 hours, because the end appears to come before the start and the tool clamps to zero. For an overnight shift, add 24 to the end hour: 22:00 to 06:00 becomes end hour 30, giving (30 × 60) − (22 × 60) = 480 minutes, or 8 hours. Decimal hours are not hours and minutes: 8.5 hours is 8:30, not 8:50. A clock change for daylight saving inside the span adds or removes an hour of real elapsed time that this clock-difference calculation cannot see.

Results are planning estimates. Check the units, product coverage, carrier rules, or local rates before making a purchase or financial decision.

Sources

Constants and sources used

How it works

The method behind the number.

Find the elapsed time between a start and end time. This tool explains the calculation so you can adjust the assumptions to match your situation.

Elapsed minutes = (end hour × 60 + end minute) − (start hour × 60 + start minute). Hours = elapsed minutes ÷ 60. Negative results display as 0.

Worked example

Reproduce the current result.

With Start hour = 9 hour · Start minute = 0 min · End hour = 17 hour · End minute = 30 min → 8.5 hours (elapsed time). Change an input above and this example updates with your numbers.

Minutes
510 min

Common questions

Frequently asked questions

How many hours is 9:00 to 5:30?

8.5 hours, or 510 minutes. Convert both to minutes since midnight (540 and 1,050), subtract to get 510, and divide by 60. Enter 5:30 p.m. as hour 17, minute 30.

How do I calculate hours for an overnight shift?

Add 24 to the end hour so it comes after the start. A 22:00 to 06:00 shift is entered as start 22:00 and end hour 30, minute 0, which gives 480 minutes or 8 hours.

How do I convert minutes to decimal hours for a timesheet?

Divide the minutes by 60. 20 minutes is 0.33 hours, 30 minutes is 0.5, and 45 minutes is 0.75, so 7 hours 45 minutes is entered as 7.75 on a payroll form.

Why does the time calculator show 0 hours?

The end time is earlier than the start time on the same clock, usually because a p.m. hour was entered as 1 to 12 instead of 13 to 24. Use 17 for 5 p.m., or add 24 to the end hour for a span past midnight.

Does daylight saving time affect the hours calculated?

Not in this tool, which subtracts clock readings. On the night clocks go forward, a 22:00 to 06:00 shift is really 7 hours of elapsed time, and on the night they go back it is 9. Adjust manually if you are paid for actual elapsed time.

Is the duration inclusive or exclusive of the end time?

Exclusive: it measures the gap between two instants. 9:00 to 17:30 is exactly 8.5 hours. Counting both boundary minutes as worked, as some attendance systems do, would add one minute.

Result copied