Time ago calculator
This tool tells you how long ago a date was — or how far in the future it is — in friendly language like “3 days ago” or “in 2 weeks”, alongside an exact countdown breakdown. It is useful for working out elapsed time since an event, building a quick countdown, or measuring the gap between two dates.
How it works
The tool finds the difference in milliseconds between your chosen date and a comparison point (the current moment by default, or a second date you pick). For the plain-language phrase, it walks up a ladder of units — seconds → minutes → hours → days → weeks → months → years — and uses the largest unit that fits, via the browser’s relative-time formatter, adding “ago” for past dates and “in” for future ones. Separately it computes an exact breakdown by dividing the absolute millisecond gap into whole days, hours, minutes and seconds.
Example
If your date is exactly 50 hours before now, the phrase reads “2 days ago” (the largest fitting unit), while the exact breakdown shows 2 days, 2 hours, 0 minutes, 0 seconds ago. A date 90 minutes in the future reads “in 1 hour” with a breakdown of 1 hour, 30 minutes from now.
When each output mode is most useful
The plain-language phrase is designed for human communication. “3 weeks ago” is the natural way to describe a date in a message, a report, or a UI timestamp. The phrase is intentionally rounded — it picks the single largest relevant unit — which makes it easy to read at a glance but loses the precision of exact times.
The exact breakdown is useful when precision matters: debugging a time-related issue, verifying an SLA (“was it within 24 hours?”), or calculating how long you worked on something down to the minute. The breakdown shows the remaining amount after each unit — days first, then the leftover hours, then the remaining minutes, then the seconds — giving you all the information without doing the arithmetic yourself.
Comparing two specific dates (by unticking “Compare against now”) is useful for time spans that have nothing to do with the present moment: how long did a project run, how many days between two events in a historical record, or how long someone has been with a company from their start date to an anniversary.
How months and years are handled
Months and years are tricky to handle precisely because months have different lengths. This tool uses the browser’s built-in Intl.RelativeTimeFormat for the plain-language phrase, which applies the same rounding logic that native apps and operating systems use: approximately 30.44 days per month and 365.25 days per year (accounting for leap years in the average). The phrase “1 month ago” therefore means roughly 30–31 days have passed, not exactly one calendar month.
The exact breakdown bypasses this ambiguity entirely by reporting the raw count of days, hours, minutes, and seconds, which is always unambiguous regardless of which specific months are involved.
Common uses
- Age of a document or record — paste a creation date and see how old the file is
- Countdown to an event — enter a future date and check how many days away it is
- Elapsed time verification — confirm a timestamp was within a required window (for example within 72 hours of another event)
- Date arithmetic between two past events — compare a start date and an end date to find the duration of a project, subscription, or period
All calculation happens locally in your browser — your dates are never uploaded.