Day Calculator
Calculate exact calendar days and business days between any two dates. Add or subtract days, weeks, and months, or identify the day of the week with zero DST drift.
Comment ça marche
Formule
Calendar Days = frac{UTC Epoch_2 - UTC Epoch_1}{86{,}400{,}000} , (+1 if inclusive) Exemple détaillé
From January 1, 2026 to January 31, 2026, there are exactly 30 calendar days (exclusive) or 31 calendar days (inclusive), with 22 business days.
Complete Calendar Math and Day Interval Reckoning
Whether you are calculating contract milestones, statutory statute-of-limitations deadlines, project management sprint cycles, or travel visa validity, our day calculator delivers exact, reliable calendar calculations. Operating on strict calendar dates within Coordinated Universal Time (UTC), it completely prevents daylight saving time (DST) off-by-one errors.
Three Calculation Modes
- Days Between Dates: Enter any two calendar dates to determine the total calendar days, elapsed weeks, and Monday-through-Friday business days. Use the inclusive toggle when statutory rules or hotel booking standards require counting both the starting and departure dates.
- Add or Subtract Periods: Project forward or backward from an anchor date by adding or subtracting specific quantities of days, weeks, months, or years. The algorithm automatically applies month-end clipping (for example, adding one month to January 31 lands safely on February 28 or February 29).
- Day of the Week Finder: Determine the exact day of the week (Monday through Sunday) for any historical or future date across centuries.
Understanding the Mathematics of Day Counting
The foundation of accurate calendar reckoning relies on integer arithmetic over standardized 86,400-second solar day units:
$$\Delta D = \left\lfloor \frac{T_2 - T_1}{86{,}400{,}000 \text{ ms}} \right\rfloor$$
When calculating business days, the algorithm iterates through each calendar day, determining its day-of-week index:
$$\text{Day of Week} = (d + \lfloor 2.6m - 0.2 \rfloor - 2c + y + \lfloor y/4 \rfloor + \lfloor c/4 \rfloor) \pmod 7$$
Saturdays (index 6) and Sundays (index 0) are excluded, leaving five active business days per standard seven-day cycle.
Preventing Common Calendar Calculation Mistakes
- Daylight Saving Time Transitions: When clocks spring forward in the spring or fall back in autumn, local days consist of 23 or 25 hours respectively. Naive division by 24 hours in local JavaScript code yields fractional values like $29.96$ or $30.04$ days, which truncate incorrectly if floor or ceil functions are misapplied. Our engine executes in pure UTC midnight, guaranteeing that every calendar day is counted as an exact integer.
- The Month-End Clipping Rule: Adding 30 days to January 31 lands on March 2 (or March 1 in leap years), whereas adding 1 calendar month lands on the final day of February. Clarifying whether your agreement specifies calendar months or a fixed day count prevents legal disputes.
- Leap Century Rules: Remember that century years like 1900 or 2100 are not leap years because they are not divisible by 400, whereas 2000 was a leap year. Our Gregorian algorithm implements full astronomical leap century compliance.
- Statutory Notice Periods: In regulatory compliance and rental lease terminations, standard 30-day or 60-day notice provisions often stipulate whether service of notice excludes the day of receipt. Using our inclusive toggle ensures contract deadlines match local statutory guidelines.
Foire aux questions
What is the difference between inclusive and exclusive day counting?
Exclusive counting measures the time elapsed from date A to date B, excluding the final boundary date. Inclusive counting counts both the starting and ending dates as full active days.
How does the day calculator handle leap years?
Our calculator operates purely in Coordinated Universal Time (UTC) using Gregorian calendar algorithms, accurately factoring in February 29 during leap years (years divisible by 4, except century years not divisible by 400).
What constitutes a business day in this calculator?
Business days are defined as standard working weekdays (Monday through Friday), excluding Saturdays and Sundays.
Why do some online date calculators produce off-by-one errors?
Many tools use local browser timestamps without UTC normalization. When a date interval spans a daylight saving time transition, a 23-hour or 25-hour day causes math rounded to 24 hours to slip by one full day.