Skip to main content

Time Calculator

Blake Boege
Written by Blake Boege · Founder, Calculator Answers

A time calculator is a utility that performs arithmetic operations on hours, minutes, and seconds. The calculator adds or subtracts time intervals, handles conversions between different time units, and determines the duration between two specific times. It manages standard sexagesimal (base-sixty) math, ensuring that sixty seconds correctly carry over to one minute, and sixty minutes carry over to one hour. Professionals tracking billable hours, project managers scheduling tasks, and students solving duration problems use this tool to avoid manual calculation errors.

Pick a mode, enter your times or durations, and the calculator returns the answer in H:MM, H:MM:SS, decimal hours, total minutes, and total seconds. Supports overnight rollover and day offsets when the result crosses midnight.

Quick Answer

Add, subtract, and convert time values in hours, minutes, and seconds. Enter time durations or specific times to calculate intervals and total time.

Mode

If end is before start, the calculator rolls past midnight.

Duration

Duration

8h 30m

8:30 in H:MM · 8:30:00 in H:MM:SS

H:MM8:30
H:MM:SS8:30:00
Decimal hours8.5
Total minutes510
Total seconds30,600
Was this helpful?

Examples

9:00 to 17:30

= 8h 30m · 8:30 H:MM · 8.5 decimal hours

9:00 PM to 6:00 AM (overnight)

= 9h 0m

9:00 AM + 4h 15m

= 1:15 PM (same day)

1h 30m + 2h 45m

= 4h 15m

How it works

Formula · Convert each time to seconds since midnight, do the arithmetic, then convert back. A duration has no ceiling; a clock time wraps at 86,400 seconds (24 x 60 x 60).

All three modes use the same idea: convert times and durations to a common unit (seconds), do the arithmetic, then convert back. Clock arithmetic also uses modular math so the result wraps cleanly across midnight.

Time between two clock times

duration = end − start (mod 24h if end < start)

Add / subtract a duration to a clock time

new clock = (start ± duration) mod 24h

day offset = floor((start ± duration) ÷ 24h)

Add / subtract two durations

total = A ± B (no wrap; can exceed 24h or be negative)

Internally each value is stored as total seconds. The display formats convert back to H:MM, H:MM:SS, decimal hours, total minutes, and total seconds.

Other names for this tool

People arrive here searching for a few different things and mean the same one. A time duration calculator, an add time calculator, a subtract time calculator and a time adder are all this page: pick the mode that matches what you know, and it does the arithmetic either way. The duration mode is the adder proper, since it takes two lengths of time and returns their sum or difference.

What the calculator does

The time calculator answers three common questions in one place: how long is it from one clock time to another, what clock time do you reach by adding or subtracting a duration, and what do two durations add up to (or how do they differ). The result panel returns the answer in several common formats so you can copy whichever one fits your use case.

Time between two clock times

Pick the first mode, enter the start and end times, and the calculator returns the duration. If the end time is earlier than the start time, the calculator treats the gap as overnight: 9:00 PM to 6:00 AM resolves to 9 hours. The breakdown shows the duration as hours and minutes, in H:MM and H:MM:SS, and as decimal hours, plus an overnight flag when the result crossed midnight.

Add or subtract a duration from a clock time

Pick the second mode, enter a clock time, choose add or subtract, then enter the duration in hours and minutes (with optional seconds). The result is the new clock time in both 12-hour and 24-hour formats, plus a day offset when the result crosses midnight. Adding 25 hours to 9:00 AM gives 10:00 AM the next day; subtracting 12 hours from 9:00 AM gives 9:00 PM the previous day.

Add or subtract two durations

Pick the third mode, enter both durations in hours, minutes, and seconds, and pick add or subtract. The result is the combined duration. If subtraction produces a negative duration, the calculator shows the absolute value with an explicit note that the second duration is longer.

Output formats

  • H:MM: standard clock-style format. 8h 30m shows as 8:30.
  • H:MM:SS: same with seconds. 8h 30m 0s shows as 8:30:00.
  • Decimal hours: duration as a single decimal. 8h 30m = 8.5 hours. Used in payroll and billing.
  • Total minutes and total seconds: handy when the rest of your workflow is in those units.
  • 12-hour and 24-hour clock: for Mode 2 results, both formats are shown alongside the day offset.

Worked examples

  • 9:00 to 17:30: 8h 30m, or 8.5 decimal hours.
  • 9:00 PM to 6:00 AM (overnight): 9h 0m.
  • 9:00 AM + 4h 15m: 1:15 PM the same day.
  • 9:00 AM + 25h 0m: 10:00 AM the next day.
  • 1h 30m + 2h 45m: 4h 15m.
  • 1h 30m − 2h 45m: −1h 15m (B is longer than A).

Working a duration out by hand

Every mode on this page reduces to one idea: turn each time into a single number of seconds since midnight, do ordinary arithmetic on those numbers, then turn the answer back into the format you want. Here is the whole of it for a shift that runs from 09:15 to 17:40.

  1. Convert the start time. 9 hours is 9 × 60 × 60 = 32,400 seconds. 15 minutes is 15 × 60 = 900 seconds. The start is 33,300 seconds past midnight.
  2. Convert the end time. 17 × 60 × 60 = 61,200 seconds, plus 40 × 60 = 2,400 seconds, so the end is 63,600 seconds.
  3. Subtract. 63,600 − 33,300 = 30,300 seconds.
  4. Convert back. 30,300 ÷ 3,600 = 8 whole hours with 1,500 seconds left over, and 1,500 ÷ 60 = 25 minutes. The duration is 8:25, or 8 hours 25 minutes.
  5. For a decimal figure, divide the whole thing by 3,600: 30,300 ÷ 3,600 = 8.42 hours to two places. Payroll systems usually want this form.

The three constants doing all the work are 60 seconds in a minute, 60 minutes in an hour, and 24 hours in a day. Nothing else is needed, which is why the arithmetic is exact rather than approximate.

Edge cases, and what the answer means

Three situations produce answers that look wrong until you know what the calculator assumed.

  • Crossing midnight. If the end time is earlier in the day than the start time, the only sensible reading is that it falls on the next day, so that is what this page assumes. From 22:30 to 06:15 it reports 7:45. What it cannot know is whether you meant two days later, or three. It never adds more than one day, so if your gap is longer than 24 hours you want the duration mode instead, or a date calculation.
  • Durations longer than a day. Adding two durations has no ceiling. 20:30 plus 10:45 gives 31:15, and that is the correct answer rather than an error. A duration is just a length of time, so 31 hours is as valid as 3.
  • A duration is not a clock time. This is the distinction that causes the most confusion. 31:15 is a length. A clock time cannot be 31:15, because a clock only has 24 hours on it. So when you add a duration to a clock time instead, the answer wraps: 22:00 plus 9 hours 30 minutes gives 07:30, and the page tells you it landed on the following day. Same arithmetic, two different kinds of answer.

One more thing worth saying plainly: this page does no time zone conversion and knows nothing about daylight saving. Every calculation treats the clock as a fixed 24 hour cycle. On the two days a year a daylight saving change happens, a real elapsed time can differ from what this page reports by an hour.

Where these rules come from

There is no source cited on this page, and that is a decision rather than an omission. The figures the arithmetic rests on are 60 seconds in a minute, 60 minutes in an hour, and 24 hours in a day. Those are definitions of the units, not measurements of anything, so there is no authority to cite and no chance of them being revised. Where this page does depend on a convention rather than a definition, the 12 hour AM and PM clock, it is only a display choice: the underlying answer is the same number of seconds either way.

Your times stay in the page

Every time you enter is processed by this page in your browser. Start and end times, shift lengths, and the results are not sent to a server, not stored after you close the tab, and not visible to anyone else. There is no account and nothing to sign up for.

Time calculator vs time card calculator

The two are easy to confuse. The simplest way to keep them apart:

  • This page is for general time math: durations between two times, clock arithmetic, and summing durations. It does not deal with breaks, pay, or weekly totals.
  • Time card calculator is a weekly payroll workflow: shift-by-shift start, end, and break for each day, then paid hours, overtime, and gross pay.

Two more neighbours are worth telling apart, because the names sound interchangeable and the jobs are not.

  • Date calculator works in whole days and calendar dates: how many days between two dates, or what date falls 90 days out. It never touches clock times. Use it when the answer is a date, and this page when the answer is a duration or a clock time.
  • Time unit converter turns one unit into another, minutes into hours or days into seconds, with no clock involved. It answers how big a unit is; this page answers what time it is or how long something took.

For deeper pay math, see the overtime calculator. For age or date math between two calendar dates, use the chronological age calculator. For converting a word count into estimated speaking time, use the words to minutes calculator.

Common mistakes

  • Subtracting clock times directly without rolling past midnight when the end time is earlier than the start.
  • Confusing decimal hours with HH:MM. 1.5 is 1h 30m, not 1h 50m.
  • Adding hours and minutes without converting carryovers. 45 minutes plus 30 minutes is 1h 15m, not 75m written as a clock time.
  • Comparing two times across time zones or across daylight saving boundaries with plain clock math. Convert to one reference frame first.
  • Treating a negative duration as wrong. It just means the second value is larger than the first; the magnitude is still the answer.

Related tools

Note. All math is done in plain clock time with no time zone or daylight saving adjustment. If you need to compare times across zones or DST boundaries, convert to a single reference time first and then run the calculator.

Frequently asked questions

Subtract the start time from the end time. The simplest way to do it by hand is to convert both times to minutes since midnight, subtract, then convert back. For example, 9:00 to 17:30 is 17 × 60 + 30 − (9 × 60) = 1050 − 540 = 510 minutes, which is 8 hours 30 minutes. The calculator does this for you.

If the end time is earlier than the start time, the calculator rolls past midnight. For example, 9:00 PM to 6:00 AM is treated as 9 hours, not negative 15 hours. The result panel flags overnight results so the rollover is explicit.

Convert the clock time to minutes since midnight, add the duration in minutes, then take the remainder when divided by 1440 (the number of minutes in a day) to get the new clock time. The calculator also reports how many days the result crosses, so adding 25 hours to 9:00 AM gives 10:00 AM the next day.

Same as addition, but with a negative shift. If the result goes below zero, the calculator wraps backward across midnight and shows a negative day offset, for example a result on the previous day.

Add the total seconds of each duration and convert back to hours, minutes, and seconds. 1h 30m + 2h 45m = 4h 15m. Durations can be longer than 24 hours; the calculator does not wrap them.

Subtract the total seconds. If the second duration is longer than the first, the result is negative; the calculator shows that explicitly and tells you which side is longer.

Decimal hours expresses a duration as a single decimal number instead of hours and minutes. 1h 30m is 1.5 decimal hours, 8h 15m is 8.25 decimal hours. Payroll, billing, and time-tracking software often use decimal hours so durations are easy to multiply by an hourly rate.

This page is general time math: clock arithmetic, duration math, and unit output. The time card calculator is a payroll workflow that tracks shifts and breaks across a week and totals paid hours, overtime, and gross pay. Use the time card calculator when you need a weekly schedule with pay; use this calculator for one-off time math.

Yes for durations. Add or subtract durations supports hours, minutes, and seconds. Clock time math accepts an optional seconds component too. Time between two times uses the clock fields the browser provides, which default to HH:MM.

Because a duration is a length of time, not a position on a clock. 20 hours 30 minutes plus 10 hours 45 minutes really is 31 hours 15 minutes, and capping it at 24 would throw away part of the answer. If you wanted a clock time instead, use the mode that adds a duration to a starting time, which wraps around the 24 hour cycle and tells you how many days it moved.

A clock time is a point in the day, so it always falls between 00:00 and 23:59. A duration is a length, so it has no upper limit. The same arithmetic produces both, which is why the calculator has separate modes: one returns a point, the other returns a length. Reading a 31:15 duration as a clock time is the single most common mistake with a tool like this.

Divide the total by 3,600 seconds. For 8 hours 25 minutes, the total is 30,300 seconds, and 30,300 divided by 3,600 is 8.42 hours to two places. The shortcut people use by hand is to divide just the minutes by 60: 25 divided by 60 is 0.42, giving the same 8.42. Payroll systems almost always want the decimal form rather than 8:25.

Not in the mode that finds the time between two clock times. That mode only knows two times of day, so when the end is earlier than the start it assumes the next day and never adds more than one. If your gap spans several days, add the durations directly, or use the date calculator for whole days between two calendar dates.

The calculator does not account for it. Every calculation treats the day as a fixed 24 hour cycle. On the two days a year when clocks change, real elapsed time can differ from what this page reports by an hour, so a shift that spans the changeover needs checking by hand.

No. All math is done in plain clock time without time zone or daylight saving adjustments. If you need to convert across time zones, do that conversion first and then run the time math.