Skip to content

Time Calculator

Creator

Sufi Inam Ul Hassan, Founder

Reviewer

Muhammad Javaid Iqbal, Lead AI Engineer
Updated

Add/Subtract Time Values

Chain together any number of hours, minutes and seconds rows, each its own plus or minus, into one running total.

Add/Subtract Time From a Date

Shifts one start date and time of day by a duration, producing a resulting date, time and day of the week.

Start
Direction
Duration to add or subtract

Days and hours can be any size (40 days or 30 hours are both fine). Minutes and seconds must be 0-59; any field left blank counts as zero.

Time Calculator in Expression

Type one line using +, - and d/h/m/s terms and evaluate it into a single total duration.

Only + and - between terms, and only terms shaped like a number followed by a unit: d (days), h (hours), m (minutes) or s (seconds), upper or lower case. No parentheses and no other operators. Terms written next to each other with no + or - between them are added together.

This time calculator adds and subtracts hours, minutes and seconds, shifts a date and time of day forward or backward by a duration, and evaluates a short typed time expression such as "1d 2h 3m 4s - 2030s + 28h". Each of the three tools below is its own card; fill in its fields and press its Calculate button to see the result.

Nothing is uploaded anywhere: every number, date and expression stays in your browser, and only one card's result is shown at a time, above that card's own fields.

How the Add/Subtract time values tab works

A duration such as "3 hours 45 minutes" is really one number of seconds, just written in three parts for readability. Adding two durations means converting each one to seconds, adding the seconds, then converting the total back into hours, minutes and seconds. Converting a duration to seconds multiplies the hours by 3600, the number of seconds in an hour, the minutes by 60, and adds the seconds figure as is.

Converting back the other way is where carrying happens. Once the seconds are summed, the whole number of hours in that total is however many whole 3600s fit into it; whatever is left over is divided into whole minutes, however many whole 60s fit, and whatever is left over after that is the seconds figure, which always ends up between 0 and 59. This is the same carrying idea as adding two numbers in base 10 and carrying a 1 into the next column, just with a base of 60 for minutes and seconds instead of a base of 10.

Worked example. Add 3:45:00 and 2:30:15. First convert both to seconds: 3:45:00 is (3 × 3600) + (45 × 60) + 0 = 10800 + 2700 = 13500 seconds, and 2:30:15 is (2 × 3600) + (30 × 60) + 15 = 7200 + 1800 + 15 = 9015 seconds. Adding those gives 13500 + 9015 = 22515 seconds. Converting 22515 back: dividing by 3600 gives 6 whole hours with 915 seconds left over (6 × 3600 = 21600, and 22515 - 21600 = 915); dividing that remainder by 60 gives 15 whole minutes with 15 seconds left over (15 × 60 = 900, and 915 - 900 = 15). So the total is 6:15:15, six hours, fifteen minutes and fifteen seconds. This add time calculator keeps every row’s own plus or minus sign, so a longer chain of hours and minutes calculator entries folds into the same running total.

How the Add/Subtract time from a date tab works

The second card is a date and time calculator in the fuller sense: it takes a starting calendar date and a time of day together, then adds or subtracts a duration in days, hours, minutes and seconds, producing a resulting date and time of day along with the day of the week. That is different from the date calculator's own add or subtract tool, which only works with whole calendar dates and has no time-of-day field at all, and different again from the time duration calculator, which measures the gap between two full dates and times rather than shifting one of them by a duration.

Every shift here is computed as a single instant in time rather than as separate date math and time math bolted together. The start date and time are combined into one point on the calendar, the duration is added or subtracted from that point, and the result is read back out as a date, a time of day and a day of the week. Handling it this way means an hour that pushes past midnight rolls into the next calendar day automatically, and a number of days that pushes past the end of a month rolls into the next month, or the next year, exactly the way a calendar actually behaves.

Worked example. January 20, 2026 plus 40 days lands on March 1, 2026: 11 days remain in January after the 20th, all 28 days of February 2026 (not a leap year) account for 28 more, and the 40th day itself lands on March 1. A second example shows the same rollover with hours instead of days: adding 5 hours to a start time of 10:00:00 PM crosses midnight and lands on 3:00:00 AM the next calendar day, one day later than the start date even though the change entered was measured purely in hours.

How to write a Time Calculator expression

The third card reads a single typed line and evaluates it, rather than separate fields. The grammar is deliberately small: a term is a number immediately followed by one unit letter, d for days, h for hours, m for minutes or s for seconds, upper or lower case. Terms are joined with a plus or minus sign, and terms written next to each other with no sign between them are simply added. Nothing else is understood: no parentheses, no multiplication or division, and no unit other than d, h, m or s, so an expression outside that grammar returns a specific error explaining what to fix rather than a wrong number.

Worked example. Typing "1d 2h 3m 4s - 2030s + 28h" is read left to right, one term at a time. The first four terms, 1d, 2h, 3m and 4s, sit next to each other with no sign between them, so they are added together: 1 day, 2 hours, 3 minutes and 4 seconds comes to 93784 seconds. The minus sign in front of 2030s subtracts 2030 seconds from that running total, bringing it to 91754 seconds. The plus sign in front of 28h then adds 28 hours, 100800 seconds, for a final total of 192554 seconds. This calculator displays 192554 seconds as 53:29:14.

What a negative result means

Both the Add/Subtract Time Values card and the Time Calculator in Expression card can return a negative total, and it means the same thing either way: the subtracted terms add up to more than the added terms. Adding 1:00:00 and then subtracting 2:30:00 gives 3600 - 9000 = -5400 seconds, which formats as -1:30:00. Read that as "the second duration was an hour and a half longer than the first", not as a broken calculation; the size of the gap stays the same regardless of which duration happens to be larger, only the sign flips.

Common uses for this calculator

Each card suits a different kind of question:

  • Logging billable or worked hours across several separate tasks or shifts in a day, where each task's duration is already known and only needs summing into one total.
  • Scheduling a callback or reminder a set number of hours or minutes from now, or checking what date and time a fixed-length window, such as a 45-day return period, actually expires.
  • Checking a logged duration against a plan, for example subtracting a planned duration from an actual duration to see whether a task ran over or under, with the sign of the result showing which one it was.
  • Pasting a duration written as shorthand, such as a line from a video edit log or an exported timer report, straight into the expression card instead of re-typing each number into a separate field.

When another time tool fits better

Calculations with time come in a few shapes, and each has its own tool. This page is a time addition calculator for durations and a date time calculator for moving a moment forward or back. To calculate hours worked across several shifts, the hours calculator is built for exactly that, and the time card calculator works as a work time calculator and time clock calculator for timesheets, with breaks taken out. For the gap between two moments, the time duration calculator acts as a time difference calculator. Counting whole days, weeks or months belongs to the date calculator, a calendar calculator for time between dates and the time and date calculator questions that come with them.

A quick rule for choosing: if the question starts from durations, stay on this page; if it starts from two clock times, use the duration tool; if it starts from calendar dates, use the date calculator.

Frequently asked questions

How is this different from the Time Duration Calculator?

The Time Duration Calculator finds the gap between two full dates and times, such as a start of 9:00 AM on one day and an end of 5:30 PM three days later, and needs both ends already known. This Time Calculator instead either combines durations you already have (Add/Subtract Time Values), shifts a single date and time by a duration (Add/Subtract Time From a Date), or evaluates a typed shorthand expression (Time Calculator in Expression). If you already have two full dates and times and want the gap between them, use the Time Duration Calculator; if you have one date and time plus a length of time to add or subtract, or a chain of durations to combine, use this page.

How is this different from the Date Calculator?

The Date Calculator's own add/subtract tool works with whole calendar dates only, with no time-of-day field at all, and it also supports months and years, which have a variable, calendar-dependent length. This Time Calculator's Add/Subtract Time From a Date card always includes a time of day alongside the date, and its duration is limited to days, hours, minutes and seconds, units with a fixed length, so a shift here is always an exact number of seconds rather than a calendar-aware month or year shift.

What exactly can I type into the Time Calculator in Expression box?

Only two kinds of tokens: a term, which is a number immediately followed by d, h, m or s (upper or lower case), and the operators + and -. Terms written next to each other with no operator between them are added, such as "1d 2h" meaning 1 day plus 2 hours. Nothing else is understood, so parentheses, multiplication, other letters, or a number with no unit at all each produce a specific error message instead of a guessed answer.

What time will it be in a certain number of hours, like 10 hours from now?

Enter the current, or any starting, date and time in the Add/Subtract Time From a Date card, choose Add, and fill in the hours or minutes field with the amount of time ahead you are asking about. For example, starting at 10:00:00 PM and adding 5 hours returns 3:00:00 AM the next calendar day, since the addition crosses midnight; the card shows both the resulting date and the resulting time of day together.

What time was it 10 hours ago, or any number of hours ago?

Use the same Add/Subtract Time From a Date card, but choose Subtract instead of Add, and enter the current date and time as the start. Subtracting hours or minutes works exactly like adding them in reverse, including crossing back over midnight into the previous calendar day when the amount subtracted is larger than the time already past on the clock.

What does a negative result mean?

It means the subtracted terms add up to more than the added terms, on either the Add/Subtract Time Values card or the Time Calculator in Expression card. Adding 1:00:00 and then subtracting 2:30:00 gives 3600 - 9000 = -5400 seconds, which formats as -1:30:00: the second duration was an hour and a half longer than the first. The size of the gap stays the same regardless of which duration is larger, only the sign flips.

Why can hours and days be large numbers while minutes and seconds only go up to 59?

Hours, minutes and seconds, and, on the Add/Subtract Time From a Date card, days, are not independent digits of a clock face, they are the decomposed parts of one duration. Once a duration is broken into its parts, any leftover minutes or seconds are folded up into a whole hour, so minutes and seconds always land between 0 and 59. Days and hours themselves have no such ceiling, since a duration can run well past a single day, for example a shift log or a 40-day return window.

What time is 30 minutes from now?

Enter the current time in the Add/Subtract Time From a Date card, choose Add, put 30 in the minutes field and press Calculate. Starting at 11:45:00 PM, 30 minutes from now is 12:15:00 AM the next calendar day, and the card shows the new date alongside the new time.

Related tools: Time Duration Calculator, Hours Calculator and Date Calculator. More are grouped under Everyday Calculators, and every tool on the site is listed at all calculators.