Everyday calculator

Free time calculator calculator

Find the exact duration between any two clock times — a start and an end — shown as hours and minutes plus the total in minutes, with overnight spans that cross midnight handled automatically. Enter a start and end time and the result is updated live, as you type.

Your figures
Time calculator
Time calculator

8h 30m

510 total minutes.

Results are estimates. Consult a professional.

Definition

What is a time calculator?

A time calculator finds the duration between two clock times — a start time and an end time — and reports it as hours and minutes (plus the total in minutes). Enter when something began and when it ended, and this time duration calculator tells you instantly how long it lasted, even when the period runs past midnight.

It answers the everyday "how many hours between two times?" question that comes up with work shifts, study sessions, parking, cooking, travel, and timesheets. Instead of counting on your fingers or fighting a spreadsheet that resets at midnight, you read the answer directly: for a 09:00 start and a 17:30 end, the duration is 8 hours and 30 minutes, or 510 total minutes.

The earlier clock time the period begins at, entered in 24-hour HH:MM (e.g. 09:00).
The clock time the period ends at, in 24-hour HH:MM (e.g. 17:30). May be "earlier" than the start when the span crosses midnight.
The elapsed time between start and end, shown as whole hours plus leftover minutes (e.g. 8h 30m).
The same duration expressed entirely in minutes — handy for payroll and quick decimal conversion (510 minutes = 8h 30m).
The method

How to calculate the hours between two times

The reliable way to find a duration is to convert both times to minutes-from-midnight, subtract, and then translate back into hours and minutes. Work through it in order:

  1. Put both times in 24-hour form. Convert any PM time by adding 12 to the hour: 5:30 PM becomes 17:30, while AM times and noon stay as written.
  2. Turn each time into total minutes with (hour × 60) + minutes. So 09:00 → 540 minutes and 17:30 → 1,050 minutes.
  3. Subtract the start from the end. 1,050 − 540 = 510 minutes.
  4. If the result is negative, add 24 hours (1,440 minutes) — the span crossed midnight (covered in its own section below).
  5. Convert back to hours and minutes: hours = whole part of (total ÷ 60), minutes = remainder. 510 ÷ 60 = 8 remainder 30 → 8h 30m.
total minutes = (end_hour × 60 + end_min) (start_hour × 60 + start_min)
if total minutes < 0: total minutes = total minutes + 1440
hours = floor(total minutes ÷ 60)
minutes = total minutes mod 60

Because the calculator works in whole minutes, the answer is always exact — there is no rounding. The result appears as hours and minutes and as total minutes, both updated the moment you change either time.

Worked example

A worked example using the time calculator

Example: how long is a 9:00 to 5:30 workday?

Daniel starts work at 09:00 and finishes at 17:30 (5:30 PM). He wants the exact duration for his timesheet. Here is how the calculator works it out.

Step 1 — Convert both times to minutes from midnight

Start 09:00 = (9 × 60) + 0 = 540 minutes. End 17:30 = (17 × 60) + 30 = 1,050 minutes.

Step 2 — Subtract the start from the end

1,050 − 540 = 510 minutes. The result is positive, so the period stays within the same day and no midnight correction is needed.

Step 3 — Convert back to hours and minutes

510 ÷ 60 = 8 with a remainder of 30, so the duration is 8 hours and 30 minutes. The calculator displays this as 8h 30m alongside 510 total minutes.

8h 30m — 510 total minutes
From 09:00 to 17:30 is 8 hours and 30 minutes. To take off an unpaid lunch and get paid hours, use the time-card calculator instead.
Overnight

Calculating time that crosses midnight

When the end time is earlier on the clock than the start time, the period has crossed midnight — it ends on the next day. A plain subtraction would give a negative (nonsensical) answer, so the calculator adds 24 hours (1,440 minutes) to bring it right. This is the step spreadsheets famously get wrong because clock arithmetic resets at midnight.

Example: a 10:00 PM to 6:00 AM night shift

Enter start 22:00 and end 06:00. Straight subtraction gives (6 × 60) − (22 × 60) = 360 − 1,320 = −960 minutes. Because that is negative, the calculator adds 1,440: −960 + 1,440 = 480 minutes. That is 8h 0m — and the widget shows 480 total minutes.

The calculator handles a single overnight wrap of up to 24 hours. If your start and end times are identical (say 09:00 to 09:00) it reads 0h 0m, not a full day — enter distinct times for a real overnight span.
Reference

Converting minutes to decimal hours

Payroll and billing systems often want a duration as decimal hours rather than hours-and-minutes. Decimal hours are not the same as the minute value: 8 hours 30 minutes is 8.5 hours, not 8.30. To convert, divide the minutes by 60.

decimal hours = total minutes ÷ 60
510 minutes ÷ 60 = 8.5 decimal hours
or: hours + (minutes ÷ 60) → 8 + (30 ÷ 60) = 8.5
MinutesDecimal of an hourCommon example
6 min0.1Short rounding unit
15 min0.25Quarter hour
20 min0.33Third of an hour
30 min0.50Half hour
45 min0.75Three-quarter hour
50 min0.83
60 min1.00Full hour

Minutes-to-decimal conversions (minutes ÷ 60). So 8h 30m = 8.5 decimal hours and 7h 45m = 7.75 decimal hours.

Use cases

Overnight shifts, timesheets and everyday timing

A time duration calculator earns its keep anywhere you need exact elapsed time rather than a rough guess:

  • Work shifts and payroll — measure a shift from clock-in to clock-out, including overnight shifts that run past midnight, then convert to decimal hours for the pay system.
  • Timesheets and freelancing — total the hours billed to a client between a start and stop time before applying a rate.
  • Parking, rentals and meters — work out how long a car has been parked or a tool hired to estimate the cost.
  • Cooking and baking — confirm how long something has roasted, proofed or slow-cooked between two clock times.
  • Travel and study — measure journey length or focused study time between two points on the clock.

For paid-hours math that subtracts an unpaid break, use the time card calculator. To total whole hours between two times, see the hours calculator, and to convert a duration into payroll decimal hours, the time to decimal calculator.

Quick answers

Common time calculator questions

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

From 09:00 to 17:30 (5:30 PM) is 8 hours and 30 minutes, which is 510 total minutes or 8.5 decimal hours. That is the gross span before subtracting any unpaid break.

How does the calculator handle times that cross midnight?

When the end time is earlier on the clock than the start time, it adds 24 hours so the span is treated as ending the next day. For example, 22:00 to 06:00 returns 8h 0m (480 total minutes) instead of a negative number.

What is the difference between total minutes and decimal hours?

Total minutes is the whole duration counted in minutes (510). Decimal hours is that figure divided by 60 (8.5). Both describe the same length of time — payroll usually wants decimal hours, so 8h 30m becomes 8.5, never 8.30.

Methodology

How this calculator works and sources

This time calculator converts both clock times to minutes from midnight, subtracts the start from the end, and adds 1,440 minutes (24 hours) when the result is negative so periods crossing midnight come out right. It then splits the total into whole hours and leftover minutes. The maths is pure integer arithmetic run entirely in your browser — nothing is sent anywhere — and follows the standard 24-hour clock convention, in which the day runs from 00:00 (midnight) to 23:59.

NIST (U.S. National Institute of Standards and Technology) — Times of Day FAQs, on the 24-hour clock and midnight (00:00 / 24:00) convention.ISO 8601 international standard date and time notation (NASA/GSFC overview) — 24-hour HH:MM time of day.
Questions

Frequently asked questions about the free time calculator calculator

A time calculator calculator is a free online tool that helps you calculate duration between two times. Subtract start from end, handle midnight crossing. It runs entirely in your browser with instant results and no sign-up.
From 09:00 to 17:30 (5:30 PM) is 8 hours and 30 minutes — 510 total minutes, or 8.5 decimal hours. That is the gross span before you subtract any unpaid break.
When the end time is earlier on the clock than the start time, add 24 hours so the period is treated as ending the next day. For example, 22:00 to 06:00 is 8h 0m (480 total minutes) — the calculator does this automatically.
8.5 decimal hours. Divide the minutes by 60 (30 ÷ 60 = 0.5) and add the whole hours. Decimal hours are not the minute value, so 8h 30m is 8.5, not 8.30.
No. It works in whole minutes, taking a start and end time in HH:MM and reporting the duration as hours, minutes, and total minutes — exact, with no rounding.
It is the same duration expressed entirely in minutes instead of hours and minutes. 510 total minutes equals 8 hours 30 minutes; dividing by 60 gives 8.5 decimal hours for payroll.
About

About this time calculator

This time calculator runs entirely in your browser. It converts both clock times to minutes from midnight, subtracts the start from the end, adds 24 hours when the span crosses midnight, and reports the duration as hours, minutes, and total minutes — instantly, with nothing sent to a server.

It is one of the timing tools on the everyday calculators shelf. For paid hours after a break use the time card calculator, and browse the full calculator directory for more.

Want a calculator built for your business?

Customize any of our 400+ tools to match your brand, or commission a new one tailored to how your business actually calculates — pricing, payroll, quotes, anything. Deployed on your domain, math runs in your visitors' browsers.