Countdown Calculator
Calculate days, weeks, and months remaining until a future event.
Enter your values and click Calculate
How It Works
Both dates are converted to UTC timestamps using Date.UTC(year, month−1, day), which returns milliseconds since January 1, 1970. The difference in milliseconds is divided by 86,400,000 (the number of milliseconds in a day) and floored to get total whole days. Total weeks is the floor of total days divided by 7. The remainder (total days mod 7) gives the leftover days after full weeks. Total months is the absolute difference in (year × 12 + month) values between the two dates, which counts calendar months regardless of day alignment. For example, from March 7, 2025 to December 31, 2026 gives a difference of (2026×12+12) − (2025×12+3) = 24312 − 24303 = 9 calendar months, while the actual day count is 664 days (94 weeks, 6 days).