Time Duration Calculator

Find the length of time between two clock times.

24-hour (09:30) or AM/PM (9:30 am).
24-hour (17:30) or AM/PM (5:30 pm).
Duration
Decimal hours
Total minutes
Total seconds

Results update as you type.

About this calculator

A time duration calculator works out how long there is between two times of day. Enter times in 24-hour HH:MM or with AM/PM (e.g. 5:30 pm). If the end time is earlier than the start, it assumes the period runs past midnight into the next day. The result is shown in hours and minutes, as decimal hours, and as a total number of minutes and seconds.

The tool converts each time to minutes past midnight, subtracts the start from the end, and — if that comes out negative — adds 24 hours so an overnight span reads as a positive length. The same duration is then presented three ways: as plain hours and minutes for reading, as decimal hours for payroll and billing, and as raw minutes and seconds for finer work. It mixes formats freely, so you can type one time in 24-hour and the other with AM/PM.

For example, from 9:00 am to 5:30 pm is 8 hours 30 minutes, or 8.5 decimal hours, or 510 minutes; from 22:00 to 06:00 it correctly returns 8 hours by rolling past midnight. Common uses are timing a shift or a task, working out how long an event lasts, or converting a start-and-end pair into the decimal hours a timesheet needs.

Frequently asked questions

What if the end time is before the start time?

The calculator treats it as an overnight period and adds 24 hours. A shift from 22:00 to 06:00 is therefore counted as 8 hours, not a negative span.

Can I type times with AM and PM?

Yes. Both 24-hour (17:30) and 12-hour (5:30 pm) formats are accepted for either field, so you can mix whichever is handy.

Why show decimal hours?

Decimal hours (for example 8.5 instead of 8 h 30 m) are what payroll and billing systems use, since you multiply them directly by an hourly rate.

How do I convert minutes to decimal hours?

Divide the minutes by 60: 30 minutes is 0.5 hours and 15 minutes is 0.25 hours. The calculator does this for you and shows the decimal-hours figure next to the hours-and-minutes result.

Does it subtract a lunch break?

No. This tool gives the raw gap between two times. To take an unpaid break out of a work shift, use the hours calculator or the time card, which have a break field.

Can this time duration calculator handle a span longer than 24 hours?

It is designed for two clock times within a single day (or one overnight roll to the next), so the maximum span is just under 24 hours. For multi-day gaps use the date difference calculator.

How many minutes is 8 hours and 30 minutes?

It is 510 minutes — 8 × 60 is 480, plus 30. The calculator shows this total minutes figure alongside the hours-and-minutes result so you can copy whichever you need.

❤️ Love Calculator.Free? Share it

𝕏  X Facebook Reddit
API — use this calculator from code

Call this calculator as a free JSON endpoint — no key required. Send the field values below as query parameters or JSON. Read the full API docs →

Endpoint

GET https://calculator.free/api/v1/time-duration/

curl

curl "https://calculator.free/api/v1/time-duration/?start=09:00&end=17:30"

JavaScript fetch()

const r = await fetch(
  "https://calculator.free/api/v1/time-duration/?" + new URLSearchParams({
    "start": "09:00",
    "end": "17:30"
  }));
const data = await r.json();
console.log(data.results);

Results are estimates for general guidance only, not financial, medical or tax advice.