Add or subtract days, hours, minutes, and seconds - with instant totals in every unit.
Add or Subtract Two Durations
Combine or remove two durations expressed in days, hours, minutes, and seconds. No dates involved - to shift a calendar date and time, switch to the Date & Time tab.
Result-
Total days:-
Total hours:-
Total minutes:-
Total seconds:-
Enter both times, choose Add or Subtract, then press Calculate Time.
Add / Subtract Date & Time
Start from a full date and time (it defaults to the current moment), add or subtract a duration, and read the resulting date and time. The time-only calculator stays available in the Two Durations tab.
Whole numbers of 0 or more. Adding 90 minutes moves the clock forward by 1 hour and 30 minutes; midnight, month, year, and leap-day boundaries are handled automatically.
Resulting date and time-
Applied duration:-
Pick a starting date and time, choose Add or Subtract, enter a duration, then calculate.
Quick Guide
Add or subtract two durations
Step 1: Choose Add or Subtract under Operation
Step 2: Enter the first time in days, hours, minutes, and seconds
Step 3: Enter the second time the same way
Step 4: Click Calculate Time and read the result in every unit
Example: Add 2d 3h 0m 0s and 1d 2h 0m 0s to get 3d 5h 0m 0s.
Add or subtract from a date and time
Step 1: Stay on the Date & Time tab - the starting date and time is prefilled with the current moment
Step 2: Choose Add or Subtract under Operation
Step 3: Enter the duration in days, hours, minutes, and seconds (whole numbers of 0 or more)
Step 4: Click Calculate Resulting Date and Time and read the resulting date, time, and applied duration
Time Calculator performs arithmetic on time values: give it a first time and a second time in days, hours, minutes, and seconds, pick Add or Subtract, and it returns the answer in the same units along with total days, hours, minutes, and seconds for further calculations. It is ideal when you need the combined length of two sessions, the remainder of a budgeted time window, or a quick sanity check before doing the math by hand. See also: the time duration calculator for measuring between two clock times and the date and time duration calculator for moments on the calendar.
How It Works
Each field is converted to whole seconds and the two totals are combined: addition sums them, subtraction takes the difference. The result is decomposed back into days (86,400 seconds), hours, minutes, and seconds, and also expressed as decimal days, hours, and minutes. Inputs must be whole numbers of zero or more, and a subtraction whose second time is larger is rejected instead of producing a negative answer.
Use Cases
Combine several work or study sessions into one total duration
Subtract breaks or elapsed time from an allotted time budget
Convert a time sum into total seconds or decimal hours for schedules and logs
Frequently Asked Questions
How does the Time Calculator add and subtract time?
Enter a first time and a second time in days, hours, minutes, and seconds, choose Add or Subtract, and press Calculate Time. The result appears in the same units plus decimal days, hours, minutes, and total seconds.
Can I subtract a larger time from a smaller one?
No - a negative duration is rejected with a clear validation message. Swap the two times so the larger value is first, or switch the operation to Add.
Does the Time Calculator send my numbers anywhere?
No. Everything is calculated locally in your browser with plain JavaScript. Nothing is uploaded, stored on a server, or shared.
How do I add or subtract a duration from a date and time?
Stay on the Date & Time tab (it is selected by default), keep or edit the starting date and time - it defaults to the current moment - choose Add or Subtract, enter the duration in days, hours, minutes, and seconds, then press Calculate Resulting Date and Time. You get the new date and time plus the applied duration shown underneath.
How are midnight, month-end, and leap-year boundaries handled?
Date shifts add or remove whole seconds from the starting moment, so crossing midnight, a 30- or 31-day month, or a leap day happens automatically - 2026-03-31 23:45:10 plus 1d 2h 30m 15s lands on 2026-04-02 02:15:25. The Two Durations tab works in whole seconds and never touches the calendar.