Days Until Calculator
Count down the number of days until any future event or date.
How to use this tool
- Enter event date and from date in the fields above.
- Results update instantly as you type — or click Calculate.
- Read your days until event and the full breakdown beneath it.
Count down the exact number of days to any upcoming event.
Formula
Days until event = round((event date − from date) ÷ 86,400,000 ms)
Both dates are parsed as UTC midnight; the difference in milliseconds is divided by the number of milliseconds in one day.
How it works
This calculator subtracts the from date from the event date — both interpreted as UTC midnight — to get a difference in milliseconds, then divides by 86,400,000 (the number of milliseconds in a 24-hour day) and rounds to the nearest integer.
Because dates are parsed in UTC, the result is unaffected by the user's local timezone, making it reliable for straightforward calendar countdowns. It does not account for daylight saving time transitions or leap seconds. If the from date is after the event date, the result will be negative, indicating the event has already passed.
Worked example
Worked example: days from 2026-01-01 to 2027-01-01
- From date: 1 January 2026 (UTC midnight).
- Event date: 1 January 2027 (UTC midnight).
- 2026 is not a leap year, so the interval contains exactly 365 days.
- Difference in ms = 365 × 86,400,000. Divide by 86,400,000 = 365.
Days until event: 365 days.
Common mistakes to avoid
- Entering the event date in the wrong format (MM/DD vs. DD/MM) — a date like 05/06 means June 5 in some locales and May 6 in others, giving a result off by about a month.
- Forgetting that the result is the number of complete days remaining — if today is the event date, the result is 0, not 1.
- Using a past date as the event — the calculator will return a negative number of days, indicating the event has already passed.
Key terms
- UTC (Coordinated Universal Time)
- The primary time standard by which the world regulates clocks and time; using UTC eliminates timezone offsets when comparing two dates.
- Unix timestamp (milliseconds)
- The number of milliseconds elapsed since 1 January 1970 00:00:00 UTC; JavaScript's Date arithmetic uses this representation.
- Leap year
- A calendar year with 366 days (adding 29 February) occurring when the year is divisible by 4, except for century years not divisible by 400.
- Countdown
- A decreasing tally of time units remaining until a specified future moment or date.
- 86,400,000 ms
- The number of milliseconds in exactly one 24-hour day (60 s × 60 min × 24 h × 1,000 ms).
Frequently asked questions
- How many days until New Year?
- Enter January 1 of next year as the event date and today's date as the from date to count down the days until New Year.