U

Time Calculator

Add or subtract hours and minutes to any start time and get the exact result on a 24-hour clock, with midnight wrap handled automatically.
Start Time
9h
h
0h23h
30min
min
0min59min
Duration
2h
h
0h23h
30min
min
0min59min
Operation

Finish Time

Breakdown

Result minute
0min
Result, total minutes after midnight
0minutes

Key Assumptions

  • The clock is a 24-hour day: hours run 0 to 23 and minutes run 0 to 59, and the result always wraps into that span.
  • Anything past (or before) midnight crosses into the same day's 24-hour circle: adding 3 hours to 23:30 yields 02:30, not 26:30.
  • The duration is a plain interval of hours and minutes, with extra hours and minutes combined additively.
  • Time zones and daylight saving time are ignored — the tool computes on a single fixed clock.
  • In subtract mode, removing more minutes than the start time provides crosses into the previous day's circle (for example 00:30 − 02:00 = 22:30).

Formula Used

totalMinutes = mod((startHour × 60 + startMin) + operation × (addHours × 60 + addMin), 1440) finishHour = floor(totalMinutes ÷ 60) finishMin = mod(totalMinutes, 60)
Embed this calculator on your website

Add this embed page to your site — visitors use the calculator right from your page.

What Is a Time Calculator?

A time calculator answers the everyday question that planners, students, and shift schedulers all face: what time will it be after I add — or before I subtract — a certain duration? Rather than counting on a mental clock, you pick a start time, choose a duration in hours and minutes, and pick whether you are moving forward or backward. The tool then reports the final clock time in three interchangeable formats. The whole page is built around a single, unambiguous convention: the 24-hour clock where the day runs from 00:00 to 23:59, with any result falling outside that band automatically folded back into the day.

The Five Inputs

Every calculation needs five pieces of information, and they are all sliders or choices so nothing can be typed incorrectly.

  • Start hour (0–23) — the hour of your starting time on the 24-hour clock.
  • Start minute (0–59) — the minutes past the hour of the starting time.
  • Duration hours (0–23) — the whole hours part of the length you are moving by.
  • Duration minutes (0–59) — the extra minutes beyond the whole hours of the length.
  • Operation (Add / Subtract) — the direction of the movement along the clock.

Combining the start and the duration is the entire question the calculator answers: the start moves by the duration, in the direction, and the result is a valid time on the same day's circle.

The Three Outputs

Three complementary faces of one result are returned the moment any field changes.

  • Result hour — the hour of the final time, an integer from 0 to 23. This is the headline output.
  • Result minute — the minute of the final time, an integer from 0 to 59.
  • Result in minutes past midnight — the entire final time as a single number from 0 to 1439, and the form used internally for the math.

All three come from the same underlying total, so they always agree, and the minute output shows why "7 o'clock" and "7:00" are the same value written differently.

How the Timing Math Works

The beautiful trick of time addition is that everything reduces to minutes. The engine turns the start into a single number of minutes past midnight:

startTotal = startHour × 60 + startMinute
durationTotal = durationHours × 60 + durationMinutes
finalTotal = startTotal + (Add ? +durationTotal : −durationTotal)

The first two lines make both the start and the duration legible as plain counts of minutes. The third line selects the direction: forward adds the duration, backward subtracts it. Then two final expressions split the result back into clock form. The hour is the integer division (floor) of the total by sixty, and the minute is the remainder of that division. Because the total is folded into the day's 1440 minutes with modulo, even a result that crosses midnight, in either direction, still lands on a valid clock face.

Crossing Midnight — the Wrap That Never Fails

Midnight is where most mental math goes wrong, and where this tool is most useful. Consider what happens with each direction:

  • Forward past midnight: 23:00 plus 3 hours is 26:00 on a napkin, but 02:00 on a clock. The engine wraps 26:00 − 24:00 = 02:00.
  • Backward across midnight: 00:30 minus 2 hours is a negative total on a number line, but 22:30 on the clock the day before. The engine wraps the negative value back into 0–1439 minutes.

Because the wrap is done after the addition or subtraction, both directions behave identically: one 24-hour circle, always a valid clock time at the end.

How the Minutes Stay in Range

There are two separate range checks built into the formula, and it is worth knowing them because they explain why the outputs never look broken.

  1. The result time is forced into 0–1439 minutes: the total minutes of the day. Any value outside that span is folded by the modulo arithmetic into the valid day.
  2. The minute component is taken as the remainder when the wrapped total is divided by 60. That remainder always lands in 0–59, no matter how the hours count changes.

The consequence is simple robustness: you can drag the sliders to extremes, subtract hours you do not have, or add until the sum far exceeds the day, and the answer is still a proper, readable 24-hour time. Try subtracting 23 hours from 00:30 and reading the result — the pattern makes sense on the circle, even when linear math looks bizarre.

Reading the 24-Hour Convention

All results follow the 24-hour convention: hours from 00 to 09 are the early morning, 10–11 are late morning, 12–17 are afternoon through evening, 18–23 are night. If you prefer colloquial 12-hour reading, subtract 12 from any hour over 12 and ask whether it is AM or PM: 21:40 becomes 9:40 PM, 14:05 becomes 2:05 PM, and 00:30 becomes 12:30 AM. The underlying arithmetic does not change — the 24-hour form just removes the AM/PM ambiguity from the page.

Assumptions and Boundaries

Explicit modeling keeps the tool honest, and it is an agreed set:

  • The tool is a single, fixed clock: time zones and daylight saving time are not part of the calculation.
  • Durations are whole minutes — there are no seconds on the page, and results show minutes at most.
  • The clock wraps at 1440 minutes; multi-day durations are not accumulated into date changes on the same page.
  • Start and duration fields are capped at 23:59 so any rational input is representable in two fields.
  • One operation is applied per calculation: Add or Subtract, never both, and no splitting of partial durations.

Common Planning Patterns

Time math is used everywhere, and a few patterns worth bookmarking:

  • Shifts and breaks: start at 21:30, add 8 hours to 05:30, and subtract 30 minutes meal time with a second pass.
  • Logistics arrivals: "We load at 06:00 and the trip is 3h40m — cut the ETA at 09:40."
  • Deadlines and reminders: subtract 45 minutes from a cutoff to find the last-comfortable start time.
  • Media timing: 23:10 + a 2h05m movie ends promptly; the same arithmetic repeats for playlists.
  • Class schedules: 08:30 + 1h30m period lands the bell at 10:00, then 10:10 after a break.

A Note on Related Operations

This calculator deals with a start time plus a duration — the forward and backward form of the event. When the question instead is "how long passed between this and that two clock times", the hours calculator measures the span in hours the workplace way, and the time duration calculator formats it as h:mm. If your totals grow beyond a single day, add the date calculator to track the days on top, and the age calculator converts lifetime gaps into every unit you can name. Payroll readers will also enjoy the salary calculator, which turns clock totals into earnings.

Worked Examples on the 24-Hour Clock

The same mechanics repeat across every case, so a short table is worth more than a paragraph of theory:

StartDurationOperationResultMinutes past midnight
09:3002:30Add12:00720
09:3002:30Subtract07:00420
23:0003:00Add02:00120
00:3003:00Subtract21:301290
18:4505:15Add00:000

The middle rows are the wrap demonstrations: 23:00 plus 3 crosses into the next day at 02:00, and 00:30 minus 3 reaches the evening before at 21:30. The last row shows a full-day completion, when the duration lands the minute hand exactly at midnight. Reproduce any of them by matching the fields, and you know the engine follows exactly the clock's rulebook.

Frequently Overlooked Details

  • Result hour vs. duration hours are different units. The duration slider counts the moved length; the result hour is where the new day ends. Mixing them is the source of the most frequent user errors.
  • 00:00 means midnight, not "empty". A result time of 00:00 with total minutes 0 is the top of the day (or the end of it) — a valid output, and the wrap math supports it from any direction.
  • Both duration fields move together. Two hours and thirty minutes are two fields of a single length, and the wrap fires only once the combined total reaches the day boundary.
  • Minute carry is automatic. Adding 40 minutes to 23:35 reaches 24:15, which wraps to 00:15 — the carry is invisible on the clock face but exact in the engine.

Holding these four details in mind means reading the tool's output correctly the first time, every time — no recomputation by hand needed.

Four inputs drive every calculation, and two facts hold for all of them. First, the day circle is fixed at 1440 minutes, so no result ever walks off the clock. Second, the wrap happens after the arithmetic, which means the engine never needs a special rule for the midnight case — it is the same modulo step applied to every total, whether the number lands above 1439 or below 0. That is why the tool behaves identically for both directions and why the outputs stay readable at every slider position.

Completing the Picture

Time math is one of the small superpowers of daily planning — and this calculator packages it in five fields and three outputs. Pick a start, set a duration, choose which way the clock moves; the result hour, the minute, and the total minutes past midnight appear instantly, every time folding any past-midnight edge case back to a valid clock face. Whether you are scheduling a shift, an arrival, a movie, or a code-long homework session, the 24-hour circle finishes telling you exactly what time is left.

FAQs

Related Calculators