Time Since or Until a Date Calculator

Find how long ago a past date was, count down to a future date, or compare any two dates.

Choose what to calculate

Calculation mode

Choose a past date for Time since.

Turn off exact time to use local midnight. Inclusive counting changes only the calendar-day count, not elapsed-time totals.

Both inputs use your device’s local time zone: detecting…. Real elapsed totals include daylight-saving changes.

Valid changes calculate automatically. The live result ticks once per second when “now” is the reference.

Result

Choose a valid target date to see the result.

Advertisement

How this calculator defines the difference

Time since measures from a past target to the device clock. Time until measures from the device clock to a future target. Between two dates uses the entered reference and target; its sign is defined by:

signed difference = target timestamp − reference timestamp

The absolute timestamp difference produces fixed-duration totals. One week is 7 × 24 hours, one day is 24 hours, and smaller units are exact multiples of seconds. Leap seconds are not represented by JavaScript dates.

The calendar breakdown answers a different question. It takes the largest complete years and months from the earlier date while preserving the original day-of-month anchor, clamping only when that day does not exist. It then counts local calendar days and the remaining clock time. Thus January 31 to March 31 is two months, and February 29, 2020 to February 28, 2021 is one calendar year under this end-of-month convention.

Both entries are interpreted in the displayed device time zone. Totals measure real elapsed time, so a local midnight-to-midnight interval may contain 23 or 25 hours across a daylight-saving change. For an international event, convert its published time to your device zone before entering it.

Worked examples

The first four examples use UTC; the DST example names its zone. For each one, subtract the start/reference timestamp from the end/target timestamp, take the absolute value for totals, then apply anchored calendar arithmetic separately.

CaseStart → endResult
Simple countdownJan 1, 2027 00:00 → Jan 2, 2027 12:001 day 12 hours; 36 total hours
Past dateJun 1, 2024 09:00 → Jun 8, 2024 09:001 calendar week; 7 total days
Month endJan 31, 2025 00:00 → Mar 31, 2025 00:002 calendar months; 59 total days
Leap-day anniversaryFeb 29, 2020 00:00 → Feb 28, 2021 00:001 calendar year; 365 total days
DST spring changeMar 8, 2026 00:00 → Mar 9, 2026 00:00 in America/New_York1 calendar day; 23 elapsed hours

Methodology and verification

Maintained by the Starlight Tools engineering team. Calculation logic last reviewed: .

Convention: original-day anchored Gregorian calendar years and months, local calendar days, and real timestamp-based elapsed totals. Regression cases cover unequal month ends, February 29 anniversaries, reversed dates, year boundaries, identical inputs, and a daylight-saving transition.

Frequently asked questions

What time zone is used?

Both inputs use the device time zone shown beside the controls. Separate target and reference zones are not supported, so convert international event times first.

What happens if I do not include a time?

Date-only values mean 00:00 (local midnight) at the start of that date.

Is today or the target day included?

Elapsed totals exclude an extra end day. The optional inclusive setting adds one only to the displayed calendar-day count.

Why do total days differ from the years–months–days breakdown?

Totals divide real elapsed milliseconds into fixed 24-hour days. The breakdown uses variable calendar years and months, then local calendar days.

How are February 29 and unequal month lengths handled?

The original day is retained as the anchor. When it is absent, the date clamps to that month’s final day without changing the anchor for later calculations.

How does daylight saving time affect the answer?

Calendar dates follow local civil time; elapsed totals follow real timestamps. A DST change can make one local calendar day equal 23 or 25 elapsed hours.

Are leap seconds included?

No. Browser dates use Unix-style milliseconds and do not model leap seconds.

Can I compare two arbitrary dates?

Yes. Choose Between two dates. If the target precedes the reference, the result clearly reports the reversed direction while showing the absolute duration.

How accurate is the live counter if my device clock is wrong?

It is only as accurate as the device clock and selected time zone. Correct those system settings before relying on the result.

Explore more tools