Time & duration calculator

Time Ago Calculator

Find out exactly how long ago a date and time was. Pick any moment and the result — years, months, days, hours, minutes and seconds — updates live, ticking every second.

Any past date works. Pick a future one and it counts down instead.

Uses your device's local time zone.

Time ago

2y 7m 27d

12h 00m 00s

This date is in the future
Day of week
Monday
Total days
970
Total weeks
138
Total hours
23,292

What this time ago calculator does

This tool answers a question that's harder to work out in your head than it looks: exactly how long ago was that? Pick any date and time — a birthday, an anniversary, a launch date, the day a project started — and it counts back from right now, showing the gap in years, months, days, hours, minutes and seconds. The result keeps ticking live, second by second, with no button to press.

Pick a date that hasn't happened yet, and the calculator notices and flips into a countdown instead — the same breakdown, just counting down to the date rather than back from it.

How to use it

One field, live result — most people never touch anything else.

  1. Pick the date and time.Type it or use the picker. It can be any date in the past or future.
  2. Read the live result.The breakdown updates instantly and keeps ticking every second while the page is open.
  3. Check the totals if you need one number.Total days, weeks and hours are shown alongside the full breakdown.
  4. Save or share it.Copy the result, print it, or download it as a CSV row.

How the time is calculated

The calculator doesn't divide by an average month length or treat every year as 365 days — that would drift out of accuracy within a few months. Instead it compares the two real calendar dates directly: full years first, then full months, then full days, hours, minutes and seconds, borrowing from the next unit up whenever one comes out negative (for example, if the day-of-month you started from is later than today's).

Worked example · Aug 20, 2026, 9:15 AM to Aug 28, 2026, 12:00 PM
Days: 28 − 20 = 8 days
Hours: 12 − 9 = 3, minus 1 borrowed for the minutes = 2 hours
Minutes: 0 − 15 = −15, borrow 60 = 45 minutes
Result: 8 days, 2 hours, 45 minutes

Leap years and different month lengths

Because the calculation works from actual calendar dates rather than a fixed day count, leap years and months of different lengths are handled automatically — no special-casing needed.

Future dates

If the date you enter hasn't happened yet, the calculator swaps the direction of the comparison, changes the label from "Time ago" to "Time until," and shows a badge so it's clear the countdown has flipped.

Quick examples

A few sample dates and their result, as measured against Aug 28, 2026, 12:00 PM.

Date enteredDirectionResult
Jan 1, 2020, 12:00 AMAgo6y 7m 27d
Feb 29, 2024, 12:00 AMAgo2y 5m 30d
Aug 20, 2026, 9:15 AMAgo8d 2h 45m
Jan 1, 2027, 12:00 AMUntil4m 3d 12h

Need the gap between two dates that are neither of them "now"? The time duration calculator compares any two arbitrary times instead of always counting from the present.

Counting back: days, weeks, months and years

The "What date was it?" tab answers questions like what was the date 90 days ago or six months ago. Days and weeks are exact: 90 days ago is always 90 × 24 hours of calendar days earlier. Months and years are different, because months aren't all the same length — so they're counted on the calendar instead.

Worked example · one month before March 31, 2027
Step back one calendar month: March → February 2027
February 2027 has no 31st (it ends on the 28th)
So the date is clamped to the last day of the month: Sunday, February 28, 2027
Counting 30 days back instead would give Monday, March 1, 2027 — a different answer to a slightly different question.

That end-of-month rule is the same one most spreadsheets and programming libraries use (Excel's EDATE, for example), so the result will match a contract or a report that says "six months before". When a deadline is written in days, use days; when it's written in months, use months — they rarely give the same date. For deadlines that skip weekends and holidays, the business days calculator counts working days instead.

Common look-back periods

Typical "X ago" questions and how each one is counted.

QuestionCounted asTypical use
7 days ago7 calendar daysWeekly reports, return windows
30 days ago30 calendar daysBilling cycles, "last 30 days" analytics
90 days ago90 calendar daysQuarterly reviews, probation periods
6 months ago6 calendar monthsStatements, eligibility look-backs
1 year ago1 calendar year (Feb 29 → Feb 28)Anniversaries, year-over-year comparisons
100 days ago100 calendar daysMilestones, school "100th day"

Going forward instead? The time from now calculator runs the same arithmetic in the other direction, and the time duration calculator measures the gap between any two dates you choose.

Frequently asked questions

How is "time ago" calculated?

The calculator compares your chosen date and time to the current moment using real calendar dates, not an average month length. It works out full years, then full months, then full days, hours, minutes and seconds, borrowing from the next-larger unit whenever one is negative.

Does it handle leap years correctly?

Yes. Because the calculation uses actual calendar dates rather than a fixed 365-day year or 30-day month, leap years and different month lengths are accounted for automatically.

What happens if I pick a future date?

The calculator detects that the date hasn't happened yet, switches the label to "Time until," and counts down to it instead of back from it.

Does it account for daylight saving time?

Yes. The result reflects true elapsed time between the two moments, so a span that crosses a daylight-saving change will correctly be an hour more or less than a simple wall-clock count.

What time zone does it use?

It uses your device's local time zone for both the date you enter and the current time it compares against.

Does the result update on its own?

Yes. Once you've entered a date, the seconds keep ticking automatically — no refresh or recalculation needed.

What was the date 90 days ago?

Open the "What date was it?" tab, enter 90 and choose days ago. The calculator counts back 90 calendar days from the current moment and shows the date, weekday and time.

What is one month before March 31?

The last day of February, because February has no 31st. Counting back by calendar months clamps to the end of a shorter month, the same rule spreadsheets use.

About the author

Fletcher Langley
Time & Scheduling Specialist · 24hourto12hour.com

Operations and workforce-systems specialist with 14+ years inside shift-based industries and payroll platforms, and a BS in Industrial Engineering. Fletcher writes and reviews the calculators, converters, and guides here — from overnight-shift math to decimal payroll hours — drawing on years spent translating between 12-hour, 24-hour, and military time for real timesheets.

Written & reviewed by Fletcher Langley · Last updated: November 2026