Command Palette

Search for a command to run...

Dates & time

Date & Duration Calculator

See how many days remain until a date, how long has passed since, and the years and days between two dates with leap years handled.

Countdown or elapsed time
Compare two moments to see remaining or passed days, hours, and minutes.

Calculated in your local timezone (UTC).

Status

Remaining

1d • 0h • 0m

Days
1
Hours
24
Minutes
1440
Span between two dates
Measure full days and calendar years between a start and end date (leap years respected).

Dates are compared in your timezone using calendar days; time of day is ignored for day counts.

Total days

7

Years + days

0y 7d

Calendar span

2026-07-18 to 2026-07-25 (UTC date view)

What

Date & Duration Calculator definition

A date calculator measures the difference between two dates and can show remaining or elapsed time.

Cases

Use Cases

1

Calculate days until a deadline

2

Measure elapsed time between two events

3

Plan schedules by comparing start and end dates

How To

How to Calculate Dates and Durations

A step-by-step guide to computing countdowns and spans between two dates.

1

Select mode

Choose countdown/elapsed or range-between-dates mode.

2

Enter dates

Provide reference/target times (or start/end dates).

3

Review results

Check days/hours/minutes and years+days results, then copy if needed.

Knowledge

Understanding Date Calculations

Leap Year Rules
A year is a leap year if divisible by 4, except century years must be divisible by 400. So 2000 was a leap year, but 1900 wasn't. February 29 only exists in leap years.
Calculating Date Differences
Date differences can be expressed in days, weeks, months, or years. Days are straightforward. Months and years are trickier because month lengths vary. Different algorithms may give slightly different results.
Elapsed Time vs Calendar Time
Elapsed time counts actual time passed (accounting for DST changes). Calendar time counts calendar units. A 'month from now' might be 28-31 days depending on which month.
Business Day Calculations
Business day calculations exclude weekends and holidays. This is common in finance, legal, and business contexts. Holiday calendars vary by country and even by region within countries.
Date Libraries
For complex date math, use libraries like date-fns, Luxon, or Day.js in JavaScript. They handle edge cases, timezones, and provide consistent APIs for date manipulation.

FAQ

Date calculator FAQ

How do you decide between remaining vs. elapsed?
If the target is after the reference time, the difference is shown as remaining. When the target is earlier, it's shown as elapsed; matching moments show zero.
Do leap years and leap days count correctly?
Yes. Calculations use calendar-aware math, including leap days. Dates like Feb 29 are clamped to Feb 28 in non-leap years when adding years.
Why can totals differ from whole-day counts?
Countdowns include hours and minutes, so a partial day is reflected in hours/minutes even if the day count hasn't advanced.
Can I see days until a deadline from right now?
Use “Set to now” for the reference, pick your deadline as the target, and the remaining days, hours, and minutes will update immediately.
How is the years + days value calculated?
It counts full calendar years from the start date, then adds the remaining days. Leap years are included, and Feb 29 is safely adjusted in non-leap years.
How do I avoid timezone or DST surprises?
Values use your browser timezone. If you compare across regions, convert both timestamps to UTC before entering them to avoid daylight-saving offsets.
Date & Duration Calculator