Relative Time

Type a date or a timestamp. You get it as "3 days ago" or "in 2 hours", the way apps say it, and the exact gap in days, hours, minutes and seconds.

How it works

The date is compared with now, or with a second date you type. The relative form uses the largest whole unit and rounds down, so 47 hours is "1 day ago", never "2 days ago".

Months and years have no fixed length, so for those the page uses average lengths: 30.44 days for a month and 365.25 for a year. The exact difference underneath uses no averages, so trust it when a day matters.

The everyday wording, such as "yesterday" or "next month", comes from your browser's own Intl.RelativeTimeFormat, the same one web apps use. Nothing you type leaves your browser.

How to use it

  1. 1 Type a date and time, such as 2026-12-25T18:00, or paste a Unix timestamp.
  2. 2 Leave "Compared with" blank to compare with now, or type a second date.
  3. 3 Read the relative time, the everyday wording and the exact difference.
  4. 4 Copy whichever form you need.

Good to know

  • Compared with now, the answer updates every second, so you can leave the page open as a rough countdown.
  • Building a "posted 3 hours ago" label? The two wordings here are what Intl.RelativeTimeFormat gives with numeric set to "always" and to "auto".
  • For a live countdown to a date with days, hours, minutes and seconds, use the Countdown tool.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Writing "posted 2 days ago" correctly

Relative time is how most apps show dates: a comment posted "yesterday", a deploy "3 hours ago", a sale ending "in 2 days". It reads better than a full date, but it hides a few choices. This page shows those choices so you can check what your own code should say.

Say a comment was posted at 2026-12-02T18:00 and you are reading it at 2026-12-04T12:00. Type the first date, and the second into "Compared with". The relative form is "1 day ago", because the gap is 1 day and 18 hours and the page rounds down. The everyday wording is "yesterday", which is what Intl.RelativeTimeFormat gives with numeric set to "auto". The exact difference is 1 day and 18 hours.

Rounding down is a choice, and it explains most of the "that is wrong" reports such labels get. With rounding to the nearest unit instead, 1 day and 18 hours would be "2 days ago", which feels odd for something posted the day before yesterday evening. Rounding down never claims more time has passed than really has. The cost is that 23 hours and 59 minutes still says "23 hours ago".

Months and years are counted with average lengths, because a relative label has no room for "1 month and 3 days". A gap of 400 days is "1 year ago", and in everyday words "last year". If you need whole calendar months, for a billing period or an age, use Date Difference, which counts real months.

There are limits. The page compares two moments; it does not know about business hours or time spent away. The everyday wording comes from your browser, so it can differ slightly between browsers and versions. And a date typed without an offset is read in your device's zone, so the same text can mean a different moment on someone else's computer.

Frequently asked questions

Why does 47 hours show as "1 day ago"?

The relative form uses the largest whole unit and rounds down, as most apps and the Timestamp Converter do. 47 hours is one whole day and 23 hours, so it is "1 day ago". The exact difference row shows the full 1 day and 23 hours.

What is the difference between the two wordings?

The first always uses a number: "1 day ago". The second uses a word where English has one: "yesterday", "tomorrow", "last year". Both come from the browser's Intl.RelativeTimeFormat, set to numeric "always" and "auto".

How is a date with no time zone read?

In your device's time zone, which the note under the results names. To be exact, add an offset: 2026-12-25T18:00Z is 18:00 UTC, and 2026-12-25T18:00+05:30 is 18:00 in India.

Why is "1 month" not always the same number of days?

Because the relative form counts months as 30.44 days, the average month. A gap of 30 days reads as "30 days", and a gap of 31 days reads as "1 month". For whole calendar months, use Date Difference.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.