This relative time calculator turns any timestamp into a human-readable phrase like "3 days ago" or "in 2 hours", the same style used in GitHub issues, Slack messages, and most modern UIs. Paste a Unix epoch (seconds, milliseconds, or microseconds), an ISO 8601 string, an RFC 2822 date, or virtually any date format your browser can parse — the tool auto-detects the format, shows the picked unit, breaks the delta down across seconds/minutes/hours/days/weeks/months/years, and displays both local and UTC times. A bulk mode converts whole lists at once, and the live clock keeps sub-minute phrases accurate.
Last updated: March 2026
just now
Type a timestamp to get started
Delta breakdown
Bulk mode — one timestamp per line
Copied!
Frequently Asked Questions
What is a relative time calculator?
A relative time calculator converts an absolute timestamp — Unix epoch, ISO 8601, RFC 2822, or a natural date string — into a human-readable phrase relative to right now: "3 days ago", "in 2 hours", "last week", "just now". It's the same formatting vocabulary you see in GitHub issues, Slack, Twitter, and most modern UIs. Developers use it to sanity-check log timestamps, design notification copy, debug TTL/expiry fields, or translate large lists of backend timestamps into something humans can skim.
What timestamp formats does this tool accept?
Auto-detection handles the common formats: Unix seconds (10-digit integer), Unix milliseconds (13-digit — JavaScript's native epoch), Unix microseconds (16-digit, sometimes emitted by Python and Postgres), ISO 8601 (2024-01-15T12:00:00Z and offset variants), RFC 2822 (Mon, 15 Jan 2024 12:00:00 GMT), and any natural string JavaScript's Date constructor accepts. Negative integers represent pre-1970 epochs. The detected format is shown just above the result.
How are units chosen for the relative phrase?
The tool picks the largest meaningful unit given the magnitude: under 45 seconds renders as "just now"; up to 60 seconds as seconds; up to 60 minutes as minutes; up to 24 hours as hours; up to 6 days as days; up to 4 weeks as weeks; up to 12 months as months; then years. Singular/plural is handled correctly ("1 day ago", not "1 days ago"). Future timestamps are prefixed with "in " instead of suffixed with " ago". These thresholds match the Intl.RelativeTimeFormat style used by major libraries.
Does the tool account for my local timezone?
Yes, in two ways. First, the absolute time display shows the parsed instant rendered in your browser's IANA timezone, alongside the equivalent UTC — so you can quickly see that a Unix timestamp stored in a database maps to, say, 14:30 local and 19:30 UTC. Second, the relative phrase is timezone-independent — it's the elapsed duration between two instants in real time, which is the same number of seconds no matter where you or the server are located.
How does bulk mode work?
Paste a list of timestamps — one per line, any mix of formats — into the left textarea and the right column fills with the equivalent relative phrases. Useful for translating log exports, CSV columns, or database dumps into something you can skim in a PR review. Invalid lines show an invalid marker rather than aborting the whole batch, so you can copy-paste messy data without pre-cleaning it.
Why does the phrase update every second?
"Now" is a moving target — a timestamp that's 42 seconds ago becomes 43 seconds ago one second later. The tool recomputes the relative phrase every second via a setInterval so sub-minute phrases stay accurate in real time. Once the delta exceeds a minute, the visible phrase only changes when the unit threshold is crossed (e.g., from "59 minutes" to "1 hour"), but the internal calculation keeps ticking.
What's the difference between Unix seconds and milliseconds?
Both count the time since the Unix epoch (1970-01-01 00:00:00 UTC) — the difference is the scale. Seconds (10 digits as of now, e.g., 1710000000) are standard in Unix, Go, and most databases. Milliseconds (13 digits, e.g., 1710000000000) are native to JavaScript (Date.now()) and Java. Microseconds (16 digits) occasionally appear in Postgres and Python time.time_ns(). This tool detects which one you pasted based on the digit count and parses accordingly.