Time Arithmetic Calculator

Time Arithmetic Calculator

Popular AI Skill PRO

Enter Calculation

Formula

R=T1+T2where{T1=86400days+3600hours+60min+secT2=86400days+3600hours+60min+sec\begin{gathered} R = T_1 + T_2 \\[1.5em] \text{where}\quad \left\{ \begin{aligned} T_1 &= 86400\,\text{days} + 3600\,\text{hours} + 60\,\text{min} + \text{sec} \\ T_2 &= 86400\,\text{days} + 3600\,\text{hours} + 60\,\text{min} + \text{sec} \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

Result
0 d 0 h 0 m 0 s
days / hours / minutes / seconds
Days 0
Hours 0
Minutes 0
Seconds 0

Report an error on this page

What this calculator does

The Time Arithmetic Calculator lets you do math on lengths of time expressed in days, hours, minutes and seconds. You can add two time spans, subtract one from another, multiply a span by a plain number, divide a span by a plain number, or divide one span by another to get a unitless ratio. The answer is automatically normalized back into clean days, hours, minutes and seconds.

How to use it

Enter your first time span in the Operand 1 fields. Pick an operation. If you chose add, subtract, or divide-by-time, fill in the Operand 2 time fields. If you chose multiply or divide-by-a-number, fill in the single "number" field instead. Blank fields count as zero, decimals are allowed, and negative components are accepted (a subtraction can yield a negative duration, shown with a leading minus sign).

The formula

Every span is converted to total seconds using fixed civil-day lengths: 1 day = 86400 s, 1 hour = 3600 s, 1 minute = 60 s. The chosen operation is applied in seconds, then the result is broken back down by repeatedly taking whole days, then hours, then minutes, leaving any remaining seconds (which may be fractional if your inputs were). Divide-by-time simply returns A divided by B as a pure number.

$$S = d\times86400 + h\times3600 + m\times60 + s$$

$$d=\lfloor S/86400\rfloor,\ h=\lfloor (S\bmod 86400)/3600\rfloor,\ m=\lfloor (S\bmod 3600)/60\rfloor,\ s=S\bmod 60$$

Advertisement
Diagram showing days, hours, minutes and seconds converting into a single total of seconds
Each time span is converted to a common unit (seconds) before arithmetic.

Worked example

Add 1 day 5 h 30 m to 20 h 45 m 30 s. First span = 106200 s, second = 74730 s, total = 180930 s. Normalizing: 2 days (172800 s) leaves 8130 s, which is 2 hours (7200 s), then 15 minutes (900 s), then 30 seconds. Result: 2 days, 2 hours, 15 minutes, 30 seconds.

$$180930 = 172800 + 8130,\quad 8130 = 7200 + 900 + 30$$
Advertisement
Two time bars being added and the combined bar normalized into days, hours, minutes, seconds
Adding two spans and normalizing the carry-over into clean units.

Time Unit Conversion Table

The calculator converts every input to seconds, does the arithmetic, then converts back into days, hours, minutes and seconds. These fixed equivalents are what it relies on.

Unit Minutes Seconds Equivalent
1 minute 1 60 60 s
1 hour 60 3,600 60 min
1 day 1,440 86,400 24 h
1 week 10,080 604,800 7 days

Decimal hours to minutes

Multiply the decimal part of an hour by 60 to get minutes.

Decimal hours Minutes
0.1 h 6 min
0.25 h 15 min
0.5 h 30 min
0.75 h 45 min

Note: the calculator treats a day as a fixed 24 hours (86,400 seconds). It has no months or years, because their lengths vary, and it does not account for daylight-saving shifts or leap seconds.

FAQ

Does it account for daylight saving or leap seconds? No. These are abstract durations, not calendar dates, so a day is always exactly 24 hours.

What happens if I divide by zero? Division by a zero number, or dividing by a zero-length time span, is undefined, so the calculator shows an error instead of a result.

Can the result be negative? Yes. Subtracting a larger span from a smaller one (or using negative inputs) produces a negative duration, displayed with a single leading minus sign.

Last updated:

Most popular in Time and Date

View all Time and Date calculators