Intermediate

Time Ago (Relative Time)

Turn any past date and time into a clear relative phrase like "3 days ago", plus a full breakdown of the elapsed interval in every unit.
Format: YYYY-MM-DDTHH:mm (or any parseable date)
Optional — defaults to the current moment
Time ago
3

3 days ago

Seconds
259,221.58
Minutes
4,320.36
Hours
72.01
Days
3
Weeks
0.43
Months
0.1
Years
0.01
2026-07-10T01:29now3 days agoElapsed time (progress scaled to 10 years)
Step by step
  1. 1

    Elapsed time in seconds

    |now − past| = 259,221.6 s
    Absolute difference between the two timestamps.
  2. 2

    Convert to days

    259,221.6 ÷ 86,400 = 3.0002
  3. 3

    Floor to whole units

    floor(3.0002) = 3
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Time ago is the gap between now and a past moment, expressed with the largest fitting unit: diff = now − past, then value = floor(diff / unit). Units step up from seconds to years using thresholds of 60, 60, 24, 7, ~30.44, and 365.25 days, giving phrases like "3 days ago" plus a full breakdown.

Formula
diff = now − past; pick largest fitting unit (s < 60, min < 60, hr < 24, day < 7, week < 30.44d, month < 365.25d, else year); value = floor(diff / unit)
How this is calculated

The calculator parses the past date and time you enter and an optional reference time. If you leave the reference blank it uses the current moment. The difference is computed in milliseconds as reference minus past, so a positive value means the past date is behind the reference and a negative value means it is ahead (shown as "from now").

To choose the relative phrase it picks the largest unit that fits the absolute difference, using these thresholds: under 60 seconds shows seconds; under 60 minutes shows minutes; under 24 hours shows hours; under 7 days shows days; under one month (averaged at 30.44 days) shows weeks; under one year (365.25 days) shows months; otherwise years. The displayed value is the floor of the difference divided by that unit, so partial units are dropped just like everyday speech ("3 days ago", not "3.4 days ago").

Months and years use averaged lengths (30.44 and 365.25 days) to account for varying month lengths and leap years, so they are approximations rather than exact calendar counts. The breakdown grid restates the same interval in seconds, minutes, hours, days, weeks, months, and years as exact fractional totals for precise work.

Frequently asked questions

Calendar months range from 28 to 31 days and years can include a leap day, so the calculator uses average lengths of 30.44 days per month and 365.25 days per year. This keeps the relative phrase consistent but means month and year totals are estimates, not exact calendar differences.

If the past date is actually later than the reference time, the difference is negative. The calculator still works: it uses the absolute interval and labels the phrase "from now" instead of "ago".

Any string the browser can parse works, but ISO 8601 like 2026-06-24T09:00 is the most reliable across devices. Leave the reference field blank to compare against the current moment.

Also known as

time ago calculator
relative time
how long ago
n days ago
elapsed since
x days ago
time since date
ago calculator

APA

TG we-Calculate Editorial Team. (2026). Time Ago (Relative Time) [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/time-ago

Chicago

TG we-Calculate Editorial Team. "Time Ago (Relative Time)." TG we-Calculate. 2026. https://we-calculate.com/calculator/time-ago.

IEEE

TG we-Calculate Editorial Team, "Time Ago (Relative Time)," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/time-ago

BibTeX

@misc{wecalculate_time_ago, title = {Time Ago (Relative Time)}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/time-ago}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?