Skip to content

Add or Subtract Time from a Unix Timestamp

Paste a Unix timestamp, shift it by seconds, minutes, hours, or days, and see the result in every format instantly. Drag the slider to explore, or type an exact amount.

Why shift a timestamp?

Sometimes you have a number — a timestamp from an API response, a log line, a database column — and you need to know what time it represents a little earlier or later. Maybe a support ticket says “the event happened 15 minutes before this timestamp” and you need the actual time. Maybe you're checking whether a token that was issued an hour ago should already be expired.

For developers, this comes up constantly: computing a token or session expiry by adding a TTL to an issuedAt timestamp, building clock-skew tolerance into JWT validation, working out a retry or backoff deadline, or checking whether a scheduled job's next run time has already passed.

Unlike calendar-date math, this is fixed-duration arithmetic — adding one day always means exactly 86,400 seconds, with no ambiguity from daylight saving time or month length. If you need calendar-aware math instead, see Add / Subtract Time.

Frequently asked questions

What does it mean to add time to a timestamp?

A Unix timestamp is just a count of seconds (or milliseconds) since January 1, 1970. "Adding time" means adding that many seconds to the count — for example, adding 3,600 seconds moves the timestamp exactly one hour later. This tool does that arithmetic for you and shows the result as a readable date.

How do I add or subtract seconds, minutes, hours, or days from a timestamp?

Paste your timestamp into the input, choose Add or Subtract, type an amount, and pick a unit (seconds, minutes, hours, or days). The result updates instantly — no calculate button needed. You can also drag the slider to explore nearby values.

Why would a developer need to shift a timestamp?

Common cases: computing a token or session expiry (issuedAt + 3600 seconds), building in clock-skew tolerance for JWT validation, calculating a retry or backoff window, checking a TTL deadline, or figuring out what time a scheduled job will actually fire after a delay.

Does this account for daylight saving time?

No — and that's intentional. A Unix timestamp is an absolute point in time, so adding 24 hours always means exactly 86,400 seconds later, even across a DST transition. If you need calendar-aware math (e.g. "same time tomorrow" in a specific timezone, which can be 23 or 25 hours away during a DST change), use the Add / Subtract Time tool instead.

How is this different from the "Add / Subtract Time" date tool?

Add / Subtract Time works on calendar dates with day/week/month/year granularity and is timezone- and DST-aware — it answers "what date is 3 months from now." This tool works on raw Unix timestamps with seconds/minutes/hours/days granularity and is pure fixed-duration arithmetic — it answers "what timestamp is 3,600 seconds from now," which is what you need when working with epoch values in code.

How precise is the result?

Exact. The shift is applied in milliseconds with no rounding, so the result is accurate down to the millisecond regardless of which unit you choose.

How would I do this in code?

JavaScript: new Date(originalMs + amount * unitMs) — e.g. + 3600_000 for one hour. Python: datetime.fromtimestamp(original) + timedelta(hours=1). Go: time.Unix(original, 0).Add(time.Hour). All three are equivalent to what this tool computes.

Related tools

Smart paste

Paste any timestamp or date, or search for a tool