Days Until Calculator
Calculate exact days, weeks, and business days until any future date. Includes countdown timer, saved dates, and holiday presets.
About
Miscounting days until a deadline triggers missed appointments, expired contracts, and penalty fees. This calculator computes the exact number of calendar days between today and your target date using UTC-normalized arithmetic to eliminate Daylight Saving Time errors. The result decomposes into weeks (w = d Γ· 7), business days (excluding Saturdays and Sundays), and a live countdown in hours, minutes, and seconds. All saved dates persist in browser storage, surviving page reloads and allowing quick access to recurring deadlines.
The tool handles edge cases: leap years add 1 day to February, past dates return negative values (days since), and the optional "include end date" toggle adds 1 to the count for fence-post scenarios like rental periods or medication courses. Business day calculations iterate through each day in the range - no approximation formulas that break on holiday-adjacent weekends.
Formulas
The calculator determines elapsed days by computing the difference between two dates normalized to midnight UTC, then dividing by the number of milliseconds in one day.
Where d is the number of days, Ttarget is the target date timestamp in milliseconds (UTC midnight), Ttoday is today's date timestamp in milliseconds (UTC midnight), and 86400000 = 24 Γ 60 Γ 60 Γ 1000 ms/day.
Business days exclude weekends. The algorithm iterates from start to end date, incrementing only when getDay() returns 1 - 5 (Monday - Friday).
Where b is business days, day(i) returns the weekday index (Sunday = 0, Saturday = 6).
The quick approximation ratio is b ≈ d Γ 0.7143 (5Γ·7), but the tool uses exact iteration for precision.
Reference Data
| Event/Deadline | Typical Date | Days Notice Required | Business Days Factor |
|---|---|---|---|
| US Tax Filing (IRS) | April 15 | 90 - 120 days | 0.71 |
| Passport Renewal | Variable | 60 - 90 days | 0.71 |
| Visa Application | Variable | 30 - 180 days | 0.71 |
| Wedding Planning | Variable | 180 - 365 days | 0.71 |
| Lease Termination Notice | Variable | 30 - 60 days | 0.71 |
| New Year's Day | January 1 | N/A | N/A |
| Valentine's Day | February 14 | 7 - 14 days | 0.71 |
| Easter Sunday | March/April (variable) | 14 - 30 days | 0.71 |
| US Independence Day | July 4 | 7 - 14 days | 0.71 |
| Halloween | October 31 | 14 - 30 days | 0.71 |
| Thanksgiving (US) | 4th Thursday, November | 14 - 30 days | 0.71 |
| Christmas Day | December 25 | 30 - 60 days | 0.71 |
| Project Sprint (Agile) | Variable | 14 days | 10 business days |
| Quarterly Report | End of Q1/Q2/Q3/Q4 | 30 - 45 days | 0.71 |
| Annual Review | Variable | 14 - 30 days | 0.71 |
| School Year Start (US) | Late August/Early September | 60 - 90 days | 0.71 |
| College Application Deadline | January 1-15 | 90 - 180 days | 0.71 |
| Driver's License Renewal | Variable | 30 - 60 days | 0.71 |
| Insurance Policy Renewal | Variable | 30 - 45 days | 0.71 |
| Medication Refill | Variable | 7 - 14 days | 0.71 |
| Flight Booking (Optimal) | Variable | 42 - 54 days | 0.71 |
| Hotel Cancellation | Variable | 1 - 7 days | 0.71 |
| Court Filing Deadline | Variable | 20 - 30 days | Strict business days |
| Patent Filing (Provisional) | Variable | 365 days | 0.71 |
| Warranty Expiration | Variable | 30 days | N/A |