Explanation
What this measures
A countdown counts the calendar days left until an event. A positive number means the event is still ahead; a negative number says how many days ago it happened.
How to use it
Enter the date to count from, usually today, and the event date, both as YYYY-MM-DD. Both dates are explicit so the answer is reproducible. It does not tick or read your device clock.
D = T − N
| D | days until the event, negative if past |
|---|---|
| N | day number of the count-from date, counted from 0001-01-01 |
| T | day number of the event date, counted from 0001-01-01 |
Count toward the new year
| Count from | Dec 20, 2024 |
|---|---|
| Event date | Jan 1, 2025 |
| Result | 12 days to go |
Day number of 2025-01-01 − day number of 2024-12-20 = 12 days
The event is today
| Count from | Jan 1, 2024 |
|---|---|
| Event date | Jan 1, 2024 |
| Result | Today |
Day number of 2024-01-01 − day number of 2024-01-01 = 0 days
An event already passed
| Count from | Mar 1, 2024 |
|---|---|
| Event date | Feb 28, 2024 |
| Result | 2 days ago |
Day number of 2024-02-28 − day number of 2024-03-01 = -2 days
Diagram of this result
The diagram draws a timeline from the count-from date to the event, marks the month boundaries in between, and restates the distance in weeks and days.
A text summary gives the same two dates and the distance in days and in weeks.
Common mistakes
Calendar days are not exact 24-hour periods in a timezone. The event day itself is not an extra day. A past date gives a negative result instead of being clamped to zero.
Limits and assumptions
Gregorian dates 0001–9999, with no time of day, clock, alarms, timezone, holidays or notifications. It uses the same day numbering as the date difference calculator.
Sources
Gregorian calendar arithmetic. December 20 to January 1 crosses twelve day boundaries.
Can I count down to a past event?
Yes. The answer then reads as days ago, and the number in the steps is negative.