Epoch calculator

Subtract two timestamps exactly, or add time to one. Choose between elapsed time (exact seconds) and calendar time (days and months on the wall clock of a zone).

Nowreading device clock…
2026-03-07T12:00:00-05:00
2026-03-08T12:00:00-04:00
IANA zone; type to search, e.g. Kolkata, Paris.

B − A

Exact duration
23 h
Seconds
82800
Milliseconds
82800000
Nanoseconds
82800000000000
ISO 8601 duration
PT23H
Calendar (America/New_York)
0 y 0 mo 1 d + 0 s

Leap seconds are not counted, matching Unix time.

A + duration

Calendar (America/New_York wall clock)
2026-04-07T12:00:00-04:00
Calendar, Unix seconds
1775577600
Elapsed (exact seconds)
Years and months have no fixed length; use calendar.
  • The UTC offset changed from -05:00 to -04:00 across this interval (DST or zone rule change).
Settings and local data

Storage: checking…

Elapsed time versus calendar time

"One day later" has two meanings. Elapsed time adds exactly 86,400 seconds. Calendar time keeps the wall-clock time and moves the date. Across a daylight-saving change these differ: noon on 7 March 2026 plus one calendar day in New York is noon on 8 March, only 23 elapsed hours later. The preset shows that case. The calculator gives both answers and labels which is which.

Month arithmetic also needs a rule for short months. Adding one month to 31 January gives 28 February in 2026, and the result notes that it was clamped. Years and months are applied first, then days and weeks, then hours, minutes and seconds as exact elapsed time. This order matches java.time and Temporal.

Differences you can paste

A difference is shown as exact nanoseconds, as a breakdown (days, hours, minutes, seconds, ms, µs, ns), as an ISO 8601 duration (PT23H), and as calendar years, months and days measured in the selected zone. Each line has its own copy button.

Questions

How many seconds are between two dates?
Enter both instants. The exact difference appears in seconds and nanoseconds. Leap seconds are not counted, matching Unix time.
Why is one day sometimes 23 or 25 hours?
Daylight saving changes the UTC offset, so a calendar day in that zone is shorter or longer than 24 hours. Choose calendar units to keep the clock time, or elapsed units for exact seconds.
Can I add negative amounts?
Yes. Any field can be negative to subtract.